:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --accent: #F97316;
    --accent-dark: #EA580C;
    --accent-light: #FFF7ED;
    --success: #16A34A;
    --success-light: #DCFCE7;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --text: #1E293B;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --font: 'Quicksand', sans-serif;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --nav-bg: var(--white);
    --nav-text: var(--text);
    --nav-border: var(--gray-200);
    --brand-text: var(--text);
}

[data-role="superadmin"] {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --nav-bg: #1E293B;
    --nav-text: #F1F5F9;
    --nav-border: #334155;
    --brand-text: #F8FAFC;
}

[data-role="superadmin"] .navbar,
[data-role="superadmin"] .bottom-bar {
    background: #1E293B !important;
    border-bottom-color: #334155 !important;
    border-top-color: #334155 !important;
}

[data-role="superadmin"] .user-name,
[data-role="superadmin"] .nav-link,
[data-role="superadmin"] .nav-brand .brand-text,
[data-role="superadmin"] .bottom-item:not(.bottom-fab):not(.bottom-logout),
[data-role="superadmin"] .mobile-action-btn,
[data-role="superadmin"] .mobile-notif-trigger,
[data-role="superadmin"] .footer p {
    color: var(--nav-text) !important;
}

[data-role="superadmin"] .logo-img {
    filter: brightness(0) invert(1);
}

[data-role="superadmin"] .bottom-item.active { color: var(--primary) !important; }
[data-role="superadmin"] .bottom-fab { background: var(--primary) !important; color: #fff !important; }
[data-role="superadmin"] .bottom-logout { color: #F87171 !important; }

[data-role="admin"] {
    --nav-bg: #1E3A5F;
    --nav-text: #E2E8F0;
    --nav-border: #2D4A6F;
    --brand-text: #F1F5F9;
}

[data-role="admin"] .navbar,
[data-role="admin"] .bottom-bar {
    background: #1E3A5F !important;
    border-bottom-color: #2D4A6F !important;
    border-top-color: #2D4A6F !important;
}

[data-role="admin"] .user-name,
[data-role="admin"] .nav-link,
[data-role="admin"] .nav-brand .brand-text,
[data-role="admin"] .bottom-item:not(.bottom-fab):not(.bottom-logout),
[data-role="admin"] .mobile-action-btn,
[data-role="admin"] .mobile-notif-trigger,
[data-role="admin"] .footer p {
    color: var(--nav-text) !important;
}

[data-role="admin"] .logo-img {
    filter: brightness(0) invert(1);
}

[data-role="admin"] .bottom-item.active { color: #60A5FA !important; }
[data-role="admin"] .bottom-fab { background: #60A5FA !important; color: #fff !important; }
[data-role="admin"] .bottom-logout { color: #F87171 !important; }

.navbar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
}

.nav-link {
    color: var(--nav-text);
}

.nav-brand .brand-text {
    color: var(--brand-text);
}


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

body {
    font-family: 'Quicksand', sans-serif;
    background: var(--white);
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.navbar {
    background: var(--white);
    border-bottom: 2px solid var(--gray-100);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.logo-img {
    height: 36px;
    width: auto;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.admin-link {
    color: var(--accent);
}

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

.register-link {
    background: var(--primary);
    color: var(--white) !important;
}

.register-link:hover {
    background: var(--primary-dark);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--gray-200);
}

.user-name {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.logout-link {
    color: var(--danger);
}

.logout-link:hover {
    background: var(--danger-light);
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--gray-300);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
}

.main-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    width: 100%;
}

.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
}

.alert-success { background: var(--success-light); color: var(--success); border-left: 4px solid var(--success); }
.alert-danger { background: var(--danger-light); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 4px solid var(--warning); }
.alert-info { background: var(--primary-light); color: var(--primary); border-left: 4px solid var(--primary); }

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0 4px;
}

.alert-close:hover { opacity: 1; }

.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-500);
    margin-bottom: 32px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 60px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Quicksand', sans-serif;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border-color: var(--gray-300);
}

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

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-success:hover {
    background: #15803D;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

.form-page {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.form-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
}

.form-card-wide {
    max-width: 640px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.styled-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: var(--white);
    color: var(--gray-800);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    flex-direction: row;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--gray-500);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.file-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-label input {
    display: none;
}

.file-icon {
    font-size: 1.3rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-rejected .stat-number { color: var(--danger); }
.stat-total .stat-number { color: var(--primary); }

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-pending .stat-number { color: var(--warning); }
.stat-approved .stat-number { color: var(--success); }
.stat-completed .stat-number { color: var(--primary); }

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 600;
    margin-top: 4px;
}

.table-container {
    overflow-x: auto;
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.styled-table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
}

.styled-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.styled-table tr:hover td {
    background: var(--gray-50);
}

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

.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-notes {
    font-size: 0.75rem;
    padding: 6px 8px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: 'Quicksand', sans-serif;
    width: 120px;
    resize: none;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-lg {
    padding: 6px 16px;
    font-size: 0.82rem;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 20px;
}

.section-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.compact-id {
    font-weight: 700;
    color: var(--gray-500);
    font-size: 0.82rem;
    min-width: 35px;
}

.compact-user {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 80px;
}

.compact-title {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.text-muted {
    color: var(--gray-400);
    font-size: 0.88rem;
}

.detail-page {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-header {
    padding: 24px 28px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.detail-body {
    padding: 28px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gray-100);
}

.detail-description {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.7;
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.detail-description.notes {
    border-left: 4px solid var(--accent);
}

.detail-footer {
    padding: 16px 28px;
    border-top: 2px solid var(--gray-100);
    display: flex;
    gap: 12px;
}

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

.photo-card {
    position: relative;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
}

.photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.photo-desc {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.photo-time {
    display: block;
    padding: 0 14px 12px;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.approved-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--success-light);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.approved-icon {
    font-size: 2rem;
    color: var(--success);
}

.approved-banner h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
}

.approved-banner p {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.photo-upload-group {
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
}

.upload-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
}

.log-container {
    background: var(--gray-900);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.log-header {
    display: grid;
    grid-template-columns: 160px 100px 120px 1fr 120px;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-800);
    color: var(--gray-400);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-700);
}

.log-entries {
    max-height: 600px;
    overflow-y: auto;
}

.log-entry {
    display: grid;
    grid-template-columns: 160px 100px 120px 1fr 120px;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-800);
    color: var(--gray-300);
    align-items: center;
}

.log-entry:hover {
    background: rgba(255,255,255,0.03);
}

.log-entry .time { color: var(--gray-400); }
.log-entry .user { color: var(--accent); }
.log-entry .ip { color: var(--gray-500); }

.log-action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
}

.log-register { background: var(--primary-dark); color: var(--primary-light); }
.log-login { background: #065F46; color: #A7F3D0; }
.log-logout { background: #374151; color: var(--gray-300); }
.log-submit { background: #1E40AF; color: #93C5FD; }
.log-approve { background: #065F46; color: #A7F3D0; }
.log-reject { background: #7F1D1D; color: #FECACA; }
.log-upload { background: #5B21B6; color: #C4B5FD; }
.log-user { background: #92400E; color: #FDE68A; }
.log-request { background: #1E3A5F; color: var(--gray-300); }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell svg {
    width: 20px;
    height: 20px;
}

.badge-notif {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.notif-item:hover {
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.notif-unread {
    border-left: 4px solid var(--primary);
    background: var(--gray-50);
}

.notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-icon svg {
    width: 18px;
    height: 18px;
}

.notif-info { background: var(--primary-light); color: var(--primary); }
.notif-success { background: var(--success-light); color: var(--success); }
.notif-danger { background: var(--danger-light); color: var(--danger); }

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

.notif-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.notif-message {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 6px;
}

.notif-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

@media (max-width: 768px) {
    .notif-item {
        flex-wrap: wrap;
        padding: 14px;
    }
    .notif-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
    }
}

.log-count {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.page-info {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.88rem;
}

.icon-sm {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.icon-inline {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.feature-icon svg,
.empty-icon svg,
.approved-icon svg,
.file-icon svg {
    width: 100%;
    height: 100%;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--primary);
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    color: var(--gray-300);
}

.approved-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

.file-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    color: var(--gray-500);
}

.file-label:hover .file-icon {
    color: var(--primary);
}

.dashboard-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-top: 2px;
}

.quick-actions {
    display: flex;
    gap: 8px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.dash-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.dash-card:hover {
    box-shadow: var(--shadow-md);
}

.dash-card-wide {
    grid-column: 1 / -1;
}

.chart-card .chart-body {
    padding: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 2px solid var(--gray-100);
    background: var(--gray-50);
}

.dash-card-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-body {
    padding: 16px 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.activity-item:hover {
    background: var(--primary-light);
}

.activity-badge {
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
}

.activity-text {
    flex: 1;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-server {
    font-size: 0.82rem;
    color: var(--gray-500);
    min-width: 80px;
}

.activity-time {
    font-size: 0.78rem;
    color: var(--gray-400);
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

.activity-placeholder {
    color: var(--gray-400);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

.chart-body canvas {
    max-height: 220px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        flex-wrap: wrap;
    }
    .activity-server, .activity-time {
        display: none;
    }
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.log-header .actions-col,
.log-entry .actions-col {
    width: 60px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
}

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

.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 5rem;
    font-weight: 800;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: 8px;
}

.error-page p {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-400);
    font-size: 0.82rem;
    border-top: 2px solid var(--gray-100);
    margin-top: 20px;
}

.bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--white);
    border-top: 2px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    justify-content: space-around;
    align-items: center;
    height: 64px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (min-width: 769px) {
    .bottom-bar {
        display: none !important;
    }
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    min-width: 56px;
    position: relative;
}

.bottom-item svg {
    width: 22px;
    height: 22px;
    transition: all 0.2s ease;
}

.bottom-item span {
    font-size: 0.62rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
}

.bottom-item {
    position: relative;
}

.bottom-notif {
    position: absolute;
    top: 2px;
    right: 6px;
}

.bottom-item.active {
    color: var(--primary);
}

.bottom-item.active svg {
    stroke-width: 2.5;
}

.bottom-item:not(.bottom-fab):hover {
    color: var(--primary);
    background: var(--primary-light);
}

.bottom-fab {
    color: var(--white) !important;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    width: 52px;
    height: 52px;
    min-width: 52px;
    padding: 0;
    margin-top: -16px;
    box-shadow: var(--shadow-lg);
}

.bottom-fab svg {
    width: 26px;
    height: 26px;
}

.bottom-fab span {
    display: none;
}

.bottom-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}

@media (max-width: 768px) {
    .desktop-only,
    .tablet-only {
        display: none !important;
    }

    .navbar {
        height: 56px;
    }

    .nav-container {
        height: 56px;
    }

    .nav-menu-desktop {
        display: none;
    }

    .nav-user {
        border-left: none;
        padding-left: 0;
    }

    .main-container {
        padding: 16px 14px 80px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-features {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 20px 14px;
    }

    .log-header, .log-entry {
        grid-template-columns: 80px 70px 80px 1fr 0 0;
        font-size: 0.72rem;
        gap: 4px;
    }

    .log-entry .ip, .log-header .ip { display: none; }
    .log-entry .actions-col, .log-header .actions-col { display: none; }

    .admin-sections {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 10px 6px;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.62rem;
        white-space: nowrap;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 16px;
    }

    .detail-body {
        padding: 18px 16px;
    }

    .detail-footer {
        flex-direction: column;
        padding: 14px 16px;
    }

    .detail-footer .inline-form {
        width: 100%;
    }

    .detail-footer textarea {
        width: 100% !important;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px 18px;
    }

    .actions-cell {
        flex-direction: column;
        gap: 4px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .styled-table th,
    .styled-table td {
        padding: 10px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .compact-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .inline-notes {
        width: 80px !important;
    }

    .page-actions {
        flex-wrap: wrap;
    }
}

/* ── Toast / Flash Messages ── */
.flash-messages {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-left: 4px solid var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(120%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.toast-danger .toast-icon { color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info { border-left-color: var(--primary); }
.toast.toast-info .toast-icon { color: var(--primary); }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    margin-left: auto;
    padding: 2px;
    display: flex;
    align-items: center;
}

.toast-close:hover { color: var(--text); }

/* ── Loading Spinner ── */
.icon-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.chart-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--gray-400);
    font-size: 2rem;
}

/* ── Search Bar ── */
.search-bar {
    margin-bottom: 16px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

.search-form .search-icon {
    position: absolute;
    margin-left: 12px;
    color: var(--gray-400);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    background: var(--white);
    color: var(--text);
    min-width: 200px;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.85rem;
    background: var(--white);
    color: var(--text);
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ── Profile Page ── */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 600px;
    margin: 0 auto;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 24px 0;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.form-card h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text);
}

.form-card input[disabled] {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
}

/* ── Bottom Logout ── */
.bottom-logout {
    color: var(--danger) !important;
}

/* ── Icon Button ── */
.btn-icon {
    padding: 8px 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Responsive fix for stats on mobile ── */
@media (max-width: 480px) {
    .search-form { flex-wrap: nowrap; }
    .search-input { min-width: 0; width: 0; flex: 1; padding: 8px 8px 8px 30px; font-size: 0.78rem; }
    .search-select { width: auto; min-width: 0; padding: 8px 6px; font-size: 0.75rem; max-width: 90px; }
    .search-form .btn { font-size: 0.75rem; padding: 6px 8px; white-space: nowrap; }
    .search-form .search-icon { width: 16px; height: 16px; margin-left: 8px; }
    .flash-messages { left: 8px; right: 8px; max-width: none; }
    .toast { font-size: 0.8rem; padding: 10px 12px; }
}

/* ── Disabled button style ── */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Mobile Notification Bell & Dropdown ── */
.mobile-actions-wrap {
    display: none;
    align-items: center;
    margin-left: auto;
    margin-right: 4px;
    gap: 2px;
}

.mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.mobile-action-btn:hover {
    background: var(--gray-100);
}

.mobile-notif-wrap {
    display: none;
    position: relative;
}

.mobile-notif-trigger {
    display: flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    position: relative;
}

.mobile-notif-trigger:hover {
    background: var(--gray-100);
}

.mobile-notif-trigger .badge-notif {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
}

.notif-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border: 1px solid var(--gray-200);
    z-index: 200;
    overflow: hidden;
    animation: dropDown 0.2s ease;
}

@keyframes dropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown.open {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.85rem;
}

.notif-dropdown-link {
    font-size: 0.78rem;
    color: var(--primary);
    text-decoration: none;
}

.notif-dropdown-body {
    max-height: 340px;
    overflow-y: auto;
}

.notif-dropdown-loading,
.notif-dropdown-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.notif-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
}

.notif-dropdown-item:hover {
    background: var(--gray-50);
}

.notif-dropdown-item.notif-unread {
    background: #EFF6FF;
}

.notif-dropdown-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notif-dropdown-icon.notif-info { background: #DBEAFE; color: var(--primary); }
.notif-dropdown-icon.notif-success { background: #DCFCE7; color: var(--success); }
.notif-dropdown-icon.notif-danger { background: #FEE2E2; color: var(--danger); }

.notif-dropdown-content {
    flex: 1;
    min-width: 0;
}

.notif-dropdown-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text);
}

.notif-dropdown-msg {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-dropdown-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 4px;
}

.notif-dropdown-goto {
    flex-shrink: 0;
    color: var(--gray-400);
    padding: 4px;
}

.notif-dropdown-goto:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .mobile-actions-wrap {
        display: flex;
    }

    .mobile-notif-wrap {
        display: flex;
        align-items: center;
    }

    .notif-dropdown {
        width: calc(100vw - 32px);
        right: -4px;
    }
}
