:root {
    --bg: #0c0b0a;
    --bg-accent: #13100d;
    --surface: #171411;
    --surface-alt: #201a15;
    --text-primary: #f4eee6;
    --text-secondary: #bea98d;
    --accent: #c39a63;
    --accent-hover: #d3ac77;
    --accent-soft: rgba(195, 154, 99, 0.15);
    --success: #53b77a;
    --warning: #deab59;
    --danger: #cf6f62;
    --border: #3a2d22;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-heading: 'Oswald', 'Playfair Display', serif;
    --font-body: 'Open Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% -10%, rgba(195, 154, 99, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(195, 154, 99, 0.1) 0%, transparent 40%),
        var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.45;
    overflow-x: hidden;
    padding-bottom: 0;
}

h1,
h2,
h3,
.brand {
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(14px);
    background: rgba(10, 9, 8, 0.94);
    border-bottom: 1px solid rgba(195, 154, 99, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
}

.brand {
    font-size: 1.35rem;
    color: #f6f0e8;
    font-weight: 700;
}

.brand span {
    color: var(--accent);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    color: var(--accent);
    flex-shrink: 0;
}

main.container {
    padding-top: 32px;
    padding-bottom: 24px;
}

.page-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.page-title {
    font-size: clamp(1.45rem, 2.8vw, 1.95rem);
    line-height: 1.1;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(34, 27, 21, 0.9), rgba(20, 16, 13, 0.95));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 14px;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 6px;
    color: #f8ede0;
}

section {
    margin-bottom: 16px;
}

.dashboard-columns {
    display: grid;
    gap: 16px;
    margin-top: 2rem;
}

.section-heading {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.04rem;
}

.section-link {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(195, 154, 99, 0.22);
    border-radius: 999px;
    padding: 0 10px;
    background: rgba(195, 154, 99, 0.08);
    color: #e7c79f;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.section-link:hover {
    border-color: rgba(195, 154, 99, 0.46);
    background: rgba(195, 154, 99, 0.14);
    color: #f5dfc3;
}

.card {
    background: linear-gradient(180deg, rgba(31, 25, 20, 0.88), rgba(20, 16, 13, 0.94));
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}

.card-content {
    padding: 14px;
}

.list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(195, 154, 99, 0.12);
}

.list-item:last-child {
    border-bottom: none;
}

.item-time {
    min-width: 56px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.item-main {
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.item-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-sub {
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-meta {
    margin-top: 4px;
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.payment-list-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.payment-amount {
    color: #f8ede0;
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-badge-sm {
    padding: 3px 8px;
    font-size: 0.56rem;
    letter-spacing: 0.04em;
}

.status-pending {
    background: rgba(222, 171, 89, 0.18);
    color: #f0be76;
}

.status-completed {
    background: rgba(83, 183, 122, 0.16);
    color: #7ce2a2;
}

.status-in_progress {
    background: var(--accent-soft);
    color: #e4bd8a;
}

.status-cancelled,
.status-no_show,
.status-no-show {
    background: rgba(207, 111, 98, 0.17);
    color: #f09e92;
}

.status-active {
    background: rgba(83, 183, 122, 0.16);
    color: #7ce2a2;
}

.status-inactive {
    background: rgba(190, 169, 141, 0.15);
    color: #ccb89e;
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #16100b;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #160d0b;
}

.btn-danger:hover {
    background: #e08375;
    border-color: #e08375;
}

.btn-outline {
    background: rgba(195, 154, 99, 0.04);
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: #6a5137;
    background: rgba(195, 154, 99, 0.12);
}

.btn-soft {
    background: rgba(195, 154, 99, 0.18);
    color: #f0cc9e;
    border-color: rgba(195, 154, 99, 0.34);
}

.btn-sm {
    padding: 7px 10px;
    font-size: 0.75rem;
    border-radius: 9px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
}

.btn-lg {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.92rem;
}

.fab {
    position: fixed;
    right: 16px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: var(--accent);
    color: #16100b;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 240;
    font-size: 1.1rem;
}

.fab-stack {
    position: fixed;
    right: 16px;
    bottom: 18px;
    display: grid;
    gap: 10px;
    z-index: 240;
}

.fab-stack .fab {
    position: static;
}

.fab-soft {
    background: #2b221a;
    border: 1px solid rgba(195, 154, 99, 0.4);
    color: #e8c9a0;
}

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

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
}

.check-row input {
    width: auto;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.custom-date-field[hidden] {
    display: none;
}

.label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 11px;
    color: var(--text-primary);
    background: rgba(22, 17, 13, 0.9);
    font-size: 16px;
    line-height: 1.35;
    font-family: inherit;
}

input[type="checkbox"] {
    width: auto;
    border-radius: 4px;
    accent-color: var(--accent);
    padding: 0;
}

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

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #936f46;
    box-shadow: 0 0 0 3px rgba(195, 154, 99, 0.18);
}

.inline-fields {
    display: grid;
    gap: 10px;
}

.quick-note {
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed rgba(195, 154, 99, 0.42);
    color: var(--text-secondary);
    font-size: 0.77rem;
    background: rgba(195, 154, 99, 0.07);
}

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

.service-option {
    background: rgba(20, 16, 13, 0.88);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: inherit;
}

.service-option strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.service-option span {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.service-option.selected {
    border-color: var(--accent);
    background: rgba(195, 154, 99, 0.16);
}

.empty-state {
    padding: 28px 14px;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed rgba(195, 154, 99, 0.34);
    border-radius: var(--radius-md);
    background: rgba(195, 154, 99, 0.05);
}

.empty-state i {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #8f7354;
}

.progress-row {
    margin-bottom: 10px;
}

.progress-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.83rem;
    margin-bottom: 6px;
}

.progress-track {
    height: 8px;
    background: rgba(195, 154, 99, 0.16);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #9e7748, #c39a63);
    border-radius: inherit;
}

.bottom-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    background: rgba(25, 20, 16, 0.72);
    border: 1px solid rgba(195, 154, 99, 0.16);
    border-radius: 16px;
    z-index: 300;
    padding: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 700;
    min-height: 48px;
    border-radius: 12px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

button.nav-item {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.nav-form {
    margin: 0;
    min-width: 0;
}

.nav-form .nav-item {
    width: 100%;
}

.nav-item i {
    font-size: 1.04rem;
}

.nav-item.active {
    color: #120e0a;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    box-shadow: 0 8px 18px rgba(195, 154, 99, 0.2);
}

.nav-direct-overflow {
    display: none;
}

.nav-more {
    position: relative;
    min-width: 0;
}

.nav-more-toggle {
    position: relative;
    overflow: hidden;
}

.nav-more-toggle i {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(195, 154, 99, 0.12);
    box-shadow: inset 0 0 0 1px rgba(195, 154, 99, 0.16);
}

.nav-more-toggle:hover,
.nav-more-toggle[aria-expanded="true"] {
    color: var(--accent);
    background: rgba(195, 154, 99, 0.1);
}

.nav-more-toggle.active i,
.nav-more-toggle[aria-expanded="true"] i {
    color: #120e0a;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    box-shadow: 0 8px 16px rgba(195, 154, 99, 0.22);
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 196px;
    max-width: calc(100vw - 24px);
    padding: 7px;
    border: 1px solid rgba(195, 154, 99, 0.24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(34, 27, 21, 0.98), rgba(20, 16, 13, 0.98));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    z-index: 360;
    transform-origin: top right;
}

.nav-more-menu:not([hidden]) {
    animation: menuReveal 0.16s ease-out;
}

.nav-more-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(195, 154, 99, 0.24);
    border-left: 1px solid rgba(195, 154, 99, 0.24);
    background: rgba(34, 27, 21, 0.98);
    transform: rotate(45deg);
}

.nav-more-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 11px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

button.nav-more-item {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.nav-more-item i {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--accent);
    background: rgba(195, 154, 99, 0.1);
}

.nav-more-item.active,
.nav-more-item:hover {
    color: #f4eee6;
    background: rgba(195, 154, 99, 0.14);
    transform: translateX(2px);
}

.nav-more-item.active i,
.nav-more-item:hover i {
    color: #120e0a;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
}

@keyframes menuReveal {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast {
    position: fixed;
    top: 16px;
    right: 16px;
    left: auto;
    width: min(420px, calc(100vw - 32px));
    margin: 0;
    background: #2a2119;
    color: #f4eee6;
    border: 1px solid rgba(195, 154, 99, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 500;
    transition: 0.5s;
}

.toast i {
    color: var(--accent);
}

.toast-error {
    border-color: rgba(217, 83, 79, 0.55);
}

.toast-error i {
    color: #ff8f8a;
}

@media (min-width: 900px) {
    .toast {
        right: 22px;
        width: 420px;
    }
}

.fade-in {
    animation: fadeIn 0.28s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.booking-hero {
    background: linear-gradient(135deg, #1d1510, #2a1d14 55%, #442f1f);
    color: #fff;
    border-radius: 0 0 18px 18px;
    border-bottom: 1px solid rgba(195, 154, 99, 0.35);
    padding: 28px 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.booking-hero h1 {
    font-size: 1.6rem;
    color: #f8efe4;
}

.booking-hero p {
    margin-top: 6px;
    color: #d1b089;
    font-size: 0.9rem;
}

.booking-shell {
    max-width: 640px;
    margin: -20px auto 0;
    padding: 0 16px 24px;
}

.success-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.success-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, rgba(33, 26, 20, 0.96), rgba(18, 14, 11, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.success-icon {
    font-size: 3.4rem;
    color: var(--success);
    margin-bottom: 12px;
}

.top-back {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: grid;
    place-items: center;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 7, 6, 0.72);
    backdrop-filter: blur(2px);
    z-index: 900;
}

.modal.is-open {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    background: linear-gradient(180deg, rgba(33, 26, 20, 0.98), rgba(18, 14, 11, 0.98));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: auto;
}

.modal-dialog-sm {
    max-width: 420px;
}

.modal-header {
    padding: 14px;
    border-bottom: 1px solid rgba(195, 154, 99, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modal-title {
    font-size: 1rem;
}

.modal-body {
    padding: 14px;
}

.barbershop-context {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(195, 154, 99, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(195, 154, 99, 0.08);
}

.barbershop-context-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.barbershop-context-name {
    color: var(--text-primary);
    font-weight: 700;
}

.barbershop-context-slug {
    color: var(--text-secondary);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.modal-actions {
    padding: 12px 14px 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-grid {
    display: grid;
    gap: 10px;
}

.detail-row {
    display: grid;
    grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(195, 154, 99, 0.12);
}

.detail-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.profile-grid {
    display: grid;
    gap: 16px;
    align-items: start;
}

.profile-panel {
    margin-bottom: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(34, 27, 21, 0.9), rgba(20, 16, 13, 0.94));
    box-shadow: var(--shadow-sm);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(195, 154, 99, 0.14);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #17100b;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    box-shadow: 0 12px 28px rgba(195, 154, 99, 0.2);
    font-size: 1.45rem;
}

.profile-form {
    margin-top: 14px;
}

.avatar-circle.active {
    border-color: rgba(195, 154, 99, 0.7);
    background: rgba(195, 154, 99, 0.16);
}

.account-menu {
    display: none;
}

.mobile-hidden {
    display: none;
}

@media (max-width: 899px) {
    body {
        background:
            linear-gradient(180deg, rgba(195, 154, 99, 0.08) 0, transparent 220px),
            var(--bg);
    }

    .container {
        width: 100%;
        padding: 0 14px;
    }

    .app-header {
        padding-top: env(safe-area-inset-top);
    }

    .header-inner {
        min-height: 62px;
    }

    .brand,
    .avatar-circle {
        display: none;
    }

    main.container {
        padding-top: 34px;
        padding-bottom: 140px;
    }

    .card {
        margin-bottom: 16px;
    }

    .stats-grid {
        gap: 16px;
        margin-bottom: 26px;
    }

    .stat-card {
        padding: 18px 14px;
    }

    section {
        margin-top: 4px;
        margin-bottom: 28px;
    }

    .dashboard-columns {
        gap: 8px;
    }

    .dashboard-columns section {
        margin-bottom: 10px;
    }

    .section-heading {
        margin-bottom: 14px;
    }

    section:last-of-type,
    .card:last-of-type,
    .empty-state:last-of-type {
        margin-bottom: 56px;
    }

    .page-header {
        align-items: flex-end;
        margin-bottom: 24px;
    }

    .page-title {
        font-size: 1.52rem;
    }

    .page-subtitle {
        font-size: 0.84rem;
    }

    .page-header > .btn {
        min-height: 42px;
        padding: 0 14px;
        border-radius: 10px;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 12px;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 44px;
        font-size: 16px !important;
    }

    .bottom-nav {
        border-radius: 14px;
        padding: 4px;
    }

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

    .nav-item {
        min-height: 46px;
        font-size: 0.59rem;
        gap: 3px;
    }

    .nav-item i {
        font-size: 0.98rem;
    }

    .list-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .appointment-list-item {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
    }

    .list-item > .row-actions,
    .list-item > .inline-actions,
    .list-item > .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .appointment-list-item > .row-actions {
        grid-column: auto;
        justify-self: end;
    }

    .modal {
        align-items: flex-end;
        padding: 10px;
    }

    .modal-dialog {
        max-height: calc(100vh - 20px);
    }

    .modal-actions {
        justify-content: stretch;
    }

    .modal-actions .btn,
    .modal-actions .inline-actions {
        flex: 1 1 auto;
    }

    .modal-actions .inline-actions .btn {
        flex: 1 1 0;
    }
}

@media (min-width: 640px) {
    .mobile-hidden {
        display: inline;
    }
}

@media (min-width: 640px) {
    .container {
        padding: 0 22px;
    }

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

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

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

@media (min-width: 900px) {
    body {
        padding-bottom: 0;
    }

    .container {
        padding: 15px 26px;
    }

    .app-shell {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        min-height: 100vh;
    }

    .app-header {
        position: sticky;
        top: 0;
        height: 100vh;
        border-right: 1px solid rgba(195, 154, 99, 0.18);
        border-bottom: none;
        background: rgba(12, 10, 8, 0.94);
    }

    .header-inner {
        min-height: 100%;
        height: 100%;
        padding: 24px 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 16px;
    }

    .content-shell {
        padding-bottom: 20px;
    }

    .account-menu {
        width: 100%;
        margin-top: auto;
        display: grid;
        gap: 6px;
        padding-top: 14px;
        border-top: 1px solid rgba(195, 154, 99, 0.14);
    }

    .account-menu-item {
        width: 100%;
    }

    .bottom-nav {
        position: static;
        border: none;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        grid-template-columns: 1fr;
        gap: 6px;
        width: 100%;
    }

    .nav-more-menu {
        top: 0;
        left: calc(100% + 8px);
        right: auto;
        transform-origin: top left;
    }

    .nav-direct-overflow {
        display: flex;
    }

    .nav-mobile-only {
        display: none;
    }

    .nav-more {
        display: none;
    }

    .nav-more-menu::before {
        top: 16px;
        left: -6px;
        right: auto;
    }

    .nav-item {
        min-height: 44px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 0.82rem;
        gap: 8px;
    }

    .nav-item.active {
        color: var(--accent);
        background: rgba(195, 154, 99, 0.15);
        box-shadow: none;
    }

    main.container {
        padding-top: 36px;
        padding-bottom: 26px;
    }

    .dashboard-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .profile-grid {
        grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    }

    .fab {
        bottom: 24px;
    }

    .fab-stack {
        bottom: 24px;
    }
}
