/* =========================================================
   DESIGN TOKENS
   A calm, modern "operational" admin theme — cool neutrals,
   one confident indigo accent, soft elevation instead of
   heavy borders. Replaces the old flat/cream admin-template look.
   ========================================================= */
:root {
    /* Surfaces */
    --surface-page: #f6f7fb;
    --surface-card: #ffffff;
    --surface-sunken: #f8f9fc;
    --surface-overlay: rgba(15, 18, 30, 0.55);

    /* Borders */
    --border-subtle: #e9eaf1;
    --border-default: #dfe1ea;
    --border-strong: #c7cad9;

    /* Text */
    --text-primary: #14161f;
    --text-secondary: #565a6e;
    --text-muted: #8b8fa3;
    --text-inverse: #ffffff;

    /* Accent (indigo) */
    --accent-50: #eef1ff;
    --accent-100: #e0e4ff;
    --accent-500: #4f46e5;
    --accent-600: #4338ca;
    --accent-700: #372da3;

    /* Semantic */
    --success-50: #ecfdf5;
    --success-600: #059669;
    --success-700: #047857;
    --warning-50: #fffbeb;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --danger-50: #fef2f2;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    --info-50: #eff6ff;
    --info-600: #2563eb;

    /* Radius */
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-full: 999px;

    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(20, 22, 31, 0.04);
    --shadow-sm: 0 1px 2px rgba(20, 22, 31, 0.05), 0 1px 1px rgba(20, 22, 31, 0.03);
    --shadow-md: 0 4px 14px -4px rgba(20, 22, 31, 0.10), 0 2px 6px -2px rgba(20, 22, 31, 0.06);
    --shadow-lg: 0 16px 40px -12px rgba(20, 22, 31, 0.22), 0 4px 12px -4px rgba(20, 22, 31, 0.10);
    --shadow-modal: 0 24px 60px -16px rgba(15, 18, 30, 0.35), 0 8px 24px -8px rgba(15, 18, 30, 0.15);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    background-color: var(--surface-page);
    color: var(--text-primary);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    border-radius: var(--r-md);
    padding: 0.55rem 1.05rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition: background-color .15s var(--ease-standard), border-color .15s var(--ease-standard),
        box-shadow .15s var(--ease-standard), transform .1s var(--ease-standard), color .15s var(--ease-standard);
}

.btn:active {
    transform: translateY(0.5px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--accent-500);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.btn-primary {
    background: var(--accent-500);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(79, 70, 229, .25), 0 2px 8px -2px rgba(79, 70, 229, .35);
}

.btn-primary:hover {
    background: var(--accent-600);
}

.btn-secondary {
    border-color: var(--border-default);
    background: var(--surface-card);
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-danger {
    background: var(--danger-600);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(220, 38, 38, .25);
}

.btn-danger:hover {
    background: var(--danger-700);
}

.btn-danger-outline {
    border-color: #fecaca;
    background: transparent;
    color: var(--danger-600);
}

.btn-danger-outline:hover {
    background: var(--danger-50);
    border-color: var(--danger-600);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success-600);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(5, 150, 105, .25);
}

.btn-success:hover {
    background: var(--success-700);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--r-sm);
}

.btn-xs {
    padding: 0.3rem 0.6rem;
    font-size: 0.6875rem;
    border-radius: var(--r-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}

/* =========================================================
   CARDS
   ========================================================= */
.card,
.metric-card {
    border-radius: var(--r-lg);
    border: 1px solid var(--border-subtle);
    background: var(--surface-card);
    box-shadow: var(--shadow-xs);
    padding: 1.25rem;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.metric-card .metric-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.metric-card .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.metric-card .metric-sub {
    margin-top: .25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================================
   STATUS PILLS / BADGES
   ========================================================= */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
    border-radius: var(--r-full);
    padding: .2rem .65rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.status-pill::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
}

.status-pill-success {
    background: var(--success-50);
    color: var(--success-700);
}

.status-pill-warning {
    background: var(--warning-50);
    color: var(--warning-700);
}

.status-pill-danger {
    background: var(--danger-50);
    color: var(--danger-700);
}

.status-pill-neutral {
    background: var(--surface-sunken);
    color: var(--text-secondary);
}

/* =========================================================
   NAV / SIDEBAR / TOPBAR
   ========================================================= */
.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: var(--r-sm);
    padding: .55rem .75rem;
    font-size: .875rem;
    color: var(--text-secondary);
    transition: background-color .15s var(--ease-standard), color .15s var(--ease-standard);
}

.nav-item:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.nav-item-active {
    background: var(--accent-50);
    font-weight: 600;
    color: var(--accent-600);
}

.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 16rem;
    background: var(--surface-card);
    border-right: 1px solid var(--border-subtle);
}

@media (max-width: 767px) {

    .sidebar,
    .sidebar.hidden {
        display: none !important;
    }
}

.sidebar-brand {
    display: flex;
    height: 4rem;
    flex-shrink: 0;
    align-items: center;
    gap: .5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1.25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: 4rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 0 1rem;
}

@media (min-width:768px) {
    .topbar {
        padding: 0 1.5rem;
    }
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Sidebar categories & sub items */
.sidebar-category {
    margin-bottom: .75rem;
}

.sidebar-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .5rem .75rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    border-radius: var(--r-sm);
    cursor: pointer;
    user-select: none;
    background: transparent;
    border: none;
    text-align: left;
    transition: all .15s var(--ease-standard);
}

.sidebar-category-header:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.sidebar-category-chevron {
    width: 1rem;
    height: 1rem;
    transition: transform .2s var(--ease-standard);
    color: var(--text-muted);
}

.sidebar-category-collapsed .sidebar-category-chevron {
    transform: rotate(-90deg);
}

.sidebar-category-items {
    margin-top: .25rem;
    padding-left: .5rem;
    display: flex;
    flex-direction: column;
    gap: .125rem;
}

.sidebar-category-collapsed .sidebar-category-items {
    display: none;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .4375rem .75rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: all .15s var(--ease-standard);
}

.nav-sub-item:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.nav-sub-item-active {
    background: var(--accent-50);
    color: var(--accent-600);
    font-weight: 600;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-card);
    margin-top: auto;
}

.sidebar-footer-user {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-width: 0;
    flex: 1;
}

.sidebar-footer-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--accent-50);
    color: var(--accent-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-footer-name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .375rem;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all .15s var(--ease-standard);
}

.sidebar-footer-logout:hover {
    color: var(--danger-600);
    background: var(--danger-50);
}

/* User menu dropdown */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem .625rem .375rem .375rem;
    border-radius: var(--r-full);
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all .15s var(--ease-standard);
}

.user-menu-btn:hover {
    background: var(--accent-50);
    border-color: var(--accent-100);
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    width: 13rem;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: .375rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    transform-origin: top right;
    animation: pop-in .14s var(--ease-out) both;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(.96) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.user-dropdown-hidden {
    display: none !important;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .5rem .625rem;
    font-size: .8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-align: left;
    transition: background-color .12s var(--ease-standard);
}

.user-dropdown-item:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

.user-dropdown-item-danger {
    color: var(--danger-600);
}

.user-dropdown-item-danger:hover {
    background: var(--danger-50);
}

/* =========================================================
   DATA TABLE
   ========================================================= */
table.data-table,
.data-table {
    width: 100%;
    text-align: left;
    font-size: .8125rem;
    border-collapse: collapse;
}

.data-table thead th,
table.data-table thead th {
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-sunken);
    padding: .7rem 1rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table tbody td,
table.data-table tbody td {
    border-bottom: 1px solid var(--border-subtle);
    padding: .75rem 1rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:last-child td,
table.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr,
table.data-table tbody tr {
    transition: background-color .1s var(--ease-standard);
}

.data-table tbody tr:hover,
table.data-table tbody tr:hover {
    background: var(--surface-sunken);
}

/* =========================================================
   FORMS
   ========================================================= */
.form-input {
    width: 100%;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    padding: .55rem .75rem;
    font-size: .8125rem;
    color: var(--text-primary);
    transition: border-color .15s var(--ease-standard), box-shadow .15s var(--ease-standard);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent-500);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-100);
}

.form-label {
    margin-bottom: .3rem;
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.form-error {
    margin-top: .25rem;
    font-size: .75rem;
    color: var(--danger-600);
}

/* =========================================================
   STACKED CARD
   ========================================================= */
.stacked-card {
    border-radius: var(--r-lg);
    border: 1px solid var(--border-subtle);
    background: var(--surface-card);
    padding: 1rem;
}

.stacked-card> :not([hidden])~ :not([hidden]) {
    margin-top: .5rem;
}

.stacked-card .stacked-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: .875rem;
}

.stacked-card .stacked-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
}

.stacked-card .stacked-value {
    text-align: right;
    color: var(--text-primary);
}

/* =========================================================
   FLASH MESSAGES
   ========================================================= */
.flash {
    margin-bottom: 1rem;
    /* display: flex; */
    align-items: center;
    gap: .75rem;
    border-radius: var(--r-md);
    padding: .75rem 1rem;
    font-size: .875rem;
}

.flash-success {
    border: 1px solid #bbf7d0;
    background: var(--success-50);
    color: var(--success-700);
}

.flash-warning {
    border: 1px solid #fde68a;
    background: var(--warning-50);
    color: var(--warning-700);
}

.flash-error {
    border: 1px solid #fecaca;
    background: var(--danger-50);
    color: var(--danger-700);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.pagination-btn {
    display: inline-flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    font-size: .875rem;
    color: var(--text-secondary);
    transition: all .15s var(--ease-standard);
}

.pagination-btn:hover {
    background: var(--surface-sunken);
}

.pagination-btn-active {
    border-color: var(--accent-500);
    background: var(--accent-500);
    color: #fff;
}

.pagination-btn-active:hover {
    background: var(--accent-600);
}

.pagination-btn-disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: .4;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    margin-bottom: 1rem;
    height: 3.5rem;
    width: 3.5rem;
    color: var(--border-strong);
}

.empty-state-title {
    margin-bottom: .25rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-state-message {
    margin-bottom: 1rem;
    max-width: 24rem;
    font-size: .875rem;
    color: var(--text-muted);
}

/* =========================================================
   MODALS — the redesigned focus area
   Backdrop: soft ink + blur. Panel: rounded-2xl, real elevation,
   fade+rise entrance. Header/body/footer are visually separated
   by shadow, not by heavy hairlines. Mobile becomes a bottom sheet.
   ========================================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    padding: 24px;
    box-sizing: border-box;
    background: var(--surface-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: backdrop-in .18s var(--ease-out) both;
}

.modal-backdrop.hidden {
    display: none !important;
}

@keyframes backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-panel,
.modal {
    position: relative;
    width: min(100%, 640px);
    max-width: 100%;
    max-height: calc(100dvh - 48px);
    margin: auto;
    display: flex;
    flex-direction: column;
    background: var(--surface-card);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: var(--shadow-modal);
    flex-shrink: 0;
    animation: modal-in .22s var(--ease-out) both;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-panel.modal-sm,
.modal-sm {
    width: min(100%, 24rem);
    max-width: 24rem;
}

.modal-panel.modal-md,
.modal-md {
    width: min(100%, 34rem);
    max-width: 34rem;
}

.modal-panel.modal-lg,
.modal-lg {
    width: min(100%, 44rem);
    max-width: 44rem;
}

.modal-header {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

.modal-header h3 {
    font-size: .9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.35rem;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 1.35rem;
    background: var(--surface-card);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -8px 16px -12px rgba(20, 22, 31, .06);
    position: relative;
    z-index: 1;
}

.modal-panel input,
.modal-panel select,
.modal-panel textarea,
.modal-panel button,
.modal input,
.modal select,
.modal textarea,
.modal button {
    max-width: 100%;
    box-sizing: border-box;
}

.modal-panel #geoMapContainer {
    width: 100%;
    max-width: 100%;
    height: 240px !important;
    min-height: 180px;
}

.modal-panel .geo-map-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-panel .geo-map-search-row input {
    flex: 1 1 180px;
    min-width: 0;
}

.modal-panel .geo-coordinates {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.modal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: none;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .875rem;
    transition: background-color .15s var(--ease-standard), color .15s var(--ease-standard);
}

.modal-close-btn:hover {
    background: var(--surface-sunken);
    color: var(--text-primary);
}

/* Tablet */
@media (max-width: 768px) {
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-panel,
    .modal-panel.modal-md,
    .modal-panel.modal-sm,
    .modal-panel.modal-lg,
    .modal {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 56px);
        margin: 0;
        border-radius: 20px 20px 0 0;
        animation: sheet-in .22s var(--ease-out) both;
    }

    .modal-panel .modal-header {
        padding: 1.1rem 1.15rem;
    }

    .modal-panel .modal-body {
        padding: 1.1rem 1.15rem;
    }

    .modal-panel .modal-footer {
        padding: .85rem 1.15rem calc(.85rem + env(safe-area-inset-bottom));
    }
}

@keyframes sheet-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .modal-panel .modal-footer {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .modal-panel .modal-footer button {
        flex: 1 1 auto;
    }

    .modal-panel .geo-coordinates {
        grid-template-columns: 1fr;
    }

    .modal-panel .geo-map-search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
    }

    .modal-panel .geo-map-search-row input {
        min-width: 0;
        width: 100%;
    }

    .modal-panel #geoMapContainer {
        height: 210px !important;
        min-height: 180px;
    }
}

@media (max-width: 360px) {

    .modal-panel .modal-header,
    .modal-panel .modal-body,
    .modal-panel .modal-footer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .modal-panel .geo-map-search-row {
        grid-template-columns: 1fr auto;
    }

    .modal-panel .geo-map-search-row input {
        grid-column: 1 / -1;
    }

    .modal-panel #geoMapContainer {
        height: 190px !important;
    }
}

/* Password toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-input {
    padding-right: 2.75rem;
    flex: 1;
}

.password-toggle-btn {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: color .15s var(--ease-standard);
    padding: 0;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.password-toggle-btn:focus {
    outline: none;
    color: var(--accent-500);
}

/* Overlay / drawer (off-canvas) */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 30, .45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 40;
    transition: opacity .2s var(--ease-standard);
}

.overlay-hidden {
    opacity: 0;
    pointer-events: none;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16rem;
    background: var(--surface-card);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s var(--ease-out);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.drawer-open {
    transform: translateX(0) !important;
}