@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Fjalla+One&family=Quicksand:wght@400;500;600;700&display=swap");

:root {
    --bg: #6F4F36;
    --surface: #ffffff;
    --ink: #3E1F07;
    --muted: #6b5039;
    --border: rgba(62, 31, 7, 0.24);
    --teal: #3E1F07;
    --teal-dark: #2f1705;
    --brass: #D9AB6E;
    --danger: #a43f3f;
    --shadow: 0 18px 45px rgba(62, 31, 7, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg);
    color: var(--ink);
    font-family: "Quicksand", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.website-body {
    background: #f4eee4;
    color: #261307;
    font-family: "Quicksand", Arial, Helvetica, sans-serif;
}

.website-hero {
    position: relative;
    min-height: 74vh;
    padding: 26px clamp(18px, 4vw, 58px) 42px;
    background:
        linear-gradient(90deg, rgba(30, 14, 5, 0.9) 0%, rgba(30, 14, 5, 0.72) 44%, rgba(30, 14, 5, 0.28) 100%),
        url("/static/images/watch-atelier.webp");
    background-size: cover;
    background-position: center;
    color: #fbf2e4;
}

.website-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(244, 238, 228, 0), #f4eee4);
    pointer-events: none;
}

.website-nav {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
}

.website-brand {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.website-brand strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.website-hero h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    letter-spacing: 0;
}

.website-brand small {
    display: block;
    margin-top: 2px;
    color: #e9c690;
    font-size: 0.86rem;
}

.website-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.website-links a {
    color: #fbf2e4;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding: 8px 2px;
    font-size: 0.94rem;
    font-weight: 600;
    opacity: 0.9;
}

.website-links a.active,
.website-links a:hover {
    border-color: #d9ab6e;
    color: #f5cc8d;
    opacity: 1;
}

.website-hero-grid {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    max-width: 1160px;
    min-height: calc(74vh - 96px);
    margin: 0 auto;
    padding-top: 54px;
}

.website-hero-copy {
    max-width: 650px;
    padding-bottom: clamp(18px, 6vh, 66px);
}

.website-hero-copy .eyebrow {
    margin: 0 0 12px;
    color: #e8c084;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.website-hero h1 {
    margin: 0;
    max-width: 660px;
    font-size: clamp(42px, 6.4vw, 74px);
    font-weight: 600;
    line-height: 0.96;
}

.website-hero-copy > p:not(.eyebrow) {
    max-width: 540px;
    margin-top: 18px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: #f5e2c7;
}

.website-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.primary-action {
    background: #d8af73;
    color: #241105;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.secondary-action {
    border: 1px solid rgba(251, 242, 228, 0.45);
    color: #fbf2e4;
    background: rgba(255, 255, 255, 0.04);
}

.website-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 10px clamp(18px, 4vw, 58px) 58px;
}

.website-content {
    max-width: 760px;
    font-size: 1.01rem;
    line-height: 1.82;
    color: #3d2616;
}

.website-content p:first-child {
    font-size: 1.14rem;
    color: #291407;
}

.website-flashes {
    max-width: 820px;
    margin: 0 0 22px;
}

.website-contact-form-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) minmax(320px, 1.25fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: start;
    margin-top: 34px;
    padding: 34px 0;
    border-top: 1px solid rgba(77, 43, 22, 0.18);
}

.website-contact-form-section .dark {
    margin: 0 0 8px;
    color: #8b643d;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.website-contact-form-section h2 {
    margin: 0 0 12px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1;
}

.website-contact-form-section p {
    color: #654531;
    line-height: 1.7;
}

.website-contact-form {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 1px solid rgba(77, 43, 22, 0.18);
    border-radius: 4px;
    background: rgba(255, 250, 242, 0.72);
}

.website-contact-form label {
    display: grid;
    gap: 7px;
    color: #5c3a24;
    font-size: 0.94rem;
    font-weight: 700;
}

.website-contact-form input,
.website-contact-form textarea {
    width: 100%;
    border: 1px solid rgba(77, 43, 22, 0.24);
    border-radius: 3px;
    background: #fffdf8;
    color: #261307;
    padding: 12px 13px;
    outline: none;
}

.website-contact-form input:focus,
.website-contact-form textarea:focus {
    border-color: #9b6b38;
    box-shadow: 0 0 0 3px rgba(216, 175, 115, 0.22);
}

.website-contact-form .primary-action {
    border: 0;
    justify-self: start;
}

.website-service-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-top: 38px;
    padding-top: 30px;
    border-top: 1px solid rgba(77, 43, 22, 0.22);
}

.website-service-strip article {
    position: relative;
    padding: 0 0 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    border-left: 1px solid rgba(155, 107, 56, 0.34);
}

.website-service-strip strong,
.website-service-strip span {
    display: block;
}

.website-service-strip strong {
    margin-bottom: 7px;
    color: #261307;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.website-service-strip span {
    color: #654531;
}

.website-service-strip .service-number {
    margin-bottom: 10px;
    color: #a87743;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.website-contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid rgba(77, 43, 22, 0.18);
}

.website-contact-bar a {
    color: #4d2b16;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(77, 43, 22, 0.22);
}

@media (max-width: 760px) {
    .website-hero {
        min-height: auto;
        padding-bottom: 70px;
    }

    .website-nav,
    .website-hero-grid {
        display: block;
    }

    .website-links {
        justify-content: flex-start;
        margin-top: 16px;
        gap: 12px;
    }

    .website-links a {
        flex: 0 1 auto;
        padding: 6px 0;
        text-align: left;
    }

    .website-hero h1 {
        font-size: 44px;
    }

    .website-hero-copy {
        padding-bottom: 0;
        padding-top: 52px;
    }

    .website-service-strip {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .website-contact-form-section {
        grid-template-columns: 1fr;
    }

    .website-contact-form {
        padding: 18px;
    }
}

[id] {
    scroll-margin-top: 14px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    min-height: 42px;
    padding: 9px 14px;
    color: var(--ink);
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

button:hover:not(:disabled) {
    border-color: var(--teal);
}

.download-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.download-button:hover {
    border-color: var(--teal);
}

.danger-button {
    border-color: rgba(164, 63, 63, 0.35);
    background: #fffafa;
    color: var(--danger);
}

.danger-button:hover:not(:disabled) {
    border-color: var(--danger);
    background: #fff1f1;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    padding: 9px 11px;
    color: var(--ink);
}

input,
select {
    min-height: 42px;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.app {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    overflow-x: clip;
}

.app:not(.admin-app) {
    grid-template-columns: 1fr;
    background:
        linear-gradient(180deg, rgba(38, 19, 7, 0.82) 0, rgba(111, 79, 54, 0.76) 310px, rgba(244, 238, 228, 0.94) 720px),
        url("/static/images/watch-atelier.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.app:not(.admin-app) .sidebar {
    display: none;
}

.app.single-page {
    grid-template-columns: 1fr;
    max-width: 960px;
    margin: 0 auto;
}

.admin-app {
    grid-template-columns: 1fr;
}

.admin-app .sidebar {
    display: none;
}

.sidebar {
    background: rgba(38, 19, 7, 0.78);
    border-right: 1px solid rgba(217, 171, 110, 0.16);
    color: white;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brass);
    color: var(--ink);
    font-weight: 800;
}

.brand strong,
.brand span {
    display: block;
}

.brand span {
    margin-top: 3px;
    color: var(--brass);
    font-size: 13px;
}

nav {
    display: grid;
    gap: 8px;
}

nav a {
    color: #edf5f3;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 8px;
}

nav a:hover {
    background: rgba(217, 171, 110, 0.16);
    color: var(--brass);
}

.sidebar-logout button {
    width: 100%;
    background: rgba(217, 171, 110, 0.12);
    border-color: rgba(217, 171, 110, 0.45);
    color: var(--brass);
}

.sidebar-logout button:hover {
    background: rgba(217, 171, 110, 0.2);
    border-color: var(--brass);
}

.sidebar-note {
    margin-top: auto;
    color: var(--brass);
    line-height: 1.5;
    font-size: 14px;
}

main {
    min-width: 0;
    max-width: 100%;
    padding: 28px;
    display: grid;
    gap: 18px;
}

main > * {
    min-width: 0;
}

.topbar {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: rgba(62, 31, 7, 0.45);
    border: 1px solid rgba(217, 171, 110, 0.28);
    border-radius: 8px;
    padding: 18px;
}

.app:not(.admin-app) .topbar {
    background: rgba(38, 19, 7, 0.58);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 50px rgba(38, 19, 7, 0.2);
}

.customer-top-brand {
    display: inline-block;
    margin-bottom: 8px;
    color: #e8c084;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.app:not(.admin-app) .topbar h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
}

.app:not(.admin-app) .booking-panel,
.app:not(.admin-app) .admin-login,
.app:not(.admin-app) .admin-add,
.app:not(.admin-app) .calendar-card,
.app:not(.admin-app) .appointment-list,
.app:not(.admin-app) .order-status-panel {
    background: rgba(255, 250, 242, 0.93);
    backdrop-filter: blur(10px);
}

.customer-hero {
    align-items: center;
}

.customer-hero > div:first-child {
    flex: 1;
    text-align: center;
}

.customer-hero h1 {
    font-size: 42px;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.single-page .topbar-actions .mail-action {
    width: 180px;
}

.admin-refresh-notice {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(420px, calc(100vw - 36px));
    padding: 12px;
    border: 1px solid var(--brass);
    border-radius: 8px;
    background: #fff8ea;
    box-shadow: 0 18px 44px rgba(62, 31, 7, 0.22);
}

.admin-refresh-notice[hidden] {
    display: none;
}

.admin-refresh-notice button {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
    white-space: nowrap;
}

.admin-shortcuts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(217, 171, 110, 0.28);
    border-radius: 8px;
    background: rgba(62, 31, 7, 0.22);
}

.admin-shortcuts a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(217, 171, 110, 0.45);
    border-radius: 8px;
    background: rgba(255, 250, 244, 0.08);
    color: #fff7e8;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.admin-shortcut-form {
    margin: 0;
}

.admin-shortcut-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(217, 171, 110, 0.45);
    border-radius: 8px;
    background: rgba(217, 171, 110, 0.12);
    color: #fff7e8;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.admin-shortcut-form button:hover {
    border-color: var(--brass);
    background: rgba(217, 171, 110, 0.22);
}

.admin-shortcuts a:hover {
    border-color: var(--brass);
    background: rgba(217, 171, 110, 0.18);
}

.customer-shortcuts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(217, 171, 110, 0.28);
    border-radius: 8px;
    background: rgba(62, 31, 7, 0.22);
}

.customer-shortcuts a {
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(217, 171, 110, 0.45);
    border-radius: 8px;
    background: rgba(255, 250, 244, 0.08);
    color: #fff7e8;
    text-decoration: none;
    font-weight: 700;
}

.customer-shortcuts a:hover {
    border-color: var(--brass);
    background: rgba(217, 171, 110, 0.18);
}

.customer-shortcuts .primary-shortcut {
    background: var(--brass);
    border-color: var(--brass);
    color: var(--ink);
}

.customer-shortcuts .primary-shortcut:hover {
    background: #e4bd85;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 6px;
    font-size: 34px;
    line-height: 1.15;
    font-family: "Fjalla One", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

h2 {
    margin-bottom: 0;
    font-size: 20px;
    font-family: "Fjalla One", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

.topbar p,
.section-title span,
.empty {
    color: var(--muted);
}

.topbar h1 {
    color: #ffffff;
}

.topbar p {
    color: #f0d8b8;
}

.lookup,
.admin-login,
.admin-add {
    display: flex;
    gap: 10px;
    align-items: center;
}

.own-appointments-lookup {
    margin: 14px 0;
}

.language-switch {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
    padding: 3px;
    border: 1px solid rgba(217, 171, 110, 0.35);
    border-radius: 999px;
    background: rgba(62, 31, 7, 0.22);
}

.language-switch a {
    border: 0;
    border-radius: 999px;
    color: #f0d8b8;
    min-width: 38px;
    min-height: 32px;
    padding: 6px 10px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

.language-switch a.active {
    background: var(--brass);
    color: var(--ink);
}

.primary,
.lookup button,
.admin-login button,
.admin-add button {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
    font-weight: 700;
}

.primary:hover,
.lookup button:hover,
.admin-login button:hover,
.admin-add button:hover {
    background: var(--teal-dark);
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.admin-workspace {
    grid-template-columns: 1fr;
}

.calendar-panel,
.booking-panel,
.content-band {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.calendar-panel,
.booking-panel,
.content-band {
    padding: 18px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.day-column {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fffaf4;
}

.day-head {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
    border-bottom: 1px solid var(--border);
}

.day-head span {
    color: var(--muted);
    font-size: 13px;
}

.slot {
    width: calc(100% - 16px);
    margin: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-wrap {
    padding-bottom: 8px;
}

.slot-wrap .slot {
    margin-bottom: 6px;
}

.quick-book {
    width: calc(100% - 16px);
    min-height: 34px;
    margin: 0 8px;
    padding: 6px 10px;
    background: #fff8ea;
    border-color: #dfc58d;
    color: #704f15;
    font-size: 13px;
    font-weight: 700;
}

.slot.free {
    background: rgba(217, 171, 110, 0.12);
    border-color: rgba(217, 171, 110, 0.55);
}

.slot.booked {
    background: #faeaea;
    border-color: #e2b8b8;
    color: var(--danger);
    cursor: not-allowed;
}

.slot.expired {
    background: #efeeeb;
    border-color: #d5d0c8;
    color: #8b8176;
    cursor: not-allowed;
}

.slot.selected {
    outline: 3px solid rgba(217, 171, 110, 0.3);
    border-color: var(--brass);
}

.slot small {
    font-size: 12px;
}

.form-stack {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
}

label input,
label select,
label textarea {
    color: var(--ink);
    font-size: 16px;
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.success,
.booking-success {
    background: #fff8ea;
    color: var(--ink);
    border-color: rgba(217, 171, 110, 0.55);
}

.notice-action {
    background: var(--teal);
    border-radius: 8px;
    color: white;
    font-weight: 700;
    padding: 9px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.notice-action:hover {
    background: var(--teal-dark);
}

.error {
    background: #faeaea;
    color: var(--danger);
}

.appointment-list,
.type-list,
.admin-appointments {
    display: grid;
    gap: 10px;
}

.appointment-sound-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff8ea;
    border: 1px solid rgba(217, 171, 110, 0.55);
    border-radius: 8px;
}

.appointment-sound-panel div {
    display: grid;
    gap: 3px;
}

.appointment-sound-panel span {
    color: var(--muted);
    font-size: 14px;
}

.appointment-sound-panel form {
    margin: 0;
}

.appointment-popup {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(62, 31, 7, 0.38);
}

.appointment-popup[hidden] {
    display: none;
}

.appointment-popup-card {
    width: min(460px, 100%);
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(217, 171, 110, 0.65);
    border-radius: 8px;
    background: #fffaf4;
    box-shadow: 0 22px 60px rgba(62, 31, 7, 0.28);
}

.appointment-popup-card strong {
    font-size: 22px;
    font-family: "Fjalla One", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

.appointment-popup-card span {
    color: var(--muted);
}

.appointment-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.google-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto auto auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff8ea;
    border: 1px solid rgba(217, 171, 110, 0.55);
    border-radius: 8px;
}

.status-panel {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff8ea;
    border: 1px solid rgba(217, 171, 110, 0.55);
    border-radius: 8px;
}

.status-panel span {
    color: var(--muted);
    font-size: 14px;
}

.email-test-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.google-panel div {
    display: grid;
    gap: 4px;
}

.google-panel span {
    color: var(--muted);
    font-size: 14px;
}

.appointment-row,
.admin-appointment-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.admin-appointment-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(130px, 160px) minmax(100px, 120px);
    align-items: end;
    background: #fffaf4;
    border: 1px solid rgba(62, 31, 7, 0.16);
    border-radius: 8px;
    padding: 12px;
}

.appointment-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.appointment-actions button,
.appointment-actions .mail-action {
    min-width: 120px;
}

.appointment-main {
    display: grid;
    gap: 4px;
}

.appointment-main span {
    color: var(--muted);
    font-size: 14px;
}

.appointment-main small {
    color: var(--ink);
    line-height: 1.45;
}

.appointment-row:last-child,
.admin-appointment-row:last-child {
    border-bottom: 1px solid rgba(62, 31, 7, 0.16);
}

.type-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
}

.check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    white-space: nowrap;
}

.check input {
    width: auto;
    min-height: auto;
}

.ghost {
    color: var(--danger);
}

.mail-action {
    border: 1px solid rgba(217, 171, 110, 0.55);
    background: #fff8ea;
    border-radius: 8px;
    color: var(--ink);
    min-height: 42px;
    padding: 9px 14px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.mail-action:hover {
    border-color: var(--brass);
}

.manage-action-form button {
    width: min(100%, 260px);
}

.text-button {
    margin-top: 14px;
    border: 0;
    padding-left: 0;
    color: var(--ink);
    background: transparent;
}

.orders-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.audit-list {
    display: grid;
    gap: 8px;
}

.audit-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 150px minmax(160px, 1fr) minmax(140px, 1fr) minmax(180px, 1.2fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(62, 31, 7, 0.16);
    border-radius: 8px;
    background: #fffaf4;
}

.audit-row span,
.audit-row small {
    color: var(--muted);
}

.order-row {
    display: grid;
    grid-template-columns: 90px 105px minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, 150px) 70px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(62, 31, 7, 0.16);
    border-radius: 8px;
    background: #fffaf4;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
}

.order-row > *,
.admin-appointment-row > * {
    min-width: 0;
}

.order-row:hover {
    border-color: var(--brass);
}

.order-row span,
.order-row small {
    color: var(--muted);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid rgba(62, 31, 7, 0.18);
    border-radius: 6px;
    background: #f8efe3;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.15;
}

.order-row .status-badge {
    color: var(--ink);
}

.status-afspraak-gemaakt {
    background: #fff6dc;
    border-color: #e8c16c;
}

.status-offerte,
.status-wachten-op-onderdelen {
    background: #fff3e3;
    border-color: #e3aa5f;
}

.status-offerte-afgewezen,
.status-niet-verschenen,
.status-geannuleerd {
    background: #fde9e6;
    border-color: #d66b5d;
}

.status-akkoord,
.status-gereed {
    background: #e8f5e6;
    border-color: #83b978;
}

.status-in-uitvoering,
.status-in-behandeling {
    background: #e8f0ff;
    border-color: #88a8df;
}

.backup-list {
    display: grid;
    gap: 8px;
    width: 100%;
}

.backup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(62, 31, 7, 0.16);
    border-radius: 8px;
    background: #fffaf4;
}

.backup-row a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.backup-row div:first-child {
    display: grid;
    gap: 4px;
}

.backup-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.backup-actions form {
    margin: 0;
}

.backup-row span,
.backup-row small {
    color: var(--muted);
}

.phone-country {
    display: inline-flex;
    margin-left: 6px;
    padding: 2px 7px;
    border: 1px solid rgba(217, 171, 110, 0.45);
    border-radius: 999px;
    color: var(--muted);
    background: #fff8ea;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.customer-row {
    grid-template-columns: 110px minmax(160px, 1.1fr) minmax(120px, 0.8fr) minmax(180px, 1fr) minmax(120px, 0.8fr) 90px;
}

.order-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-row,
.action-row,
.ready-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.offer-response-panel {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff8ea;
}

.offer-response-panel div:first-child {
    display: grid;
    gap: 4px;
}

.offer-response-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ready-panel {
    justify-content: space-between;
    margin-top: 16px;
    padding: 12px;
    background: #fff8ea;
    border: 1px solid rgba(217, 171, 110, 0.55);
    border-radius: 8px;
}

.ready-panel div {
    display: grid;
    gap: 4px;
}

.ready-panel span {
    color: var(--muted);
    font-size: 14px;
}

.inline-details {
    border: 1px solid rgba(217, 171, 110, 0.55);
    border-radius: 8px;
    background: #fff8ea;
    padding: 10px 12px;
}

.inline-details summary {
    cursor: pointer;
    font-weight: 700;
}

.inline-details .form-grid {
    margin-top: 12px;
}

.create-order-panel {
    display: grid;
    gap: 14px;
}

.create-order-panel > summary {
    width: fit-content;
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--teal);
    background: var(--teal);
    color: white;
    border-radius: 8px;
    min-height: 42px;
    padding: 9px 14px;
    font-weight: 700;
}

.create-order-panel > summary::-webkit-details-marker {
    display: none;
}

.create-order-panel[open] > summary {
    background: var(--teal-dark);
}

.settings-details {
    margin-bottom: 16px;
}

.settings-details > summary {
    width: fit-content;
    min-width: 220px;
}

.settings-details .google-panel {
    margin-top: 12px;
    margin-bottom: 0;
}

@media (max-width: 1240px) {
    .app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 18px;
    }

    .sidebar-note {
        margin-top: 0;
    }

    nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workspace {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) and (max-width: 1240px) {
    main {
        padding: 22px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) auto;
        align-items: center;
        gap: 16px;
    }

    .sidebar-note {
        grid-column: 1 / -1;
    }

    .sidebar-logout {
        justify-self: end;
        min-width: 190px;
    }

    .topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .topbar .lookup {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-shortcuts {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .admin-shortcuts a,
    .admin-shortcut-form button {
        display: inline-flex;
        justify-content: center;
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .order-row {
        grid-template-columns: 90px 100px minmax(180px, 1fr);
    }

    .audit-row {
        grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr);
    }

    .google-panel {
        grid-template-columns: minmax(0, 1fr) minmax(150px, auto) minmax(150px, auto);
    }

    .google-panel > div {
        grid-column: 1 / -1;
    }

    .google-panel form,
    .google-panel button {
        width: 100%;
    }

    .status-panel .email-test-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .status-panel .email-test-form:has(label:nth-of-type(2)) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .status-panel .email-test-form:has(label:nth-of-type(2)) button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .backup-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .backup-actions {
        justify-content: flex-start;
    }

    .appointment-sound-panel {
        grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    }
}

@media (max-width: 760px) {
    main {
        padding: 16px;
    }

    .topbar {
        gap: 14px;
    }

    .customer-hero > div:first-child {
        text-align: left;
    }

    .customer-hero h1 {
        font-size: 36px;
    }

    .topbar,
    .section-title,
    .appointment-row,
    .notice {
        display: grid;
    }

    .lookup,
    .admin-login,
    .admin-add,
    .appointment-sound-panel,
    .language-switch,
    .google-panel,
    .email-test-form,
    .type-row,
    .admin-appointment-row,
    .order-row,
    .audit-row,
    .backup-row,
    .form-grid.two,
    .ready-panel {
        grid-template-columns: 1fr;
        display: grid;
    }

    .appointment-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .backup-actions {
        justify-content: flex-start;
    }

    .language-switch a,
    .customer-shortcuts a,
    .admin-shortcuts a,
    .admin-shortcut-form button,
    .download-button,
    button {
        min-height: 46px;
        justify-content: center;
        text-align: center;
    }

    .language-switch {
        display: inline-flex;
        width: fit-content;
        margin-left: 0;
    }

    .language-switch a {
        min-height: 34px;
        min-width: 40px;
    }

    .customer-shortcuts,
    .admin-shortcuts {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-shortcuts .primary-shortcut {
        min-height: 54px;
        font-size: 18px;
    }

    .own-appointments-lookup {
        margin-top: 16px;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    nav {
        grid-template-columns: 1fr;
    }
}
