/* ==========================================================================
   Luxe Glo Admin Suite Styles
   ========================================================================== */

/* Admin Layout */
.admin-sidebar {
    width: 280px;
    background: var(--surface);
    padding: 3rem 2rem;
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow-subtle);
}

/* Desktop brand + notification row (hidden on mobile via .desktop-only) */
.admin-sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ---- Notification panel ---- */
.notif-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: transparent;
}

.notif-panel {
    position: fixed;
    top: 4.25rem;
    right: 1rem;
    width: min(360px, calc(100vw - 1.5rem));
    max-height: min(70vh, 480px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 901px) {
    .notif-panel {
        top: 5.5rem;
        left: 1.5rem;
        right: auto;
    }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.notif-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.15rem;
    padding: 0.25rem;
    line-height: 1;
    border-radius: var(--radius-sm);
}

.notif-panel-close:hover {
    color: var(--text-main);
    background: var(--surface-hover);
}

.notif-panel-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.4rem 0;
}

.notif-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.1rem;
    cursor: pointer;
    color: inherit;
    transition: background 0.15s ease;
}

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

.notif-item:hover {
    background: var(--surface-hover);
}

.notif-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-light, #f5f0eb);
    color: var(--accent, #8b6914);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: var(--surface-hover);
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.notif-panel-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 4rem 5rem;
    width: calc(100% - 280px);
    background: var(--bg);
    min-height: 100vh;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 3rem;
    flex: 1;
    overflow-y: auto;
}

.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    font-weight: 500;
}

.admin-link i {
    font-size: 1.25rem;
}

.admin-link:hover,
.admin-link.active {
    background: var(--surface-hover);
    color: var(--text-main);
    font-weight: 600;
}

.admin-link.active {
    background: var(--accent-light);
    color: var(--accent-hover);
}

/* Data Tables & Groups */
.date-section {
    margin-bottom: 2.5rem;
}

.date-header {
    font-size: 1.6rem;
    font-family: var(--font-serif);
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.date-badge {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    background: var(--surface-hover);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-subtle);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.data-table th {
    text-align: left;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    background: var(--surface-hover);
    white-space: nowrap;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    vertical-align: top;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: rgba(248, 244, 240, 0.4);
}

/* Status Badges & Selects */
.status-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    background: var(--surface);
    outline: none;
    margin-bottom: 0.5rem;
    cursor: pointer;
    width: 100%;
    max-width: 140px;
    min-height: 38px;
    font-weight: 500;
    transition: var(--transition);
}

.status-select:focus {
    border-color: var(--accent);
}

.status-paid {
    background: var(--success-bg) !important;
    color: var(--success) !important;
    border-color: #CEEAD6 !important;
    font-weight: 600;
}

.status-unpaid {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
    border-color: #FAD2CF !important;
    font-weight: 600;
}

/* Search Bar */
.search-bar-wrap {
    position: relative;
    margin-bottom: 2rem;
}

.search-bar-wrap i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    pointer-events: none;
}

.search-bar-wrap input {
    padding-left: 3rem;
}

/* Admin Responsive */
@media (max-width: 900px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        padding: 0;
        z-index: 1002;
        background: transparent;
        box-shadow: none;
    }

    .admin-sidebar .mobile-header {
        border-bottom: 1px solid var(--border);
    }

    .admin-nav {
        width: 100%;
        margin-top: 0;
        padding: 0 1.5rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: var(--transition);
    }

    .admin-nav.open {
        max-height: 600px;
        opacity: 1;
        padding: 1rem 1.5rem;
        overflow-y: auto;
    }

    .admin-main {
        margin-left: 0;
        padding: 2.5rem 1.5rem;
        width: 100%;
    }

    .table-responsive {
        background: transparent;
        border: none;
        padding: 0;
        margin-bottom: 1rem;
        overflow: visible;
        box-shadow: none;
    }

    .data-table {
        min-width: 100%;
        display: block;
        border: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        margin-bottom: 1.5rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-subtle);
        overflow: hidden;
    }

    .data-table td {
        text-align: left !important;
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem;
    }

    .data-table td:last-child {
        border-bottom: none;
        background: var(--surface-hover);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .status-select {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .admin-main {
        padding: 1.5rem 1rem;
    }
}

/* ==========================================================================
   Dashboard Overview Cards
   ========================================================================== */

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 2.25rem;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.dash-card:hover .dash-card-link i {
    transform: translateX(4px);
}

.dash-card:hover .dash-card-icon {
    transform: scale(1.08);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dash-card-title {
    font-size: 0.8rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.dash-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--surface-hover);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.dash-card-value {
    font-size: 2.75rem;
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.dash-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dash-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.dash-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.dash-card-link i {
    transition: transform 0.2s ease;
}

/* Dashboard Quick Nav Mini-Cards */
.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.dash-quick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.15rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
}

.dash-quick-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    background: var(--surface-hover);
}

.dash-quick-card:hover .dash-quick-icon {
    background: var(--accent);
    color: var(--surface);
}

.dash-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--surface-hover);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.dash-quick-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.dash-quick-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Admin Modal Dialog (Manual Appointments & Tools)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 22, 17, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.25s ease-out;
    overflow-y: auto;
}

.modal-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(30, 22, 17, 0.35);
    display: flex;
    flex-direction: column;
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    margin: auto;
}

.modal-header {
    padding: 1.75rem 2.25rem 1.25rem 2.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--text-main);
    background: var(--surface-hover);
}

.modal-body {
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .modal-grid-2col {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .modal-container {
        padding: 0;
    }
    .modal-header, .modal-body, .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.modal-footer {
    padding: 1.25rem 2.25rem 1.75rem 2.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--surface);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.admin-main, .admin-main > div, .admin-main .avatar-grid, .admin-main .product-grid {
    min-width: 0;
}
.roster-table { min-width: 500px; }
@media (max-width: 900px) {
    .roster-table { min-width: 100%; width: 100%; }
    .data-table td { overflow-wrap: anywhere; }
}
@media (max-width: 400px) {
    .admin-main .avatar-grid { grid-template-columns: minmax(0, 1fr); }
    .modal-backdrop { padding: 0.5rem; }
    .modal-header, .modal-body, .modal-footer { padding-left: 1rem; padding-right: 1rem; }
    .modal-footer { flex-wrap: wrap; }
}
.modal-backdrop { height: 100dvh; }
.modal-container { max-height: 92dvh; }
