/**
 * Absenin - Responsive CSS
 * Professional Mobile-First Responsive Design
 * ==========================================
 */

:root {
    --primary-color: #ff4b1f;
    --secondary-color: #858796;
    --success-color: #0f9f6e;
    --danger-color: #d92d20;
    --warning-color: #f79009;
    --info-color: #0ea5e9;
    --dark-color: #151515;
    --light-color: #f8f9fc;
    --white-color: #ffffff;

    --archa-orange: #ff4b1f;
    --archa-orange-dark: #d63a12;
    --archa-ink: #151515;
    --archa-muted: #667085;
    --gradient-primary: linear-gradient(135deg, #151515 0%, #2b2b2b 52%, #ff4b1f 100%);
    --gradient-success: linear-gradient(135deg, #087f5b 0%, #12b886 100%);
    --gradient-danger: linear-gradient(135deg, #b42318 0%, #f04438 100%);
    
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --border-radius: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: #f5f6f8;
    overflow-x: hidden;
}

.bg-auth,
.overlay-auth {
    min-height: 100vh;
    background: #f5f6f8 !important;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: #f5f6f8;
}

.auth-panel {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.125rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.auth-logo {
    width: 148px;
    height: auto;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 0.875rem;
    border-radius: 999px;
    background: #151515;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
}

.auth-copy {
    margin-bottom: 1.5rem;
}

.auth-copy h1 {
    margin: 0 0 0.5rem;
    color: #151515;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-copy p {
    margin: 0;
    color: #667085;
    font-size: 1rem;
}

.auth-form {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e6e8ec;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
}

.auth-form label {
    margin: 0.5rem 0 0;
    color: #344054;
    font-size: 0.875rem;
    font-weight: 800;
}

.auth-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0 1rem;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.auth-input i {
    color: var(--archa-orange);
}

.auth-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #151515;
    font-size: 1rem;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin-top: 0.5rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--archa-orange);
    color: #ffffff;
    font-weight: 900;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

.auth-links a,
.auth-install-trigger {
    border: 0;
    background: transparent;
    color: #151515;
    font-size: 0.875rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-install-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.auth-footer-note {
    margin-top: 2rem;
    color: #667085;
    font-size: 0.8125rem;
    text-align: center;
}

.auth-visual {
    display: none;
}

.auth-visual-card,
.auth-signal-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(420px, 80%);
    padding: 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.auth-signal-card {
    margin-top: 1rem;
    background: #151515;
    color: #ffffff;
}

.auth-visual-card span,
.auth-signal-card span {
    display: block;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-signal-card span {
    color: #f2f4f7;
}

.auth-visual-card strong,
.auth-signal-card strong {
    display: block;
    color: #151515;
    font-size: 1.5rem;
    font-weight: 900;
}

.auth-signal-card strong {
    color: #ffffff;
}

.auth-visual-card i {
    color: var(--archa-orange);
    font-size: 2rem;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: minmax(420px, 0.9fr) 1.1fr;
    }

    .auth-panel {
        padding: 4rem;
    }

    .auth-visual {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background:
            linear-gradient(135deg, rgba(21, 21, 21, 0.96), rgba(21, 21, 21, 0.88)),
            repeating-linear-gradient(45deg, transparent 0, transparent 18px, rgba(255, 75, 31, 0.18) 18px, rgba(255, 75, 31, 0.18) 20px);
    }
}

.pwa-install-button {
    position: fixed;
    right: 1rem;
    bottom: 5.75rem;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0 0.875rem;
    border: 0;
    border-radius: 999px;
    background: #151515;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.2);
    font-weight: 900;
}

.pwa-install-button[hidden],
.pwa-ios-hint[hidden] {
    display: none !important;
}

.pwa-install-button-auth {
    bottom: 1rem;
}

.pwa-ios-hint {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1300;
    display: grid;
    gap: 0.25rem;
    padding: 1rem 3rem 1rem 1rem;
    border-radius: 8px;
    background: #151515;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.28);
}

.pwa-ios-hint span {
    color: #f2f4f7;
    font-size: 0.875rem;
}

.pwa-ios-close {
    position: absolute;
    right: 0.75rem;
    top: 0.625rem;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 1.5rem;
}

.mobile-admin-shell {
    display: none;
}

@media (max-width: 991.98px) {
    .mobile-admin-shell {
        display: block;
    }

    body.has-mobile-admin-shell #content-wrapper {
        padding-top: 72px;
        padding-bottom: 86px;
    }

    body.has-mobile-admin-shell .topbar {
        display: none !important;
    }

    body.has-mobile-admin-shell .desktop-content {
        display: block;
        padding: 0.875rem;
    }

    body.has-mobile-admin-shell .mobile-content {
        margin-top: 0;
        margin-bottom: 0;
        padding: 0.875rem;
    }

    body.has-mobile-admin-shell .mobile-content > .mobile-header,
    body.has-mobile-admin-shell .mobile-content > .mobile-bottom-nav {
        display: none !important;
    }

    .mobile-admin-appbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1110;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        height: 64px;
        padding: 0 1rem;
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid #eaecf0;
        box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
    }

    .mobile-admin-brand img {
        width: 92px;
        height: auto;
        display: block;
    }

    .mobile-admin-title {
        min-width: 0;
        flex: 1;
        display: grid;
        gap: 0.125rem;
    }

    .mobile-admin-title span,
    .mobile-admin-title small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-admin-title span {
        color: #151515;
        font-size: 0.95rem;
        font-weight: 900;
    }

    .mobile-admin-title small {
        color: #667085;
        font-size: 0.75rem;
        font-weight: 700;
    }

    .mobile-admin-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 8px;
        background: #151515;
        color: #ffffff;
    }

    .mobile-admin-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1110;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        min-height: 70px;
        padding: 0.375rem 0.25rem calc(0.375rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #eaecf0;
        box-shadow: 0 -12px 30px rgba(16, 24, 40, 0.1);
    }

    .mobile-admin-nav a,
    .mobile-admin-nav button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #667085;
        font-size: 0.6875rem;
        font-weight: 800;
        text-decoration: none;
    }

    .mobile-admin-nav i {
        font-size: 1.125rem;
    }

    .mobile-admin-nav .active {
        background: #fff0eb;
        color: var(--archa-orange);
    }

    .mobile-admin-drawer {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: none;
        background: rgba(21, 21, 21, 0.48);
    }

    .mobile-admin-drawer.is-open {
        display: flex;
        align-items: flex-end;
    }

    .mobile-admin-drawer-panel {
        width: 100%;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
        border-radius: 8px 8px 0 0;
        background: #ffffff;
        box-shadow: 0 -18px 50px rgba(16, 24, 40, 0.18);
    }

    .mobile-admin-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
    }

    .mobile-admin-drawer-head strong {
        color: #151515;
        font-size: 1.125rem;
    }

    .mobile-admin-drawer-head button {
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 8px;
        background: #f2f4f7;
        color: #151515;
        font-size: 1.5rem;
    }

    .mobile-admin-drawer-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .mobile-admin-drawer-grid a {
        min-height: 88px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
        border: 1px solid #eaecf0;
        border-radius: 8px;
        background: #ffffff;
        color: #344054;
        text-align: center;
        text-decoration: none;
        font-size: 0.75rem;
        font-weight: 900;
    }

    .mobile-admin-drawer-grid a.active {
        border-color: #ffd6ca;
        background: #fff0eb;
        color: var(--archa-orange);
    }
}

/* ==========================================
   ADMIN MOBILE-FIRST TABLES AND FILTERS
   ========================================== */
.admin-attendance-card {
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.admin-attendance-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: #ffffff;
}

.admin-filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
}

.admin-filter-form .form-group {
    margin-bottom: 0;
}

.admin-filter-form label {
    display: block;
    margin-bottom: 0.25rem;
    color: #4a5568;
    font-size: 0.8125rem;
    font-weight: 700;
}

.admin-filter-form .form-control,
.admin-filter-form .btn,
.admin-export-action .btn {
    min-height: 44px;
    border-radius: 8px;
}

.admin-export-action .btn {
    width: 100%;
}

.admin-attendance-list {
    width: 100%;
}

.attendance-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e3e6f0;
    background: #f8f9fc;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem 0 0;
    list-style: none;
}

.pagination li {
    margin: 0;
}

.pagination li a {
    display: block;
    min-width: 42px;
    padding: 0.625rem 0.75rem;
    background-color: #ffffff;
    color: #4e73df;
    text-align: center;
    text-decoration: none;
    border: 1px solid #d8def7;
    border-radius: 8px;
}

.pagination li a:hover {
    background-color: #eef2ff;
}

.pagination .active a {
    background-color: #4e73df;
    color: #ffffff;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .admin-attendance-card .card-body {
        padding: 0.875rem;
        background: #f4f6f9;
    }

    .admin-mobile-table,
    .admin-mobile-table thead,
    .admin-mobile-table tbody,
    .admin-mobile-table th,
    .admin-mobile-table td,
    .admin-mobile-table tr {
        display: block;
        width: 100%;
    }

    .admin-mobile-table {
        border: 0;
        background: transparent;
    }

    .admin-mobile-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .admin-mobile-table tbody tr {
        margin-bottom: 0.875rem;
        padding: 0.875rem;
        background: #ffffff;
        border: 1px solid #e3e6f0;
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
    }

    .admin-mobile-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .admin-mobile-table th,
    .admin-mobile-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        min-height: 40px;
        padding: 0.5rem 0;
        border: 0;
        border-bottom: 1px solid #eef0f6;
        text-align: right;
    }

    .admin-mobile-table th::before,
    .admin-mobile-table td::before {
        content: attr(data-label);
        color: #667085;
        font-size: 0.8125rem;
        font-weight: 700;
        text-align: left;
    }

    .admin-mobile-table td:last-child {
        border-bottom: 0;
    }
}

@media (min-width: 768px) {
    .admin-attendance-toolbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    .admin-filter-form {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto;
        align-items: end;
        max-width: 720px;
    }

    .admin-export-action .btn {
        width: auto;
    }
}

/* ==========================================
   RESPONSIVE CONTAINER
   ========================================== */
.responsive-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

/* ==========================================
   MOBILE VIEW (Default - Mobile First)
   ========================================== */

/* Hide desktop sidebar on mobile */
.sidebar {
    display: none !important;
}

/* Hide desktop topbar on mobile */
.topbar {
    display: none !important;
}

/* Mobile Header */
.mobile-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    padding: 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-logo {
    height: 40px;
    width: auto;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-header-actions a {
    color: white;
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-header-actions a:hover {
    transform: scale(1.1);
}

.mobile-clock {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Mobile Content */
.mobile-content {
    display: block;
    margin-top: 80px;
    margin-bottom: 80px;
    padding: 1rem;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.75rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.75rem;
    transition: var(--transition);
    padding: 0.5rem;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: var(--primary-color);
}

.mobile-bottom-nav a i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Desktop View - Hidden by default */
.desktop-header,
.desktop-content {
    display: none;
}

/* ==========================================
   CARD COMPONENTS (Mobile First)
   ========================================== */
.card-modern {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-modern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-color);
}

.card-modern-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.card-modern-body {
    padding: 0;
}

/* ==========================================
   BUTTON COMPONENTS
   ========================================== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
}

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

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

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

.btn-modern-warning {
    background: #fff4e5;
    color: #b54708;
    border: 1px solid #fedf89;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modern-block {
    display: flex;
    width: 100%;
}

/* ==========================================
   ABSEN CARD COMPONENTS
   ========================================== */
.absen-action-card {
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.absen-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.absen-action-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.absen-action-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

.absen-action-item i {
    font-size: 2.5rem;
}

.absen-action-item span {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   SCHEDULE INFO
   ========================================== */
.schedule-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.schedule-item {
    text-align: center;
}

.schedule-item-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

	.schedule-item-time {
	    font-size: 1rem;
	    font-weight: 700;
	    color: var(--dark-color);
	}

.today-presence-status {
    display: grid;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.875rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.today-presence-status strong {
    font-size: 0.95rem;
}

.today-presence-status span {
    font-size: 0.8125rem;
    opacity: 0.88;
}

.absen-action-item.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

/* ==========================================
   ATTENDANCE HISTORY
   ========================================== */
.attendance-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attendance-history-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.attendance-history-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.attendance-history-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.attendance-history-details {
    flex: 1;
}

.attendance-history-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.attendance-history-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.attendance-history-status {
    text-align: right;
}

.attendance-history-time {
    font-size: 0.875rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.badge-modern {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    text-transform: uppercase;
}

.badge-modern-success {
    background: var(--success-color);
    color: white;
}

.badge-modern-warning {
    background: var(--warning-color);
    color: var(--dark-color);
}

/* ==========================================
   MODAL ENHANCEMENTS
   ========================================== */
.modal-modern .modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-modern .modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-modern .modal-title {
    font-weight: 700;
}

.modal-modern .btn-close {
    filter: brightness(0) invert(1);
}

.modal-modern .modal-body {
    padding: 2rem;
}

.modal-modern .modal-footer {
    border-top: 2px solid var(--light-color);
    padding: 1.5rem;
}

/* Video Container */
.video-container-modern {
    position: relative;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 1rem;
}

.video-container-modern video {
    width: 100%;
    height: auto;
    display: block;
}

.video-container-modern canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.face-loading-panel {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding: 1rem;
    background: rgba(21, 21, 21, 0.82);
    color: #ffffff;
    text-align: center;
}

.face-loading-panel.is-hidden {
    display: none;
}

.face-loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--archa-orange);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.capture-feedback {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    min-height: 58px;
    margin: 0.875rem 0;
    padding: 0.75rem;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #f8fafc;
}

.capture-feedback i {
    color: var(--archa-orange);
    font-size: 1.25rem;
}

.capture-feedback strong {
    display: block;
    color: #151515;
    font-size: 0.9375rem;
}

.capture-feedback span {
    display: block;
    color: #667085;
    font-size: 0.8125rem;
}

.capture-feedback.is-success {
    border-color: #a6f4c5;
    background: #ecfdf3;
}

.capture-feedback.is-success i {
    color: #0f9f6e;
}

.captured-preview {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #ecfdf3;
    border: 1px solid #a6f4c5;
}

.captured-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.captured-preview strong {
    display: block;
    color: #067647;
    font-size: 0.95rem;
}

.captured-preview span {
    display: block;
    color: #344054;
    font-size: 0.8125rem;
}

	@media (max-width: 767.98px) {
	    .modal-modern .modal-dialog {
	        margin: 0;
	        min-height: 100dvh;
	    }

	    .modal-modern .modal-content {
	        height: 100dvh;
	        display: flex;
	        flex-direction: column;
	        border-radius: 0;
	    }

    .modal-modern .modal-header {
        border-radius: 0;
        padding: 1rem;
    }

	    .modal-modern .modal-body {
	        flex: 1 1 auto;
	        overflow-y: auto;
	        padding: 1rem;
	        padding-bottom: 1rem;
	        -webkit-overflow-scrolling: touch;
	    }

	    .modal-modern .modal-footer {
	        flex: 0 0 auto;
	        z-index: 4;
	        display: grid;
	        grid-template-columns: 0.8fr 1.2fr;
	        gap: 0.75rem;
	        padding: 0.875rem;
	        padding-bottom: calc(0.875rem + env(safe-area-inset-bottom));
	        background: #ffffff;
	        box-shadow: 0 -12px 28px rgba(16, 24, 40, 0.14);
	    }

    .modal-modern .modal-footer .btn,
    .modal-modern .modal-footer .btn-modern {
        width: 100%;
        min-height: 48px;
    }
}

/* ==========================================
   MAP CONTAINER
   ========================================== */
.map-container-modern {
    width: 100%;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.map-container-modern .leaflet-container {
    border-radius: var(--border-radius);
}

/* ==========================================
   LOADING STATES
   ========================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.shadow-modern {
    box-shadow: var(--shadow-md);
}

/* ==========================================
   TABLET VIEW (768px and up)
   ========================================== */
@media (min-width: 768px) {
    .mobile-content {
        padding: 2rem;
    }
    
    .card-modern {
        padding: 2rem;
    }
    
    .absen-action-grid {
        gap: 1.5rem;
    }
    
    .attendance-history-item {
        padding: 1.5rem;
    }
}

/* ==========================================
   DESKTOP VIEW (992px and up)
   ========================================== */
@media (min-width: 992px) {
    /* Show desktop layout */
    .sidebar {
        display: flex !important;
    }
    
    .topbar {
        display: flex !important;
    }
    
    /* Hide mobile layout */
    .mobile-header {
        display: none !important;
    }
    
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .mobile-content {
        display: none !important;
    }
    
    /* Show desktop content */
    .desktop-content {
        display: block;
        padding: 2rem;
    }
    
    /* Adjust wrapper for desktop sidebar */
    #wrapper {
        display: flex;
    }
    
    #content-wrapper {
        flex: 1;
        overflow-x: hidden;
    }
    
    /* Card adjustments for desktop */
    .card-modern {
        margin-bottom: 2rem;
    }
    
    /* Grid layouts for desktop */
    .desktop-grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .desktop-grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Larger modal on desktop */
    .modal-modern .modal-dialog {
        max-width: 900px;
    }
    
    /* Attendance grid for desktop */
    .attendance-history-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ==========================================
   LARGE DESKTOP VIEW (1200px and up)
   ========================================== */
@media (min-width: 1200px) {
    .desktop-content {
        padding: 2.5rem;
    }
    
    .desktop-grid-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .attendance-history-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .mobile-header,
    .mobile-bottom-nav,
    .sidebar,
    .topbar,
    .btn-modern,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card-modern {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
