/* =============================================
   MOBILE PWA - Absensi YIM
   Yayasan Islam Minhajussunnah Samarinda
   Theme: Enterprise Islami
   ============================================= */

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

:root {
    --primary: #006747;
    --primary-dark: #004D34;
    --primary-light: #E8F5E9;
    --gold: #C9A84C;
    --gold-light: #FFF8E1;
    --surface: #FFFFFF;
    --background: #F5F7FA;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

.mobile-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--background);
    position: relative;
    overflow-x: hidden;
}

/* =============================================
   HEADER WITH DOME PATTERN
   ============================================= */

.mobile-header {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 28px 20px 80px;
    border-radius: 0 0 28px 28px;
    position: relative;
    overflow: hidden;
}

.mobile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none'%3E%3Cpath d='M40 8C40 8 32 16 32 24C32 28.4183 35.5817 32 40 32C44.4183 32 48 28.4183 48 24C48 16 40 8 40 8Z' fill='white' opacity='0.03'/%3E%3Cpath d='M40 32V56' stroke='white' opacity='0.03' stroke-width='2'/%3E%3Cpath d='M28 56H52' stroke='white' opacity='0.03' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    opacity: 0.5;
}

.mobile-header .header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.mobile-header .bismillah {
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 8px;
    font-style: italic;
    letter-spacing: 0.3px;
}

.mobile-header .greeting {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
}

.mobile-header .user-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.mobile-header .user-dept {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 6px;
    font-weight: 500;
}

.mobile-header .avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

/* =============================================
   CARDS
   ============================================= */

.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px;
    margin: 0 16px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.card-elevated {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    margin: 0 16px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: none;
}

/* =============================================
   CLOCK CARD
   ============================================= */

.clock-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px 16px;
    margin: -40px 16px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    position: relative;
    z-index: 10;
    text-align: center;
    border: 1px solid var(--border);
}

.clock-time {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.clock-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.clock-wib {
    font-size: 9px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* =============================================
   SCHEDULE CARD
   ============================================= */

.schedule-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px;
    margin: 0 16px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.schedule-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.schedule-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.schedule-icon.in {
    background: var(--primary-light);
    color: var(--primary);
}

.schedule-icon.out {
    background: #FEE2E2;
    color: var(--danger);
}

.schedule-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.schedule-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

.schedule-btn {
    background: none;
    border: 2px dashed var(--primary);
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.schedule-btn:active {
    background: var(--primary-light);
    transform: scale(0.97);
}

.schedule-empty {
    font-size: 11px !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    font-style: italic;
}

.schedule-done {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--primary);
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.schedule-countdown {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.schedule-countdown strong {
    color: var(--primary);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* =============================================
   BIG ABSEN BUTTON
   ============================================= */

/* =============================================
   STATUS SECTION
   ============================================= */

.status-section {
    margin: 0 16px 20px;
}

.status-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-header i {
    color: var(--primary);
}

.status-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.status-card .status-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.status-in .status-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.status-out .status-icon {
    background: #FEE2E2;
    color: var(--danger);
}

.status-card .status-info {
    flex: 1;
}

.status-card .status-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-card .status-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.status-card .status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

/* =============================================
   SCHEDULE CARD OLD (KEEP FOR COMPAT)
   ============================================= */

.schedule-card-old {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    margin: -56px 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
    border: 1px solid var(--border);
}

.schedule-card .schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-card .schedule-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-card .schedule-date {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.schedule-card .schedule-time {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin: 16px 0;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.schedule-card .schedule-time span {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0 8px;
    font-weight: 600;
}

.schedule-card .schedule-time .timezone {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn-checkin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-checkin-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 103, 71, 0.3);
}

.btn-checkin-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 103, 71, 0.2);
}

.btn-checkin-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-checkin-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-checkin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-outline {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-outline:active {
    background: var(--background);
}

.btn-full {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:active {
    background: var(--primary-dark);
}

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

.btn-danger-outline {
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
}

/* =============================================
   QUICK ACTIONS
   ============================================= */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0 16px 20px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--surface);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}

.quick-action:active {
    background: var(--background);
    transform: scale(0.97);
}

.quick-action .qa-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.qa-green { background: var(--primary-light); color: var(--primary); }
.qa-blue { background: #E3F2FD; color: #1565C0; }
.qa-gold { background: var(--gold-light); color: #B8860B; }
.qa-red { background: #FEE2E2; color: var(--danger); }

/* =============================================
   REKAP PRESENSI
   ============================================= */

.recap-section {
    margin: 0 16px 20px;
}

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

.recap-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.recap-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.recap-list {
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.recap-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.recap-item:last-child {
    border-bottom: none;
}

.recap-item:active {
    background: var(--background);
}

.recap-date {
    flex: 1;
    min-width: 0;
}

.recap-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.recap-times {
    display: flex;
    gap: 16px;
    margin-left: 12px;
}

.recap-time-group {
    text-align: center;
    min-width: 60px;
}

.recap-time-label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 2px;
}

.recap-time-value {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.recap-time-value.time-in { color: var(--primary); }
.recap-time-value.time-out { color: var(--danger); }
.recap-time-value.time-empty { color: #D1D5DB; }

.recap-arrow {
    color: #D1D5DB;
    font-size: 12px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* =============================================
   ATTENDANCE HISTORY
   ============================================= */

.attendance-section {
    margin: 0 16px 20px;
}

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

.attendance-section .section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.attendance-section .section-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.attendance-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
}

.attendance-card .att-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attendance-card .att-times {
    display: flex;
    gap: 16px;
}

.attendance-card .att-time-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.attendance-card .att-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.att-icon-in { background: var(--primary-light); color: var(--primary); }
.att-icon-out { background: #FEE2E2; color: var(--danger); }

.attendance-card .att-time-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.attendance-card .att-time-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* =============================================
   FORMS
   ============================================= */

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: var(--background);
    transition: all 0.2s ease;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 103, 71, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 44px;
}

.form-input-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 16px;
}

.form-input-icon .input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

/* =============================================
   BADGES
   ============================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-success { background: var(--primary-light); color: var(--primary); }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: var(--gold-light); color: #92400E; }
.badge-info { background: #E3F2FD; color: #1565C0; }
.badge-neutral { background: var(--background); color: var(--text-secondary); }

/* =============================================
   ALERTS
   ============================================= */

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin: 0 16px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: var(--primary-light); color: var(--primary); border: 1px solid #A7F3D0; }

/* =============================================
   BOTTOM NAVIGATION
   ============================================= */

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 10px;
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #9CA3AF;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: 10px;
    transition: all 0.15s ease;
    gap: 4px;
}

.mobile-nav a i { font-size: 20px; }

.mobile-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* =============================================
   PROFILE
   ============================================= */

.profile-header {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 32px 20px;
    text-align: center;
    border-radius: 0 0 28px 28px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none'%3E%3Cpath d='M40 8C40 8 32 16 32 24C32 28.4183 35.5817 32 40 32C44.4183 32 48 28.4183 48 24C48 16 40 8 40 8Z' fill='white' opacity='0.03'/%3E%3Cpath d='M40 32V56' stroke='white' opacity='0.03' stroke-width='2'/%3E%3Cpath d='M28 56H52' stroke='white' opacity='0.03' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    opacity: 0.5;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 34px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(8px);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.profile-nip {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.profile-info {
    margin: 20px 16px;
}

.profile-info-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.profile-info-card .info-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info-card .info-title i {
    color: var(--primary);
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--background);
}

.profile-info-row:last-child { border-bottom: none; }

.profile-info-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-info-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

/* =============================================
   ATTENDANCE MODAL
   ============================================= */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    backdrop-filter: blur(4px);
}

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

.modal-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-bottom .modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.photo-frame {
    width: 100%;
    max-width: 240px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--border);
    background: var(--background);
    aspect-ratio: 3/4;
}

.photo-frame video,
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9CA3AF;
    gap: 10px;
}

.photo-placeholder i { font-size: 40px; }
.photo-placeholder span { font-size: 12px; font-weight: 500; }

.location-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.location-badge.success { background: var(--primary-light); color: var(--primary); }
.location-badge.error { background: #FEE2E2; color: #991B1B; }
.location-badge.loading { background: var(--background); color: var(--text-secondary); }

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.login-header {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 48px 24px 40px;
    text-align: center;
    border-radius: 0 0 32px 32px;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none'%3E%3Cpath d='M40 8C40 8 32 16 32 24C32 28.4183 35.5817 32 40 32C44.4183 32 48 28.4183 48 24C48 16 40 8 40 8Z' fill='white' opacity='0.05'/%3E%3Cpath d='M40 32V56' stroke='white' opacity='0.05' stroke-width='2'/%3E%3Cpath d='M28 56H52' stroke='white' opacity='0.05' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    opacity: 0.6;
}

.login-header .masjid-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.login-header .bismillah {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.login-header .app-name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.login-header .app-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.login-body {
    padding: 32px 24px 40px;
    flex: 1;
}

.login-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-weight: 500;
}

.login-footer {
    text-align: center;
    font-size: 11px;
    color: #9CA3AF;
    padding: 16px;
    font-weight: 500;
}

/* =============================================
   SUCCESS SCREEN
   ============================================= */

.success-screen {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 40px 24px;
    text-align: center;
}

.success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon i {
    font-size: 34px;
    color: var(--primary);
}

.success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.success-detail {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.success-location {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
}

/* =============================================
   LOADING
   ============================================= */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* =============================================
   HISTORY LIST
   ============================================= */

.history-list {
    padding: 20px 16px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.history-item:last-child { border-bottom: none; }

.history-left { flex: 1; }

.history-day {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.history-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 500;
}

.history-right {
    display: flex;
    gap: 14px;
    align-items: center;
}

.history-time { text-align: center; }

.history-time-label {
    font-size: 9px;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.history-time-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.history-time-value.in { color: var(--primary); }
.history-time-value.out { color: var(--danger); }

/* =============================================
   SECTION TITLE
   ============================================= */

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 16px 16px;
}

.section-divider .section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider .section-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   STAT CARD
   ============================================= */

.stat-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0 16px 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid var(--border);
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-value.green { color: var(--primary); }
.stat-card .stat-value.gold { color: var(--gold); }
