/* ========================================================
   MODERN UI/UX DESIGN SYSTEM - SISTEM PELAPORAN PKL SMK
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --secondary: #0f172a;
    --secondary-hover: #1e293b;
    
    --accent: #06b6d4;
    --accent-light: #cffafe;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --success-text: #065f46;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-text: #92400e;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-text: #991b1b;
    
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-text: #1e40af;

    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: rgba(255, 255, 255, 0.08);
    --bg-sidebar-active: #4f46e5;
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-focus: #818cf8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.8);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 78px;
    --topbar-height: 72px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14.5px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================================
   LAYOUT: SIDEBAR + CONTENT WRAPPER
   ======================================================== */

.app-wrapper {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: #e2e8f0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
}

/* Sidebar Close Button (Mobile Only) */
.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    transition: var(--transition);
}
.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Desktop Collapsed Sidebar State (> 992px) */
@media (min-width: 993px) {
    body.sidebar-collapsed .app-sidebar {
        width: var(--sidebar-collapsed-width);
    }
    body.sidebar-collapsed .app-main {
        margin-left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
        max-width: calc(100% - var(--sidebar-collapsed-width));
    }
    body.sidebar-collapsed .sidebar-header {
        padding: 0 16px;
        justify-content: center;
    }
    body.sidebar-collapsed .sidebar-brand-text {
        display: none !important;
    }
    body.sidebar-collapsed .sidebar-brand-icon {
        margin: 0 auto;
    }
    body.sidebar-collapsed .nav-section-title {
        font-size: 0;
        height: 1px;
        padding: 0;
        margin: 12px 14px;
        background: rgba(255, 255, 255, 0.08);
    }
    body.sidebar-collapsed .nav-item {
        padding: 12px 0;
        justify-content: center;
        gap: 0;
        position: relative;
    }
    body.sidebar-collapsed .nav-item > span:not(.badge) {
        display: none !important;
    }
    body.sidebar-collapsed .nav-item .badge {
        position: absolute;
        top: 6px;
        right: 12px;
        font-size: 8px;
        padding: 1px 4px;
        border-radius: 4px;
    }
    body.sidebar-collapsed .nav-item[data-title]:hover::after {
        content: attr(data-title);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: #0f172a;
        color: #ffffff;
        padding: 7px 14px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        z-index: 1060;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.15);
        pointer-events: none;
        animation: fadeIn 0.15s ease;
    }
    body.sidebar-collapsed .sidebar-footer {
        padding: 12px 8px;
    }
    body.sidebar-collapsed .user-mini-card {
        padding: 6px 0;
        border: none;
        background: transparent;
        justify-content: center;
    }
    body.sidebar-collapsed .user-info {
        display: none !important;
    }
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    font-weight: 700;
    padding: 12px 14px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    color: #94a3b8;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.nav-item:hover {
    color: #ffffff;
    background-color: var(--bg-sidebar-hover);
    transform: translateX(3px);
}

.nav-item:hover i {
    color: #38bdf8;
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
    font-weight: 600;
}

.nav-item.active i {
    color: #ffffff;
}

.nav-item .badge {
    margin-left: auto;
}

/* Sidebar Footer (User card) */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(15, 23, 42, 0.4);
}

.user-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    display: inline-block;
    font-size: 11px;
    color: #38bdf8;
    font-weight: 500;
}

/* Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.94);
    box-sizing: border-box;
    width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 0;
    overflow: hidden;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-toggle-btn,
.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover,
.mobile-toggle:hover {
    background: var(--bg-main);
    color: var(--primary);
    border-color: var(--border-focus);
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}
.topbar-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Content Container */
.content-body {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto;
}

/* ========================================================
   CARD SYSTEM & SURFACES
   ======================================================== */

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition);
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.card-hover:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    min-width: 0;
    box-sizing: border-box;
}

.card-header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.card-body {
    padding: 24px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.card-footer {
    padding: 16px 24px;
    background: #fbfcfe;
    border-top: 1px solid var(--border-color);
    min-width: 0;
    box-sizing: border-box;
}

/* Hero / Welcome Card */
.hero-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 15px 35px -5px rgba(49, 46, 129, 0.35);
}

.hero-card::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #e0e7ff;
}

.hero-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 14.5px;
    color: #c7d2fe;
    max-width: 600px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* Stats / KPI Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
    width: 100%;
    box-sizing: border-box;
}

.stat-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.stat-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: #eef2ff;
    color: #4f46e5;
}
.stat-icon.success {
    background: #ecfdf5;
    color: #10b981;
}
.stat-icon.warning {
    background: #fffbeb;
    color: #f59e0b;
}
.stat-icon.accent {
    background: #ecfeff;
    color: #06b6d4;
}
.stat-icon.danger {
    background: #fef2f2;
    color: #ef4444;
}

/* ========================================================
   PKL PROGRESS TIMELINE
   ======================================================== */

.progress-track {
    background: #f1f5f9;
    border-radius: var(--radius-full);
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 12px 0 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timeline steps */
.timeline-list {
    position: relative;
    padding-left: 28px;
    margin-top: 16px;
}
.timeline-list::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item {
    position: relative;
    padding-bottom: 24px;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-marker {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.timeline-marker.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-title {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-primary);
}
.timeline-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ========================================================
   MODERN BUTTONS & BADGES
   ======================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 13px 26px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}
.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
    background: #059669;
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-light {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    font-weight: 700;
}
.btn-light:hover {
    background: #ffffff;
    color: var(--primary-hover);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-text);
}
.badge-warning {
    background: var(--warning-light);
    color: var(--warning-text);
}
.badge-danger {
    background: var(--danger-light);
    color: var(--danger-text);
}
.badge-info {
    background: var(--info-light);
    color: var(--info-text);
}
.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* ========================================================
   MODERN FORM STYLING
   ======================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label span.req {
    color: var(--danger);
}

.form-control, .form-select {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: #ffffff;
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* ========================================================
   MODERN FILE UPLOAD ZONE (DRAG & DROP UX)
   ======================================================== */

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    background: #f8fafc;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: #eef2ff;
}

.upload-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    margin: 0 auto 16px;
    transition: var(--transition);
}

.upload-zone:hover .upload-icon {
    transform: scale(1.1);
    color: var(--primary-hover);
}

.upload-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-preview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-top: 14px;
}

.file-preview-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.file-preview-icon.pdf {
    background: #fee2e2;
    color: #ef4444;
}
.file-preview-icon.ppt {
    background: #ffedd5;
    color: #ea580c;
}
.file-preview-icon.img {
    background: #e0f2fe;
    color: #0284c7;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ========================================================
   MODERN DATA TABLE & HORIZONTAL SCROLL SYSTEM
   ======================================================== */

.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    border-radius: var(--radius-md);
    position: relative;
    box-sizing: border-box;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Subtle mobile scroll hint */
.table-scroll-hint {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    letter-spacing: 0.2px;
}
.table-scroll-hint i {
    color: var(--primary);
    font-size: 12px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.table th {
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.table td {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
    background: #ffffff;
    transition: var(--transition);
}

.table tbody tr:hover td {
    background-color: #f8fafc;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================================
   ALERT & TOAST NOTIFICATION
   ======================================================== */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========================================================
   AUTH / LOGIN / REGISTER PAGES (STUNNING AESTHETIC)
   ======================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0f172a 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-blob-1 {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
    z-index: 1;
}

.auth-blob-2 {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    bottom: -200px;
    left: -150px;
    pointer-events: none;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
    margin: auto;
    animation: scaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.35);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
    padding: 0 12px;
}

.demo-account-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 24px;
    font-size: 12px;
}
.demo-account-title {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.demo-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.demo-pill:hover {
    border-color: var(--primary);
    background: #eef2ff;
}

/* ========================================================
   MODAL & LIGHTBOX
   ======================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    animation: scaleUp 0.25s ease;
    overflow: hidden;
}

.modal-dialog-lg {
    max-width: 850px;
}

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

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
}

/* Photo Gallery & Preview Lightbox */
.report-photo-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.report-photo-thumb:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Filter Bar & Filter Card */
.filter-bar,
.filter-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.filter-item {
    flex: 1;
    min-width: 180px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================================
   RESPONSIVE UTILITY CLASSES & COMPREHENSIVE BREAKPOINTS
   ======================================================== */

/* Responsive Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.grid-2-col-wide {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1.1fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.grid-1-2-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    gap: 24px;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.grid-2-col > *,
.grid-2-col-wide > *,
.grid-1-2-col > * {
    min-width: 0;
    max-width: 100%;
}

.dashboard-main-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* Dashboard Sidebar Widgets Column */
.dashboard-side-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* Quick Action List & Buttons */
.quick-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal !important;
    word-break: normal;
    text-align: left;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn i {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.photo-slot-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: start;
}

.existing-photo-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 16px;
    align-items: center;
}

/* Page Header & Actions */
.page-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* App Footer */
.app-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 16px;
}

/* ========================================================
   MEDIA QUERIES (DESKTOP -> TABLET -> MOBILE)
   ======================================================== */

/* 1. Standard Laptops & Large Tablets (max-width: 1280px) */
@media (max-width: 1280px) {
    .content-body {
        padding: 24px 20px;
    }
    .hero-card {
        padding: 26px;
    }
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    .grid-2-col,
    .grid-2-col-wide,
    .grid-1-2-col {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .dashboard-side-col {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
    }
}

/* 2. Medium Screens & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .dashboard-side-col {
        grid-template-columns: 1fr;
    }
}

/* 3. Tablets & Mobile (< 992px) */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1050;
    }
    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
    }
    .sidebar-close-btn {
        display: flex;
    }
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .app-topbar {
        padding: 0 16px;
    }
    .content-body {
        padding: 20px 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .hero-card {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .hero-progress-box {
        width: 100%;
        min-width: unset;
        text-align: left;
    }

    /* Table scrolling on tablet & mobile */
    .table-scroll-hint {
        display: flex;
    }
    .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }
    .table-responsive > .table {
        min-width: 600px;
    }
    .table-responsive > .table.table-wide {
        min-width: 760px;
    }
    .table th, .table td {
        padding: 12px 14px;
        white-space: nowrap;
    }
    .table td.cell-wrap,
    .table th.cell-wrap {
        white-space: normal;
        min-width: 160px;
    }
}

/* 4. Medium Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .content-body {
        padding: 16px 14px !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .grid-2-col,
    .grid-2-col-wide,
    .grid-1-2-col {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 18px !important;
    }
    .grid-2-col > *,
    .grid-2-col-wide > *,
    .grid-1-2-col > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 18px !important;
        border-radius: var(--radius-md) !important;
    }
    .card-header {
        padding: 14px 16px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .card-header-title {
        font-size: 14.5px !important;
    }
    .table-responsive {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }
    .table-responsive::-webkit-scrollbar {
        height: 6px !important;
        display: block !important;
    }
    .table-responsive::-webkit-scrollbar-thumb {
        background: #94a3b8 !important;
    }
    .topbar-date-text {
        display: none;
    }
    .topbar-date {
        font-size: 13px;
    }
    .page-breadcrumb {
        max-width: 200px;
    }
    .breadcrumb-current {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .filter-bar,
    .filter-card {
        padding: 16px;
        gap: 12px;
    }
    .filter-item {
        min-width: 100%;
        flex: 1 1 100%;
    }
    .filter-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .filter-actions .btn {
        flex: 1;
        justify-content: center;
    }
    .app-footer {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 18px 16px;
    }
    .footer-links {
        justify-content: center;
    }
}

/* 5. Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hero-card {
        padding: 18px 16px;
        border-radius: var(--radius-lg);
    }
    .hero-title {
        font-size: 20px;
    }
    .hero-subtitle {
        font-size: 13px;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .photo-slot-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .existing-photo-item {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }
    .page-header-box {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .page-header-actions {
        width: 100%;
        flex-direction: column;
    }
    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 6. Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .app-topbar {
        padding: 0 12px;
        height: 64px;
    }
    .topbar-left {
        gap: 8px;
    }
    .sidebar-toggle-btn,
    .mobile-toggle {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .topbar-date {
        display: none !important;
    }
    .topbar-divider {
        display: none !important;
    }
    .topbar-btn {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    .content-body {
        padding: 14px 10px;
    }
    .stat-card {
        padding: 14px;
    }
    .stat-value {
        font-size: 22px;
    }
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .card-header {
        padding: 14px;
    }
    .card-body {
        padding: 14px;
    }
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .auth-page {
        padding: 20px 12px;
    }
    .auth-card {
        padding: 24px 16px;
        border-radius: var(--radius-lg);
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .modal-box {
        padding: 16px;
        width: 95%;
    }
}



