/* ============================================================
   Sistem Kehadiran & Izin - Corporate Theme
   Primary: #0056b3 | Secondary: #ffffff | Accent: #f4f6f9
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0056b3;
    --primary-dark: #003d80;
    --primary-light: #e8f0fe;
    --secondary: #ffffff;
    --accent: #f4f6f9;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --success: #28a745;
    --success-light: #d4edda;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --info: #17a2b8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--accent);
    color: var(--text-dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0056b3 0%, #003d80 50%, #001f4d 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    animation: bgShift 15s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-5%, 5%) rotate(3deg);
    }
}

.login-card {
    background: var(--secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    margin: 1rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    color: white;
}

.login-card-header .logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-card-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.login-card-header p {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 300;
}

.login-card-body {
    padding: 2rem;
}

.login-card-body .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.login-card-body .form-control {
    border-radius: var(--radius-sm);
    border: 2px solid #e2e8f0;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--accent);
}

.login-card-body .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.12);
    background: white;
}

.login-card-body .input-group-text {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border: 2px solid #e2e8f0;
    border-right: 0;
    background: var(--accent);
    color: var(--primary);
}

.login-card-body .form-control.input-group-end {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
    background: linear-gradient(135deg, #0066d6 0%, var(--primary) 100%);
    color: white;
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.alert-login {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
}

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0a1628 0%, #0f2040 50%, #0a1628 100%);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #0080ff 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.sidebar-brand h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.sidebar-brand small {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav-label {
    padding: 0.5rem 1.25rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    margin-top: 0.5rem;
}

.sidebar-nav-item {
    display: block;
    padding: 0.65rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 400;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, #0080ff 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Force dropdown to open upward in sidebar footer */
.sidebar-footer .dropdown-menu {
    bottom: 100% !important;
    top: auto !important;
    transform: none !important;
    margin-bottom: 0.5rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #0080ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    color: white;
}

.sidebar-user-info small {
    font-size: 0.7rem;
    opacity: 0.6;
    text-transform: capitalize;
}

/* ============================================================
   SIDEBAR DROPDOWN MENU (Profile/Password/Logout)
   ============================================================ */

.sidebar-dropdown-menu {
    border: none !important;
    border-radius: var(--radius) !important;
    background: #ffffff !important;
    padding: 0 !important;
    overflow: hidden;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.sidebar-dropdown-menu .dropdown-menu-header {
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.sidebar-dropdown-menu .dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar-dropdown-menu .dropdown-user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.sidebar-dropdown-menu .dropdown-user-detail {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.sidebar-dropdown-menu .dropdown-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.sidebar-dropdown-menu .dropdown-user-role {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.sidebar-dropdown-menu .dropdown-divider {
    margin: 0;
    border-color: #eef0f3;
}

.sidebar-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.sidebar-dropdown-menu .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary);
    transition: var(--transition);
}

.sidebar-dropdown-menu .dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-dropdown-menu .dropdown-item:hover i {
    color: var(--primary);
}

.sidebar-dropdown-menu .dropdown-item.dropdown-item-danger {
    color: var(--danger);
}

.sidebar-dropdown-menu .dropdown-item.dropdown-item-danger i {
    color: var(--danger);
}

.sidebar-dropdown-menu .dropdown-item.dropdown-item-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}



/* ============================================================
   SIDEBAR COLLAPSE TOGGLE BUTTON
   ============================================================ */

.sidebar-collapse-btn {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #1a2744;
    border: 2px solid #2a3a5c;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: var(--transition);
    z-index: 1010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-collapse-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.sidebar-collapse-btn i {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* ============================================================
   SIDEBAR COLLAPSED STATE (Desktop)
   Uses both html.sidebar-collapsed (instant load) and
   .sidebar.collapsed (JS toggle) for zero-flash transitions
   ============================================================ */

.sidebar .menu-text {
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

/* Base collapsed state */
html.sidebar-collapsed .sidebar,
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width) !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html.sidebar-collapsed .sidebar::-webkit-scrollbar,
html.sidebar-collapsed .sidebar *::-webkit-scrollbar,
.sidebar.collapsed::-webkit-scrollbar,
.sidebar.collapsed *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Hide text */
html.sidebar-collapsed .sidebar .menu-text,
.sidebar.collapsed .menu-text {
    position: absolute !important;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Header */
html.sidebar-collapsed .sidebar .sidebar-header,
.sidebar.collapsed .sidebar-header {
    padding: 1.2rem 0;
    justify-content: center;
    gap: 0;
}

/* Nav */
html.sidebar-collapsed .sidebar .sidebar-nav-label,
.sidebar.collapsed .sidebar-nav-label {
    height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

html.sidebar-collapsed .sidebar .sidebar-nav-item,
.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0.7rem;
    margin: 2px 0.5rem;
    position: relative;
    gap: 0;
}

html.sidebar-collapsed .sidebar .sidebar-nav-item i,
.sidebar.collapsed .sidebar-nav-item i {
    width: auto;
    font-size: 1.15rem;
}

html.sidebar-collapsed .sidebar .sidebar-nav-item.active,
.sidebar.collapsed .sidebar-nav-item.active {
    box-shadow: none;
}

/* Sidebar Collapsed Badge (Red notification dot) */
.sidebar-collapsed-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    background-color: var(--danger);
    border-radius: 50%;
    display: none;
    box-shadow: 0 0 0 2px #0f2040;
    z-index: 5;
}

/* Show the dot only when sidebar is collapsed */
.sidebar.collapsed .sidebar-collapsed-badge,
html.sidebar-collapsed .sidebar-collapsed-badge {
    display: block;
}

/* Tooltip - JS-powered (position:fixed to avoid overflow clipping) */
.sidebar-tooltip {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(135deg, #0a1628 0%, #0f2040 100%);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* Tooltip arrow */
.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #0a1628;
}

/* Footer */
html.sidebar-collapsed .sidebar .sidebar-footer,
.sidebar.collapsed .sidebar-footer {
    padding: 0.8rem 0;
    display: flex;
    justify-content: center;
}

html.sidebar-collapsed .sidebar .sidebar-user,
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    gap: 0;
}

html.sidebar-collapsed .sidebar .sidebar-user.dropdown-toggle::after,
.sidebar.collapsed .sidebar-user.dropdown-toggle::after {
    display: none;
}

/* Position dropdown to the right when collapsed */
html.sidebar-collapsed .sidebar .sidebar-footer .dropdown-menu,
.sidebar.collapsed .sidebar-footer .dropdown-menu {
    bottom: 0 !important;
    left: calc(var(--sidebar-collapsed-width) - 8px) !important;
    top: auto !important;
    transform: none !important;
    margin-bottom: 0;
}

/* Main content shift */
html.sidebar-collapsed .main-content,
.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    min-width: 0;
}

.top-navbar {
    background: var(--secondary);
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-navbar .breadcrumb-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-navbar .breadcrumb-text strong {
    color: var(--text-dark);
}

.top-navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--danger);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.content-area {
    padding: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card {
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.primary::before {
    background: var(--primary);
}

.stat-card.success::before {
    background: var(--success);
}

.stat-card.warning::before {
    background: var(--warning);
}

.stat-card.danger::before {
    background: var(--danger);
}

.stat-card.info::before {
    background: var(--info);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card.primary .stat-card-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card.success .stat-card-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-card.warning .stat-card-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card.danger .stat-card-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card.info .stat-card-icon {
    background: #d1ecf1;
    color: var(--info);
}

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.stat-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* ============================================================
   CARDS & DATA TABLES
   ============================================================ */

.content-card {
    background: var(--secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.content-card-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fafbfd 0%, #f8f9fa 100%);
}

.content-card-header h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card-header h5 i {
    color: var(--primary);
}

.content-card-body {
    padding: 1.5rem;
}

.table {
    font-size: 0.88rem;
}

.table thead th {
    background: var(--accent);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: #f0f2f5;
}

.table tbody tr {
    cursor: default;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge-status {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-status.pending {
    background: var(--warning-light);
    color: #856404;
}

.badge-status.approved {
    background: var(--success-light);
    color: #155724;
}

.badge-status.rejected {
    background: var(--danger-light);
    color: #721c24;
}

.badge-status.clock-in {
    background: var(--success-light);
    color: #155724;
}

.badge-status.clock-out {
    background: #cce5ff;
    color: #004085;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-sm-action {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-approve {
    background: var(--success-light);
    color: #155724;
}

.btn-approve:hover {
    background: var(--success);
    color: white;
}

.btn-reject {
    background: var(--danger-light);
    color: #721c24;
}

.btn-reject:hover {
    background: var(--danger);
    color: white;
}

.btn-view {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-view:hover {
    background: var(--primary);
    color: white;
}

/* ============================================================
   ATTENDANCE FORM
   ============================================================ */

.attendance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.attendance-card::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -60px;
    right: -60px;
}

.attendance-card .current-time {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.attendance-card .current-date {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.attendance-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-attendance {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-clock-in {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border-color: rgba(40, 167, 69, 0.5);
}

.btn-clock-in:hover {
    background: var(--success);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
}

.btn-clock-out {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-color: rgba(220, 53, 69, 0.5);
}

.btn-clock-out:hover {
    background: var(--danger);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
}

/* ============================================================
   LEAVE FORM
   ============================================================ */

.form-section .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.form-section .form-control,
.form-section .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid #e2e8f0;
    padding: 0.65rem 1rem;
    transition: var(--transition);
}

.form-section .form-control:focus,
.form-section .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.12);
}

.btn-submit-leave {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-submit-leave:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3);
    color: white;
}

/* ============================================================
   MODAL PHOTO VIEWER
   ============================================================ */

.photo-preview {
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   SIDEBAR TOGGLE (MOBILE)
   ============================================================ */

.sidebar-toggle {
    display: none;
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }

    /* Reset collapsed styles on mobile */
    html.sidebar-collapsed .sidebar .menu-text,
    .sidebar.collapsed .menu-text {
        position: static !important;
        opacity: 1;
        width: auto;
        height: auto;
        overflow: visible;
    }

    html.sidebar-collapsed .sidebar .sidebar-nav-item,
    .sidebar.collapsed .sidebar-nav-item {
        justify-content: flex-start;
        padding: 0.65rem 1.25rem;
        gap: 0.75rem;
    }


    html.sidebar-collapsed .sidebar .sidebar-header,
    .sidebar.collapsed .sidebar-header {
        padding: 1.5rem 1.25rem;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    html.sidebar-collapsed .sidebar .sidebar-user,
    .sidebar.collapsed .sidebar-user {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    html.sidebar-collapsed .sidebar .sidebar-nav-label,
    .sidebar.collapsed .sidebar-nav-label {
        height: auto;
        text-align: left;
        padding: 0.5rem 1.25rem;
        overflow: visible;
        opacity: 1;
    }

    html.sidebar-collapsed .sidebar .sidebar-footer,
    .sidebar.collapsed .sidebar-footer {
        padding: 1rem 1.25rem;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 576px) {
    .stat-card h3 {
        font-size: 1.5rem;
    }

    .attendance-card .current-time {
        font-size: 2rem;
    }

    .content-area {
        padding: 1rem;
    }

    .attendance-actions {
        flex-direction: column;
    }

    .btn-attendance {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ============================================================
   CAMERA PREVIEW
   ============================================================ */

.camera-preview-wrapper {
    position: relative;
    max-width: 320px;
    margin: 0.5rem auto;
}

.camera-preview-wrapper img,
.camera-preview-wrapper video {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 3px solid var(--primary);
}

.camera-placeholder {
    width: 100%;
    height: 200px;
    background: var(--accent);
    border: 3px dashed #e2e8f0;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.camera-placeholder:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.camera-placeholder i {
    font-size: 2.5rem;
}

/* ============================================================
   GPS STATUS INDICATOR
   ============================================================ */

.gps-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.gps-status.loading {
    background: var(--warning-light);
    color: #856404;
}

.gps-status.success {
    background: var(--success-light);
    color: #155724;
}

.gps-status.error {
    background: var(--danger-light);
    color: #721c24;
}

.gps-status .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* ============================================================
   CUSTOM ANIMATIONS
   ============================================================ */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.fade-in {
    animation: fadeInUp 0.4s ease-out;
}

/* ============================================================
   FOCUS-VISIBLE ACCESSIBILITY
   ============================================================ */

*:focus-visible {
    outline: 3px solid rgba(0, 86, 179, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
.btn-sm-action:focus-visible,
.btn-attendance:focus-visible,
.btn-primary-custom:focus-visible,
.btn-submit-leave:focus-visible {
    outline: 3px solid rgba(0, 86, 179, 0.6);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.15);
}

.sidebar-nav-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: -2px;
}

/* ============================================================
   LOADING BUTTON STATE
   ============================================================ */

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    margin-left: 8px;
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-spinner {
    display: inline-flex !important;
}

.btn-spinner {
    display: none !important;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   REQUIRED STAR INDICATOR
   ============================================================ */

.required-label::after {
    content: ' *';
    color: var(--danger);
    font-weight: 700;
}

/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.95rem;
    transition: var(--transition);
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary);
}

/* ============================================================
   BUTTON ACTIVE STATES
   ============================================================ */

.btn-sm-action:active {
    transform: scale(0.95);
}

.btn-approve:active {
    background: #1e7e34;
    color: white;
}

.btn-reject:active {
    background: #bd2130;
    color: white;
}

.btn-attendance:active {
    transform: translateY(1px) !important;
    box-shadow: none !important;
}

.btn-primary-custom:active,
.btn-submit-leave:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ============================================================
   RESPONSIVE SIDEBAR (MOBILE)
   ============================================================ */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: inline-flex !important;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }
}

@media (min-width: 993px) {
    .sidebar-toggle {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }
}

/* ============================================================
   MOBILE ENHANCEMENTS
   ============================================================ */

@media (max-width: 576px) {
    .camera-placeholder {
        height: 180px;
    }

    .btn-attendance {
        min-height: 56px;
        font-size: 1.05rem;
        padding: 1rem 1.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .camera-preview-wrapper {
        max-width: 100%;
    }
}

/* ============================================================
   PENDING PULSE BADGE
   ============================================================ */

.badge-pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ============================================================
   SWEETALERT2 OVERRIDES
   ============================================================ */

.swal2-popup {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    border-radius: var(--radius) !important;
}

.swal2-confirm {
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
}

/* Text decoration fix for action buttons in table */
.btn-sm-action {
    text-decoration: none;
}

a.btn-sm-action:hover {
    text-decoration: none;
}

/* ============================================================
   NOTIFICATION SYSTEM
   ============================================================ */

.notif-wrapper {
    position: relative;
}

.notif-bell {
    position: relative;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 1.05rem;
}

.notif-bell:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.notif-bell:active {
    transform: translateY(0);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: notifBadgePulse 2s ease-in-out infinite;
    line-height: 1;
}

@keyframes notifBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Bell Shake Animation */
@keyframes bellShake {
    0% { transform: rotate(0); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    85% { transform: rotate(-2deg); }
    100% { transform: rotate(0); }
}

.notif-bell.shake i {
    animation: bellShake 0.8s ease-in-out;
    display: inline-block;
    transform-origin: top center;
}

/* Dropdown Panel */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    z-index: 2000;
    display: none;
    overflow: hidden;
    animation: notifSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-dropdown.show {
    display: block;
}

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Arrow at top */
.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 14px;
    width: 14px;
    height: 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: 1;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    position: relative;
    z-index: 2;
}

.notif-dropdown-header h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.notif-mark-all {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.notif-mark-all:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notif-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.notif-dropdown-body::-webkit-scrollbar {
    width: 5px;
}

.notif-dropdown-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* Notification Item */
.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #f1f3f5;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    background: #f0f7ff;
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.notif-item.unread:hover {
    background: #e8f0fe;
}

.notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-item-icon.approved {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.notif-item-icon.rejected {
    background: linear-gradient(135deg, #fde8e8, #fecaca);
    color: #dc2626;
}

.notif-item-icon.new-request {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
    line-height: 1.3;
}

.notif-item-message {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}

.notif-item-time {
    font-size: 0.68rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Empty State */
.notif-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #9ca3af;
}

.notif-empty i {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.4;
}

.notif-empty p {
    font-size: 0.85rem;
    margin: 0;
    font-weight: 500;
}

/* ============================================================
   NOTIFICATION RESPONSIVE
   ============================================================ */

@media (max-width: 576px) {
    .notif-dropdown {
        position: fixed;
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
        border-radius: var(--radius);
    }

    .notif-dropdown::before {
        display: none;
    }
}