/* ==========================================================================
   SUNMORI JBCISINGA - Admin Panel CSS (Automotive Theme)
   ========================================================================== */

:root {
    --bg-dark: #0a0c10; /* Pitch Black / Asphalt */
    --bg-sidebar: #11141d; /* Metallic Dark */
    --bg-card: #151821; /* Graphite Grey */
    --bg-input: #0a0c10;
    --border-color: rgba(255, 255, 255, 0.05);
    --border-accent: rgba(255, 87, 34, 0.3);
    --primary-color: #ff5722; /* Speedometer Orange/Red */
    --primary-hover: #f4511e;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --accent-yellow: #F59E0B;
    --text-light: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #475569;
    --radius-lg: 12px;
    --radius-md: 6px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    background-image: radial-gradient(rgba(255, 87, 34, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.admin-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 2px solid var(--primary-color); /* Speed line accent */
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand h2 {
    font-size: 1.1rem;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 0.1em;
    font-style: italic;
}

.sidebar-brand p {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.sidebar-user {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.user-role-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
}

.role-admin {
    background: rgba(255, 87, 34, 0.15);
    color: #FF8A65;
    border: 1px solid rgba(255, 87, 34, 0.3);
}

.role-photographer {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.25);
}

.nav-item.logout-item {
    margin-top: auto;
    color: #F87171;
}

.nav-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.15);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2.5rem;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-sidebar);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 80;
}

.admin-topbar .sidebar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 2.2rem;
    flex-shrink: 0;
}

.topbar-spacer {
    width: 2.2rem;
    flex-shrink: 0;
}

/* Hide toggle on desktop — sidebar always visible */
@media (min-width: 901px) {
    .sidebar-toggle {
        visibility: hidden;
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(3px);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }
    .admin-main {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
}

.stat-icon.red { background: rgba(255, 87, 34, 0.15); color: #FF8A65; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }

.stat-data h3 {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: #FFFFFF;
}

.stat-data p {
    font-size: 0.775rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.825rem;
    text-align: left;
}

.admin-table th {
    padding: 0.75rem 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: visible;
    }
    
    .admin-table, 
    .admin-table thead, 
    .admin-table tbody, 
    .admin-table th, 
    .admin-table td, 
    .admin-table tr { 
        display: block; 
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .admin-table thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .admin-table tr {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 0.75rem;
        padding: 0.75rem 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .admin-table tr:hover td {
        background: none;
    }
    
    .admin-table td { 
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        padding: 0.45rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        font-size: 0.825rem;
        min-height: 36px;
        box-sizing: border-box;
    }
    
    .admin-table td:last-child {
        border-bottom: 0;
        padding-top: 0.6rem;
        padding-bottom: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .admin-table td::before { 
        content: attr(data-label);
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.725rem;
        color: var(--text-muted);
        text-align: left;
        letter-spacing: 0.05em;
    }
}

.stats-thin-table td, 
.stats-thin-table th {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.825rem;
}

@media (max-width: 768px) {
    .stats-thin-table tr {
        padding: 0.5rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    .stats-thin-table td {
        min-height: 28px !important;
        padding: 0.25rem 0 !important;
        font-size: 0.8rem !important;
    }
}

.table-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.table-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--border-accent);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 0.5rem;
    outline: none;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 87, 34, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.1);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.1);
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.btn-success:active {
    transform: translateY(0);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34D399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #F87171;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    font-style: italic;
    color: #FFFFFF;
    text-transform: uppercase;
}

.login-header p {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.25rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 8, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* Responsive Split Grid for Photographer Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Stack columns to full width on mobile devices */
        gap: 1.25rem;
    }
}

/* Custom Premium File Upload Area */
.custom-upload-area {
    background: var(--bg-input);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    margin-top: 0.5rem;
}

.custom-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(255, 87, 34, 0.02);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
}

.upload-text {
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-upload-area:hover .upload-text {
    color: var(--primary-color);
}

.upload-preview-container {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.upload-remove-btn {
    position: absolute;
    top: -4px;
    right: 4px;
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10;
    line-height: 1;
}

.upload-remove-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}
