/* CSS Reset & Variables */
:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --bg-app: #f4f6f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.4);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

/* App Frame representing mobile screens */
#app-container {
    width: 100%;
    max-width: 430px; /* iPhone 14 Pro Max width */
    height: 100vh;
    height: 100dvh; /* Dynamic Viewport Height for mobile browser navbars */
    max-height: 932px; /* iPhone 14 Pro Max height */
    background-color: var(--bg-app);
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

@media (min-width: 450px) {
    #app-container {
        border-radius: 40px;
        border: 12px solid #1e293b;
        height: 88vh;
        height: 88dvh;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Video offscreen - menyembunyikan video tapi tetap mempertahankan rendering untuk canvas.drawImage */
.video-offscreen {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Card glassmorphism styling */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

/* Login Screen design */
#login-screen {
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    background: linear-gradient(180deg, #eff6ff 0%, #f4f6f9 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-box {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: white;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    background-color: white;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input[type="date"], .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    background-color: white;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
    resize: none;
}

.input-wrapper input:focus, .form-group input[type="date"]:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Main App layout styling */
#main-app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    background-color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.header-profile h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-profile span {
    font-size: 11px;
    color: var(--text-secondary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    border: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:active {
    transform: scale(0.95);
}

.badge-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* App Body Views scrolling container */
.app-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px; /* Safe space above navbar */
}

/* Tab Screens management */
.tab-content {
    display: none;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-content.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-title {
    margin-bottom: 20px;
}

.tab-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.tab-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Home Screen layout details */
.card-welcome {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25);
}

.welcome-text h3 {
    font-size: 20px;
    font-weight: 700;
}

.welcome-text p {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

.welcome-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px;
}

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

.stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Quick punch display */
.quick-punch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.quick-punch-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.quick-punch-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-present {
    background-color: var(--success-light);
    color: var(--success);
}

.status-absent {
    background-color: var(--danger-light);
    color: var(--danger);
}

.status-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.quick-punch-times {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.time-block {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.time-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

.time-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Menu Grid item icons */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.menu-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.menu-item:active .menu-icon {
    transform: scale(0.9);
}

.menu-icon i {
    width: 24px;
    height: 24px;
}

.icon-blue { background-color: #eff6ff; color: #2563eb; }
.icon-green { background-color: #ecfdf5; color: #10b981; }
.icon-orange { background-color: #fff7ed; color: #f97316; }
.icon-purple { background-color: #faf5ff; color: #a855f7; }

.menu-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.announcement-section h4, .history-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card-announcement {
    padding: 16px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.card-announcement.type-penting {
    border-left-color: var(--danger);
}

.card-announcement.type-info {
    border-left-color: var(--primary);
}

.card-announcement.type-pengumuman {
    border-left-color: var(--success);
}

.ann-badge {
    display: inline-block;
    background-color: var(--danger-light);
    color: var(--danger);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ann-badge.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.ann-badge.badge-info {
    background-color: #eff6ff;
    color: var(--primary);
}

.ann-badge.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.card-announcement h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.card-announcement p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Attendance punch view styles */
.card-punch-panel {
    text-align: center;
}

.digital-clock {
    font-size: 40px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -1px;
}

.live-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.camera-container {
    background-color: #e2e8f0;
    border-radius: var(--radius-md);
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.camera-container video, .camera-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.placeholder-icon {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.camera-btn {
    position: absolute;
    bottom: 12px;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gps-status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
    background-color: #f1f5f9;
    color: var(--text-secondary);
}

.gps-status-box.success {
    background-color: var(--success-light);
    color: var(--success);
}

.gps-status-box.error {
    background-color: var(--danger-light);
    color: var(--danger);
}

.punch-actions {
    display: flex;
    gap: 16px;
}

.punch-btn {
    flex: 1;
}

/* History lists item layout */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.month-selector select {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background-color: white;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.empty-state i {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.history-item {
    background-color: white;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.hist-date {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.hist-times {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Leave screen circle quota and cards */
.card-leave-quota {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
    border: none;
}

.quota-progress-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.quota-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.quota-num {
    font-size: 28px;
    font-weight: 700;
}

.quota-label {
    font-size: 9px;
    opacity: 0.8;
}

.quota-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quota-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 4px;
}

.quota-detail-item .label { opacity: 0.8; }
.quota-detail-item .val { font-weight: 600; }

.leave-card {
    background-color: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

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

.leave-title {
    font-weight: 600;
    font-size: 14px;
}

.leave-dates {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.leave-reason {
    font-size: 12px;
    color: var(--text-muted);
}

/* Payslips screen card styles */
.payslip-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-payslip {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.card-payslip:active {
    transform: scale(0.98);
    background-color: var(--primary-light);
}

.payslip-meta h4 {
    font-size: 15px;
    font-weight: 600;
}

.payslip-meta span {
    font-size: 12px;
    color: var(--text-secondary);
}

.payslip-amount {
    text-align: right;
}

.payslip-amount h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Profile screen info grids */
.profile-hero-card {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--card-border);
}

.profile-hero-bg {
    height: 90px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    opacity: 0.9;
}

.profile-hero-content {
    text-align: center;
    padding: 0 16px 24px;
    margin-top: -45px;
}

.profile-avatar-wrapper {
    display: inline-block;
    padding: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    font-size: 36px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-hero-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

.card-profile-section {
    padding: 20px 18px;
    background: white;
    margin-bottom: 16px;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding-bottom: 8px;
}

.section-title-row h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-icon {
    width: 18px;
    height: 18px;
}

.section-icon.text-blue {
    color: var(--primary);
}

.section-icon.text-purple {
    color: #a855f7;
}

.profile-info-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.03);
    padding-bottom: 8px;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.info-item p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* Bottom App Navigation Bar */
.app-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-item i {
    width: 22px;
    height: 22px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

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

.nav-item.active i {
    transform: translateY(-2px);
    color: var(--primary);
}

/* Bottom drawer sheet UI */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: flex;
    align-items: flex-end;
}

.drawer-sheet {
    width: 100%;
    background-color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.close-btn {
    border: none;
    background: #f1f5f9;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer-body {
    overflow-y: auto;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .col {
    flex: 1;
}

.file-upload-box {
    border: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.file-upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-box i {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.file-upload-box span {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modal Popup screens */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    width: 100%;
    border-radius: var(--radius-md);
    padding: 20px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
}

/* Struk Slip Gaji calculations structure styles */
.card-payslip {
    background: white;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-payslip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), #a855f7);
}

.payslip-icon-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payslip-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payslip-meta h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.payslip-meta span {
    font-size: 12px;
    color: var(--text-secondary);
}

.payslip-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.payslip-amount h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.slip-digital {
    font-family: inherit;
    color: var(--text-primary);
    line-height: 1.4;
}

.slip-header-brand {
    text-align: center;
    margin-bottom: 20px;
}

.slip-company {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.slip-doc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

.slip-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.slip-meta-item {
    font-size: 12px;
}

.slip-meta-item span {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 2px;
}

.slip-meta-item p {
    font-weight: 600;
    color: var(--text-primary);
}

.slip-section {
    margin-bottom: 20px;
}

.slip-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slip-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.slip-row:last-of-type {
    border-bottom: none;
}

.slip-row span:first-child {
    color: var(--text-secondary);
}

.slip-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.slip-row.total {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 4px;
}

.slip-row.total span:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

.slip-row.total span:last-child {
    font-weight: 700;
    color: var(--primary);
}

.slip-summary-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    text-align: center;
}

.slip-summary-banner span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.slip-summary-banner h2 {
    font-size: 22px;
    font-weight: 700;
}

/* Toasts messages styling */
.toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 500;
    animation: fadeInUp 0.3s forwards;
    white-space: nowrap;
    max-width: 90%;
    text-align: center;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
