/* ========================================
   LUNA ADMIN — LUXURY THEME
========================================= */

:root {
    --primary: #3a2030;
    --primary-dark: #241820;
    --primary-deep: #160e14;
    --primary-light: #eadde0;
    --champagne: #c6a56b;
    --champagne-light: #ead7aa;
    --champagne-soft: #f5ead2;
    --rose: #cfa7ad;
    --background: #eee8e1;
    --surface: #fffdf9;
    --surface-soft: #f8f2e9;
    --text-dark: #281d23;
    --text-medium: #756a6e;
    --text-light: #9f9497;
    --border: rgba(117, 90, 70, 0.16);
    --success: #567560;
    --success-light: #e5efe7;
    --warning: #96703a;
    --warning-light: #f5ead2;
    --danger: #a44f59;
    --danger-light: #f5e3e4;
    --shadow: 0 24px 70px rgba(31, 17, 25, 0.14);
    --small-shadow: 0 9px 28px rgba(31, 17, 25, 0.075);
    --radius-large: 28px;
    --radius-medium: 19px;
    --radius-small: 13px;
}

html {
    background: var(--primary-deep);
}

body {
    color: var(--text-dark);
    background:
        radial-gradient(circle at 12% 0%, rgba(198, 165, 107, 0.16), transparent 36rem),
        linear-gradient(145deg, #eee8e1, #f8f3ec 55%, #ece3dc);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.01em;
}

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

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(198, 165, 107, 0.42);
    outline-offset: 3px;
}

::selection {
    color: var(--surface);
    background: var(--primary);
}

/* Brand */

.brand-icon {
    display: block;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border: 1px solid rgba(234, 215, 170, 0.5);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(7, 3, 6, 0.26);
}

.logo-text strong {
    color: inherit;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 0.9;
    text-transform: uppercase;
}

.logo-text small {
    margin-top: 7px;
    color: var(--champagne-light);
    font-size: 0.57rem;
    font-weight: 600;
    letter-spacing: 0.24em;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #8c6831;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--champagne), transparent);
}

/* Login */

.admin-login-screen {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 13%, rgba(198, 165, 107, 0.18), transparent 27rem),
        linear-gradient(145deg, #160e14, #2b1923 52%, #3a2030);
}

.admin-login-screen::before,
.admin-login-screen::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(234, 215, 170, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.admin-login-screen::before {
    top: -180px;
    right: -120px;
    width: 430px;
    height: 430px;
    box-shadow: 0 0 0 38px rgba(198, 165, 107, 0.025);
}

.admin-login-screen::after {
    bottom: -160px;
    left: -130px;
    width: 360px;
    height: 360px;
}

.login-card {
    position: relative;
    z-index: 1;
    max-width: 450px;
    padding: 36px 34px 38px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 253, 249, 0.99), rgba(248, 242, 233, 0.98));
    border: 1px solid rgba(234, 215, 170, 0.4);
    border-radius: 30px;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.38),
        inset 0 1px rgba(255, 255, 255, 0.85);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 15%;
    left: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

.login-logo {
    gap: 13px;
    margin-bottom: 32px;
    color: var(--primary-dark);
}

.login-logo .logo-text small {
    color: #8c6932;
}

.login-logo .brand-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

.login-card > .eyebrow {
    justify-content: center;
}

.login-card > .eyebrow::before {
    display: none;
}

.login-card h1 {
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1;
}

.login-description {
    margin-bottom: 28px;
    color: var(--text-medium);
    line-height: 1.65;
}

.login-message {
    color: var(--danger);
}

/* Header */

.admin-header {
    min-height: 74px;
    padding: max(11px, env(safe-area-inset-top)) 24px 11px;
    color: #fffaf1;
    background: linear-gradient(100deg, rgba(22, 14, 20, 0.98), rgba(58, 32, 48, 0.98));
    border-bottom: 1px solid rgba(234, 215, 170, 0.22);
    box-shadow: 0 10px 32px rgba(20, 10, 17, 0.2);
    backdrop-filter: blur(18px);
}

.admin-header::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: -1px;
    left: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--champagne), transparent);
    opacity: 0.5;
}

.admin-logo {
    gap: 12px;
    color: #fffaf1;
}

.admin-header-actions {
    gap: 10px;
}

.admin-badge {
    padding: 7px 11px;
    color: var(--champagne-light);
    background: rgba(234, 215, 170, 0.08);
    border: 1px solid rgba(234, 215, 170, 0.26);
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logout-button {
    padding: 8px 12px;
    color: rgba(255, 250, 241, 0.72);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.68rem;
}

.logout-button:hover {
    color: #fffaf1;
    background: rgba(255, 255, 255, 0.1);
}

/* Main dashboard */

.admin-app {
    min-height: 100svh;
}

.admin-main {
    max-width: 1180px;
    padding: 42px 28px 70px;
}

.dashboard-heading {
    align-items: flex-end;
    margin-bottom: 30px;
    padding: 30px;
    background:
        radial-gradient(circle at 90% 10%, rgba(198, 165, 107, 0.13), transparent 18rem),
        linear-gradient(135deg, #241820, #452639);
    border: 1px solid rgba(234, 215, 170, 0.22);
    border-radius: 26px;
    box-shadow: 0 22px 54px rgba(31, 17, 25, 0.18);
}

.dashboard-heading .eyebrow {
    color: var(--champagne-light);
}

.dashboard-heading h1 {
    margin-bottom: 5px;
    color: #fffaf1;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.98;
}

.dashboard-heading > div > p:last-child {
    color: rgba(255, 250, 241, 0.62);
}

.primary-button {
    position: relative;
    min-height: 52px;
    overflow: hidden;
    color: var(--primary-deep);
    background: linear-gradient(135deg, #ead7aa 0%, #c6a56b 50%, #ecdcb4 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    box-shadow: 0 13px 30px rgba(130, 92, 35, 0.22);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.primary-button::before {
    content: "";
    position: absolute;
    top: -70%;
    left: -50%;
    width: 34%;
    height: 240%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
    transform: rotate(22deg);
    transition: left 0.6s ease;
}

.primary-button:hover::before {
    left: 120%;
}

.primary-button:hover {
    color: var(--primary-deep);
    background: linear-gradient(135deg, #f3e4bc, #c7a15c 55%, #f2e2b9);
    transform: translateY(-2px);
}

.view-switcher {
    width: fit-content;
    margin-bottom: 25px;
    padding: 5px;
    background: rgba(255, 253, 249, 0.72);
    border: 1px solid rgba(198, 165, 107, 0.22);
    border-radius: 14px;
    box-shadow: var(--small-shadow);
}

.view-button {
    min-width: 105px;
    padding: 11px 18px;
    color: var(--text-medium);
    background: transparent;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.view-button.active {
    color: #fffaf1;
    background: var(--primary-dark);
    box-shadow: 0 7px 18px rgba(36, 24, 32, 0.2);
}

/* Date navigation */

.date-navigation,
.month-navigation {
    padding: 19px 22px;
    background: rgba(255, 253, 249, 0.92);
    border: 1px solid rgba(198, 165, 107, 0.22);
    border-radius: 20px;
    box-shadow: var(--small-shadow);
}

.selected-date span,
.selected-month span {
    color: #8c6932;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.selected-date strong,
.selected-month h2 {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
}

.date-arrow-button {
    width: 42px;
    height: 42px;
    color: var(--primary-dark);
    background: var(--champagne-soft);
    border: 1px solid rgba(198, 165, 107, 0.28);
    border-radius: 12px;
    transition: 0.2s ease;
}

.date-arrow-button:hover {
    color: var(--surface);
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.today-button,
.date-picker-label {
    min-height: 43px;
    color: var(--primary-dark);
    background: rgba(255, 253, 249, 0.78);
    border: 1px solid rgba(105, 80, 88, 0.17);
    border-radius: 11px;
    font-size: 0.7rem;
    font-weight: 700;
}

.date-picker-label {
    text-align: center;
}

.today-button:hover {
    border-color: var(--champagne);
    background: var(--champagne-soft);
}

.date-picker-label input {
    color: var(--text-dark);
}

/* Full-day availability */

.day-availability-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    padding: 18px;
    background: linear-gradient(145deg, #fffdf9, #f8f2e9);
    border: 1px solid rgba(198, 165, 107, 0.24);
    border-radius: 19px;
    box-shadow: var(--small-shadow);
    transition: 0.25s ease;
}

.day-availability-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #805e2e;
    background: linear-gradient(145deg, #f9efd9, #e8d0a0);
    border: 1px solid rgba(198, 165, 107, 0.3);
    border-radius: 14px;
}

.day-availability-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.day-availability-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.day-availability-content > span {
    margin-bottom: 3px;
    color: #8c6932;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.day-availability-content strong {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.08;
}

.day-availability-content p {
    margin-top: 4px;
    color: var(--text-medium);
    font-size: 0.7rem;
    line-height: 1.45;
}

.block-day-button {
    min-height: 43px;
    padding: 10px 14px;
    color: #fffaf1;
    background: var(--primary-dark);
    border: 1px solid var(--primary-dark);
    border-radius: 11px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    white-space: nowrap;
    transition: 0.2s ease;
}

.block-day-button:hover:not(:disabled) {
    background: #472a3b;
    transform: translateY(-1px);
}

.block-day-button:disabled {
    color: #9b9294;
    background: #e9e3de;
    border-color: #e9e3de;
    cursor: not-allowed;
}

.day-availability-card.is-blocked {
    background:
        radial-gradient(circle at 95% 0%, rgba(198, 165, 107, 0.13), transparent 12rem),
        linear-gradient(135deg, #241820, #452639);
    border-color: rgba(234, 215, 170, 0.3);
    box-shadow: 0 16px 38px rgba(31, 17, 25, 0.18);
}

.day-availability-card.is-blocked .day-availability-icon {
    color: var(--primary-dark);
    background: linear-gradient(145deg, #ead7aa, #c6a56b);
}

.day-availability-card.is-blocked .day-availability-content > span {
    color: var(--champagne-light);
}

.day-availability-card.is-blocked .day-availability-content strong {
    color: #fffaf1;
}

.day-availability-card.is-blocked .day-availability-content p {
    color: rgba(255, 250, 241, 0.64);
}

.day-availability-card.is-blocked .unblock-day-button {
    color: var(--primary-deep);
    background: linear-gradient(135deg, #ead7aa, #c6a56b);
    border-color: rgba(255, 255, 255, 0.16);
}

.day-availability-card.is-regularly-closed {
    background: rgba(231, 225, 220, 0.72);
    border-color: rgba(117, 90, 70, 0.12);
    box-shadow: none;
}

.day-availability-message {
    min-height: 22px;
    margin: 0 4px 12px;
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
}

.day-availability-message.error {
    color: var(--danger);
}

/* Statistics */

.daily-statistics {
    gap: 13px;
}

.statistic-card {
    position: relative;
    min-height: 108px;
    padding: 19px;
    overflow: hidden;
    background: linear-gradient(145deg, #fffdf9, #f8f2e9);
    border: 1px solid rgba(198, 165, 107, 0.2);
    border-radius: 19px;
    box-shadow: var(--small-shadow);
}

.statistic-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(198, 165, 107, 0.13), transparent 68%);
    border-radius: 50%;
}

.statistic-icon {
    width: 42px;
    height: 42px;
    color: #8c6831;
    background: linear-gradient(145deg, #f9efd9, #e8d0a0);
    border: 1px solid rgba(198, 165, 107, 0.28);
    border-radius: 13px;
    font-size: 0.92rem;
}

.statistic-card strong {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.statistic-card div span {
    margin-top: 5px;
    color: var(--text-medium);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

/* Filters and appointment cards */

.appointment-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 34px;
}

.appointment-controls h2 {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
}

.status-filters {
    gap: 7px;
    padding: 4px;
    background: rgba(255, 253, 249, 0.7);
    border: 1px solid rgba(198, 165, 107, 0.17);
    border-radius: 13px;
}

.filter-button {
    padding: 9px 13px;
    color: var(--text-medium);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: 0.67rem;
    font-weight: 700;
}

.filter-button.active {
    color: #fffaf1;
    background: var(--primary-dark);
    box-shadow: 0 6px 15px rgba(36, 24, 32, 0.17);
}

.appointments-list {
    gap: 14px;
}

.appointment-card {
    position: relative;
    padding: 21px;
    overflow: hidden;
    background: linear-gradient(145deg, #fffdf9, #faf5ed);
    border: 1px solid rgba(198, 165, 107, 0.19);
    border-left: 3px solid var(--champagne);
    border-radius: 18px;
    box-shadow: 0 9px 26px rgba(31, 17, 25, 0.065);
    transition: 0.22s ease;
}

.appointment-card:hover {
    border-color: rgba(198, 165, 107, 0.48);
    box-shadow: 0 16px 36px rgba(31, 17, 25, 0.1);
    transform: translateY(-2px);
}

.appointment-card.completed {
    border-left-color: var(--success);
}

.appointment-card.cancelled {
    border-left-color: var(--danger);
    opacity: 0.78;
}

.appointment-time strong {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
}

.appointment-time span {
    color: var(--text-medium);
    font-size: 0.68rem;
}

.status-badge {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-badge.confirmed {
    color: #795724;
    background: var(--champagne-soft);
    border: 1px solid rgba(198, 165, 107, 0.28);
}

.status-badge.completed {
    color: #45634d;
    background: var(--success-light);
}

.status-badge.cancelled {
    color: #8c4049;
    background: var(--danger-light);
}

.appointment-customer h3 {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.appointment-customer a {
    color: #8b6731;
    font-size: 0.77rem;
}

.appointment-service {
    background: rgba(245, 234, 210, 0.44);
    border: 1px solid rgba(198, 165, 107, 0.16);
    border-radius: 13px;
}

.appointment-service span,
.appointment-note {
    color: var(--text-medium);
}

.appointment-service strong {
    color: var(--primary-dark);
}

.appointment-note {
    background: rgba(248, 242, 233, 0.7);
    border-radius: 10px;
}

.appointment-actions {
    gap: 9px;
}

.action-button {
    min-height: 43px;
    border-radius: 11px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.complete-button {
    color: #fffaf1;
    background: var(--primary-dark);
    border: 1px solid var(--primary-dark);
}

.complete-button:hover {
    background: #432a38;
}

.cancel-button {
    color: var(--danger);
    background: transparent;
    border: 1px solid rgba(164, 79, 89, 0.28);
}

.cancel-button:hover {
    background: var(--danger-light);
}

.empty-state {
    padding: 45px 24px;
    background: rgba(255, 253, 249, 0.75);
    border: 1px dashed rgba(198, 165, 107, 0.38);
    border-radius: 22px;
}

.empty-state span {
    filter: grayscale(1) sepia(0.2);
}

.empty-state h2 {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.7rem;
}

/* Month calendar */

.month-view {
    padding: 0;
}

.calendar-weekdays {
    margin-top: 20px;
    color: #8c6932;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.month-calendar {
    gap: 8px;
}

.calendar-day,
.calendar-empty-day {
    min-height: 88px;
    background: rgba(255, 253, 249, 0.88);
    border: 1px solid rgba(105, 80, 88, 0.13);
    border-radius: 13px;
}

.calendar-day {
    transition: 0.2s ease;
}

.calendar-day:hover {
    border-color: var(--champagne);
    box-shadow: 0 8px 20px rgba(31, 17, 25, 0.08);
    transform: translateY(-2px);
}

.calendar-day.today {
    border: 2px solid var(--champagne);
    box-shadow: 0 0 0 4px rgba(198, 165, 107, 0.1);
}

.calendar-day.has-appointments {
    background: linear-gradient(145deg, #f9efd9, #fffaf1);
}

.calendar-day.closed {
    background: rgba(229, 222, 218, 0.64);
}

.calendar-day.blocked {
    background:
        linear-gradient(145deg, rgba(36, 24, 32, 0.96), rgba(69, 38, 57, 0.94));
    border-color: rgba(198, 165, 107, 0.42);
    box-shadow: 0 8px 18px rgba(31, 17, 25, 0.13);
}

.calendar-day.blocked .calendar-day-number {
    color: #fffaf1;
}

.calendar-day.blocked .calendar-appointment-count {
    color: var(--champagne-light);
}

.calendar-day-number {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.14rem;
    font-weight: 700;
}

.calendar-appointment-count {
    color: #805d29;
    font-size: 0.58rem;
    line-height: 1.25;
}

.calendar-legend {
    color: var(--text-medium);
}

.legend-today {
    border-color: var(--champagne);
}

.legend-booked {
    background: var(--champagne-soft);
}

.legend-blocked {
    background: var(--primary-dark);
    border: 1px solid rgba(198, 165, 107, 0.55);
}

/* Forms and modal */

.form-field label {
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field select,
.form-field textarea {
    min-height: 52px;
    padding: 14px 15px;
    color: var(--text-dark);
    background: rgba(255, 253, 249, 0.92);
    border: 1px solid rgba(105, 80, 88, 0.18);
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(31, 17, 25, 0.025);
}

.form-field textarea {
    min-height: 100px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--champagne);
    box-shadow: 0 0 0 4px rgba(198, 165, 107, 0.12);
}

.form-message {
    color: var(--danger);
}

.modal-overlay {
    padding: 22px;
    background: rgba(14, 8, 12, 0.72);
    backdrop-filter: blur(12px);
}

.modal {
    max-width: 560px;
    padding: 28px;
    background: linear-gradient(145deg, #fffdf9, #f8f2e9);
    border: 1px solid rgba(234, 215, 170, 0.42);
    border-radius: 26px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
}

.modal-header h2 {
    color: var(--primary-dark);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
}

.close-modal-button {
    width: 42px;
    height: 42px;
    color: var(--primary-dark);
    background: var(--champagne-soft);
    border: 1px solid rgba(198, 165, 107, 0.22);
    border-radius: 50%;
}

.close-modal-button:hover {
    color: #fffaf1;
    background: var(--primary-dark);
}

/* Responsive */

@media (max-width: 760px) {
    .admin-header {
        padding-inline: 16px;
    }

    .admin-main {
        padding: 26px 16px 52px;
    }

    .dashboard-heading {
        align-items: stretch;
        padding: 24px 20px;
    }

    .dashboard-heading .primary-button {
        width: 100%;
        margin-top: 20px;
    }

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

    .statistic-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        min-height: 126px;
        padding: 15px;
    }

    .appointment-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .status-filters {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .filter-button {
        padding-inline: 6px;
    }

    .calendar-day,
    .calendar-empty-day {
        min-height: 72px;
    }
}

@media (max-width: 520px) {
    .admin-header .brand-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .admin-header .logo-text strong {
        font-size: 1.25rem;
    }

    .admin-header .logo-text small,
    .admin-badge {
        display: none;
    }

    .login-card {
        padding: 31px 21px 34px;
    }

    .dashboard-heading h1 {
        font-size: 2.55rem;
    }

    .view-switcher {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .view-button {
        min-width: 0;
    }

    .date-navigation,
    .month-navigation {
        padding: 15px 12px;
    }

    .selected-date strong,
    .selected-month h2 {
        font-size: 1.25rem;
    }

    .daily-statistics {
        gap: 8px;
    }

    .day-availability-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 16px;
    }

    .block-day-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .statistic-card {
        min-height: 115px;
        padding: 12px 10px;
    }

    .statistic-icon {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 0.72rem;
    }

    .statistic-card strong {
        font-size: 1.35rem;
    }

    .statistic-card div span {
        font-size: 0.56rem;
    }

    .status-filters {
        overflow-x: auto;
    }

    .filter-button {
        min-width: 68px;
        font-size: 0.61rem;
    }

    .appointment-card {
        padding: 17px;
    }

    .calendar-weekdays {
        font-size: 0.52rem;
    }

    .month-calendar {
        gap: 4px;
    }

    .calendar-day,
    .calendar-empty-day {
        min-height: 61px;
        padding: 6px 3px;
        border-radius: 9px;
    }

    .calendar-appointment-count {
        font-size: 0.48rem;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        width: 100%;
        max-height: 92svh;
        padding: 24px 18px max(26px, env(safe-area-inset-bottom));
        border-radius: 26px 26px 0 0;
    }
}

@media (max-width: 370px) {
    .admin-logo .logo-text small {
        display: none;
    }

    .logout-button {
        padding-inline: 9px;
    }

    .daily-statistics {
        grid-template-columns: 1fr;
    }

    .statistic-card {
        flex-direction: row;
        align-items: center;
        min-height: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ========================================
   DIGITAL NEST DEMO
========================================= */
.demo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 16px;
    color: #fff7e6;
    background: linear-gradient(90deg, #26131f, #4d2638, #26131f);
    border-bottom: 1px solid rgba(225, 187, 111, 0.45);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-align: center;
}

.demo-banner strong {
    color: #e7c77d;
    letter-spacing: 0.08em;
}

.demo-login-note {
    margin: 14px 0 0;
    color: #7b6870;
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 520px) {
    .demo-banner {
        flex-direction: column;
        gap: 2px;
        padding: 7px 12px;
        font-size: 0.72rem;
    }
}
