/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   LOGIN PAGE
   =================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    height: 70px;
    width: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.login-form label i {
    color: var(--primary);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 4px;
}

.help-text {
    font-size: 12px !important;
    color: var(--gray-400) !important;
}

/* ===================================
   DASHBOARD PAGE
   =================================== */
.dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    background: white;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-menu {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-menu:hover {
    background: var(--gray-100);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    height: 36px;
    width: auto;
}

.header-logo span {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.btn-header {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    position: relative;
    transition: all 0.2s;
}

.btn-header:hover {
    background: var(--gray-200);
}

.notification-badge .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.user-menu i.fa-chevron-down {
    font-size: 12px;
    color: var(--gray-400);
    transition: transform 0.2s;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.dropdown-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.dropdown-id {
    font-size: 13px;
    color: var(--gray-500);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item.logout {
    color: var(--danger);
    border-top: 1px solid var(--gray-200);
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

.dropdown-item i {
    width: 20px;
    font-size: 16px;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-item:hover {
    background: var(--gray-50);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.nav-item i {
    width: 20px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--gray-50);
}

.content-area {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 14px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card.stat-blue {
    border-left-color: var(--info);
}

.stat-card.stat-orange {
    border-left-color: var(--warning);
}

.stat-card.stat-green {
    border-left-color: var(--success);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-blue .stat-icon {
    background: #dbeafe;
    color: var(--info);
}

.stat-orange .stat-icon {
    background: #fef3c7;
    color: var(--warning);
}

.stat-green .stat-icon {
    background: #d1fae5;
    color: var(--success);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    color: var(--gray-500);
    font-size: 14px;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.quick-actions h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.action-btn {
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    color: white;
}

.action-btn i {
    font-size: 24px;
}

.action-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.action-btn.btn-success {
    background: var(--success);
}

.action-btn.btn-info {
    background: var(--info);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.recent-activity h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.activity-icon.blue {
    background: var(--info);
}

.activity-icon.green {
    background: var(--success);
}

.activity-icon.orange {
    background: var(--warning);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: var(--gray-500);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    display: none;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 8px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .btn-menu {
        display: flex;
    }
    
    .header-logo span {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        z-index: 99;
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        padding-bottom: 70px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* ==========================================
   ATTENDANCE PAGE STYLES
   ========================================== */

/* Enhanced Stats Grid for Attendance Page */
.dashboard-content .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-content .stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
}

.dashboard-content .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.stat-info {
    border-left-color: #06b6d4;
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.stat-card.stat-success {
    border-left-color: #10b981;
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* History Items */
.history-item-modal {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #667eea;
    transition: all 0.2s;
}

.history-item-modal:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.history-date-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.history-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.history-times {
    flex: 1;
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
    min-width: 150px;
}

.history-status-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: #4b5563;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Action Completed State */
.action-completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.action-completed h3 {
    font-size: 1.5rem;
    color: #166534;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.action-completed p {
    color: #15803d;
    font-size: 0.875rem;
    margin: 0;
}

/* Additional button states */
.action-btn.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.action-btn.btn-secondary {
    background: #6b7280;
}

.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Text utilities */
.text-center {
    text-align: center;
}

/* Responsive for Attendance Page */
@media (max-width: 768px) {
    .dashboard-content .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dashboard-content .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .history-item-modal {
        padding: 12px;
    }

    .history-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-times {
        min-width: 100%;
    }

    .action-completed {
        padding: 24px 16px;
    }

    .action-completed h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .dashboard-content .stats-grid {
        grid-template-columns: 1fr;
    }

    .history-date-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}

/* ==========================================
   MODERN PROFILE STYLES
   ========================================== */

/* Professional Header */
.profile-header-modern {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.profile-header-bg {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.profile-header-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
}

.profile-header-content {
    display: flex;
    align-items: flex-end;
    gap: 32px;
    padding: 0 40px 32px;
    margin-top: -80px;
    position: relative;
}

.profile-avatar-large {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    background: white;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-avatar-large:hover .avatar-edit-overlay {
    opacity: 1;
}

.btn-edit-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 3px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.btn-edit-avatar:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.profile-header-info {
    flex: 1;
    padding-top: 80px;
}

.profile-name-large {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.profile-position-large {
    font-size: 18px;
    color: var(--gray-600);
    margin: 0 0 16px 0;
    font-weight: 500;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.meta-item i {
    color: var(--primary);
    font-size: 16px;
}

.profile-header-actions {
    display: flex;
    gap: 12px;
    padding-top: 80px;
}

.btn-action-primary,
.btn-action-success,
.btn-action-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-action-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-action-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-action-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-action-secondary:hover {
    background: var(--gray-300);
}

/* Professional Content Grid */
.profile-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.profile-section-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s;
}

.profile-section-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.section-card-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-bottom: 2px solid #e8ebff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.section-card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.section-card-body {
    padding: 32px;
}

/* Modern Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-col,
.form-col-full {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-col-full {
    grid-column: 1 / -1;
}

.form-col label,
.form-col-full label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-modern {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--gray-50);
    transition: all 0.3s;
    outline: none;
}

.input-modern:disabled {
    background: var(--gray-50);
    cursor: not-allowed;
    color: var(--gray-600);
    border-color: var(--gray-200);
}

.input-modern:not(:disabled) {
    background: white;
    cursor: text;
}

.input-modern:not(:disabled):hover {
    border-color: var(--gray-300);
}

.input-modern:not(:disabled):focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

textarea.input-modern {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

select.input-modern {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-header-content {
        flex-wrap: wrap;
    }

    .profile-header-actions {
        width: 100%;
        justify-content: flex-start;
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 24px 24px;
    }

    .profile-avatar-large img {
        width: 120px;
        height: 120px;
    }

    .profile-header-info {
        padding-top: 0;
        width: 100%;
    }

    .profile-name-large {
        font-size: 24px;
    }

    .profile-position-large {
        font-size: 16px;
    }

    .profile-meta {
        justify-content: center;
        font-size: 13px;
    }

    .profile-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-action-primary,
    .btn-action-success,
    .btn-action-secondary {
        width: 100%;
        justify-content: center;
    }

    .section-card-header {
        padding: 20px 24px;
    }

    .section-card-body {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .profile-header-bg {
        height: 120px;
    }

    .profile-avatar-large img {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .profile-name-large {
        font-size: 20px;
    }

    .profile-position-large {
        font-size: 14px;
    }

    .profile-meta {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .section-card-header h3 {
        font-size: 18px;
    }

    .section-card-header {
        padding: 16px 20px;
    }

    .section-card-body {
        padding: 20px;
    }

    .input-modern {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ==========================================
   MODAL STYLES
   ========================================== */

/* Modal Base Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-content p {
    margin: 0 0 20px;
    color: #6b7280;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-modal {
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-modal:hover {
    transform: translateY(-2px);
}

.btn-izin {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-sakit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

/* Modal History */
.modal-history {
    max-width: 600px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    margin: -30px -30px 20px;
}

.modal-header h2 {
    color: white;
    margin: 0;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
}

.history-list-modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================
   LOADING & TOAST STYLES
   ========================================== */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 85%;
    opacity: 0;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success { background: rgba(16, 185, 129, 0.95); }
.toast-error { background: rgba(239, 68, 68, 0.95); }
.toast-info { background: rgba(59, 130, 246, 0.95); }
.toast-warning { background: rgba(245, 158, 11, 0.95); }

/* Toast Message for Login */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.toast-message.toast-success { background: #10b981; color: white; }
.toast-message.toast-error { background: #ef4444; color: white; }
.toast-message.toast-warning { background: #f59e0b; color: white; }
.toast-message.toast-info { background: #3b82f6; color: white; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Camera Modal */
.camera-modal-wrapper {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.camera-video {
    width: 100%;
    max-height: 50vh;
    border-radius: 10px;
    background: black;
    object-fit: cover;
    transform: scaleX(-1);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--gray-500);
}

.loading-state i {
    color: var(--primary);
    margin-bottom: 16px;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--gray-500);
}

.error-state i {
    color: var(--danger);
    margin-bottom: 20px;
}

/* Responsive Modal */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-history {
        max-width: 95%;
    }
}