/**
 * SalonSync Admin Dashboard Styles
 * Version: 1.0
 *
 * Additional styles specific to the admin dashboard
 */

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

/* Radzen appends menus/calendars to body with an inline z-index of 2000.
   While an SsModal is open, its backdrop must not cover those portal popups. */
body:has(.modal-backdrop) .rz-popup {
    z-index: calc(var(--z-index-modal) + 1) !important;
}

.report-details-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: var(--spacing-md);
}

.report-details-summary dt { color: var(--text-secondary); }
.report-details-summary dd { margin: 0; overflow-wrap: anywhere; }
.report-preview-table-wrapper { max-width: 100%; overflow-x: auto; margin-bottom: var(--spacing-md); }
.report-preview-table { width: 100%; border-collapse: collapse; }
.report-preview-table th, .report-preview-table td {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    white-space: nowrap;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--surface-page);
}

.sidebar {
    width: 260px;
    background-color: var(--surface-sidebar);
    color: var(--text-inverse);
    padding: var(--spacing-lg);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(248, 250, 252, 0.08);
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary-turquoise) 0%, var(--color-primary-magenta) 100%);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 18px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-item {
    margin-bottom: var(--spacing-xs);
}

.sidebar-nav-item-sub .sidebar-nav-link {
    padding-left: calc(var(--spacing-md) + 1.5rem);
    font-size: 0.95em;
}

.sidebar-nav-group {
    margin-bottom: var(--spacing-xs);
}

.sidebar-nav-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(248, 250, 252, 0.76);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.25;
    text-align: left;
    min-height: 44px;
    transition: var(--transition-all);
}

.sidebar-nav-header:hover,
.sidebar-nav-header:focus-visible {
    background-color: var(--surface-sidebar-hover);
    color: var(--text-inverse);
    outline: none;
    box-shadow: none;
}

.sidebar-nav-group.expanded > .sidebar-nav-header {
    background-color: rgba(248, 250, 252, 0.06);
    color: var(--text-inverse);
}

.sidebar-nav-label {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav-header-chevron {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: rgba(248, 250, 252, 0.62);
    font-size: 1rem;
    line-height: 1;
    transition: transform var(--transition-fast);
}

.sidebar-nav-group.expanded .sidebar-nav-header-chevron {
    transform: rotate(180deg);
    color: var(--text-inverse);
}

.sidebar-nav-sublist {
    list-style: none;
    margin: var(--spacing-xs) 0 var(--spacing-sm);
    padding: 0 0 0 calc(var(--spacing-md) + 1rem);
    border-left: 1px solid rgba(248, 250, 252, 0.1);
}

.sidebar-nav-sublist .sidebar-nav-link {
    min-height: 38px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    gap: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    color: rgba(248, 250, 252, 0.76);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: var(--transition-all);
}

.sidebar-nav-link:hover {
    background-color: var(--surface-sidebar-hover);
    color: var(--text-inverse);
    text-decoration: none;
}

.sidebar-nav-link.active {
    background-color: var(--surface-sidebar-active);
    color: var(--text-on-accent);
    box-shadow: 0 10px 24px -12px var(--brand-primary-subtle);
}

.sidebar-nav-icon {
    font-size: 20px;
    width: 24px;
    flex: 0 0 24px;
    text-align: center;
    line-height: 1;
}

.mobile-nav-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--border-default);
    border-radius: var(--border-radius-md);
    background: var(--surface-card);
    color: var(--text-primary);
}

.mobile-nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-index-fixed) - 1);
    border: 0;
    background: rgba(15, 23, 42, 0.42);
}
