:root {
    --primary: #eb7613;
    --primary-dark: #c09e5e;
    --primary-light: #f5a745;
    --secondary: #013d21;
    --secondary-light: #1a5a37;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --neutral-50: #fafbfc;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--neutral-50);
    color: var(--neutral-900);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(30px);
    }
}

@keyframes fadeOutLoadingScreen {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* HTML: <div class="loader"></div> */
.spinner {
    width: 20px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid white;
    animation:
        l20-1 0.8s infinite linear alternate,
        l20-2 1.6s infinite linear;
}

@keyframes l20-1 {
    0% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
    }
    12.5% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 0%, 100% 0%, 100% 0%);
    }
    25% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 100%);
    }
    50% {
        clip-path: polygon(50% 50%, 0 0, 50% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
    }
    62.5% {
        clip-path: polygon(50% 50%, 100% 0, 100% 0%, 100% 0%, 100% 100%, 50% 100%, 0% 100%);
    }
    75% {
        clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0% 100%);
    }
    100% {
        clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0% 100%);
    }
}

@keyframes l20-2 {
    0% {
        transform: scaleY(1) rotate(0deg);
    }
    49.99% {
        transform: scaleY(1) rotate(135deg);
    }
    50% {
        transform: scaleY(-1) rotate(0deg);
    }
    100% {
        transform: scaleY(-1) rotate(-135deg);
    }
}

.loading-container {
    text-align: center;
    color: white;
}

.loader {
    width: 20px;
    height: 20px;
    margin: 0;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.login-loader {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
}

.login-loader::before,
.login-loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #fff;
    animation: prixClipFix 2s linear infinite;
}
.login-loader::after {
    inset: 8px;
    transform: rotate3d(90, 90, 0, 180deg);
    border-color: #ff3d00;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes prixClipFix {
    0% {
        clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
    }
    50% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
    }
    75%,
    100% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
    }
}

.loading-screen h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.loading-screen p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 50%, var(--primary) 100%);
    /* background-image: url('/gedung_uca.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; */
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    z-index: 0;
    animation: float 8s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    z-index: 0;
    animation: float 10s ease-in-out infinite reverse;
}

.login-box {
    background: white;
    padding: 56px;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.login-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, rgba(235, 118, 19, 0.1) 0%, rgba(1, 61, 33, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(235, 118, 19, 0.2);
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.login-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: pulse 3s ease-in-out infinite;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.login-header p {
    color: var(--neutral-500);
    font-size: 15px;
    font-weight: 500;
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

.form-group {
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--neutral-800);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--neutral-300);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: var(--neutral-50);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(235, 118, 19, 0.15);
    transform: translateY(-2px);
}

.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--neutral-300);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background-color: var(--neutral-50);
    font-weight: 500;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(235, 118, 19, 0.15);
    transform: translateY(-2px);
}

.form-riwayat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s ease,
        height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(235, 118, 19, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.5s backwards;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 118, 19, 0.4);
}

.btn-outline-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s ease,
        height 0.6s ease;
    z-index: -1;
}

.btn-outline-secondary:hover::before {
    width: 450px;
    height: 450px;
}

/* Hover State */
.btn-outline-secondary:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(1, 61, 33, 0.25);
}

/* Active State */
.btn-outline-secondary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(1, 61, 33, 0.2);
}

/* Disabled State */
.btn-outline-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: var(--neutral-300);
    color: var(--neutral-400);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(1, 61, 33, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 61, 33, 0.4);
}

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

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    width: auto;
}

.lpsi-contact {
    color: #013d20 !important;
}

.warning {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bfdbfe;
}

.alert-info {
    background-color: #f0f9ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.note {
    padding: 16px;
    font-size: 15px;
    color: var(--neutral-600);
    border-radius: 10px;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}

.note p {
    margin: 0;
    text-align: center;
}

.kembali {
    padding: 16px;
    border-top: 1.5px solid var(--neutral-200);
    font-size: 13px;
    color: var(--neutral-600);
    background-color: var(--neutral-50);
    border-radius: 10px;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}

.kembali a {
    margin: 0;
    text-align: center;
}

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s ease-out;
}

header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 50%, var(--primary) 100%);
    color: white;
    padding: 18px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-image {
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-image img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text .app-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.logo-text .app-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.user-info {
    font-size: 14px;
    font-weight: 500;
}

.user-info strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

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

.header-right button {
    width: auto;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    background: none;
    border: none;
    padding: 10px;
    margin-right: -10px;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(12px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-12px);
}

nav {
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

nav button {
    background: none;
    border: none;
    padding: 18px 24px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--neutral-600);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    position: relative;
}

nav button:hover {
    color: var(--primary);
    background-color: var(--neutral-50);
}

nav button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

nav button::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 0.3s ease;
}

nav button:hover::after {
    width: 100%;
}

main {
    flex: 1;
    padding: 32px 0;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-bottom: 32px;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--neutral-100);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

.card-header {
    font-size: 12px;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
    font-weight: 600;
}

.card-header img {
    width: 100%;
    height: auto; /* Biarkan tinggi mengikuti proporsi asli gambar */
    max-height: 400px; /* Batasi tinggi maksimal agar tidak terlalu panjang ke bawah */
    object-fit: contain; /* Gambar akan terlihat utuh tanpa terpotong */
    background-color: #f8f9fa; /* Tambahkan warna dasar jika gambar tidak memenuhi area */
    display: block;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    animation: countUp 1s ease-out 0.3s backwards;
}

.card-footer {
    margin-top: 30px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.date {
    color: #888;
    font-size: 14px;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.description-content {
    color: #444;
    line-height: 1.8;
    font-size: 16px;
    word-wrap: break-word; /* Agar teks panjang tidak jebol keluar card */
}

.description-content ul,
.description-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(235, 118, 19, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.stat-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-6px);
    border-left-color: var(--secondary);
}

.stat-label {
    font-size: 13px;
    color: var(--neutral-600);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
}

.attendance-section {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid var(--neutral-100);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.attendance-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(235, 118, 19, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.attendance-header {
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.attendance-header h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--neutral-900);
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: slideUp 0.6s ease-out 0.1s backwards;
}

.time-display {
    font-size: 56px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    animation: slideUp 0.6s ease-out 0.2s backwards;
}

.date-display {
    color: var(--neutral-600);
    font-size: 15px;
    font-weight: 500;
    animation: slideUp 0.6s ease-out 0.3s backwards;
}

.attendance-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.attendance-buttons button {
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out backwards;
}

.attendance-buttons button:nth-child(1) {
    animation-delay: 0.4s;
}

.attendance-buttons button:nth-child(2) {
    animation-delay: 0.5s;
}

.attendance-buttons button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.location-info {
    background: linear-gradient(135deg, rgba(235, 118, 19, 0.08) 0%, rgba(1, 61, 33, 0.08) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 24px;
    font-size: 14px;
    color: var(--neutral-700);
    border-left: 5px solid var(--primary);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out 0.6s backwards;
}

.location-info p {
    margin-bottom: 10px;
    font-weight: 500;
}

.history-section {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--neutral-100);
    animation: fadeInUp 0.6s ease-out;
}

.history-header {
    margin-bottom: 28px;
}

.history-header h2 {
    font-size: 24px;
    color: var(--neutral-900);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.pengumuman-section {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--neutral-100);
    animation: fadeInUp 0.6s ease-out;
}

.pengumuman-header {
    margin-bottom: 28px;
}

.pengumuman-header h2 {
    font-size: 24px;
    color: var(--neutral-900);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.table-responsive {
    overflow-x: auto;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background-color: linear-gradient(135deg, rgba(235, 118, 19, 0.08) 0%, rgba(1, 61, 33, 0.08) 100%);
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: var(--neutral-800);
    border-bottom: 2px solid var(--primary);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 12px;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--neutral-200);
    font-weight: 500;
    animation: fadeIn 0.4s ease-out;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background-color: var(--neutral-50);
}

#fotoModalImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#berkasModal {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fotoModal-container {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 4 / 3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.berkasModal-container {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 4 / 3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pastikan tombol nav-btn bersifat relatif */
.nav-btn {
    position: relative;
    padding-right: 15px; /* Beri ruang sedikit di kanan */
}

/* Gaya lingkaran merah angka 1 */
.badge-notif {
    position: absolute;
    top: -2px; /* Sesuaikan agar pas di pojok atas */
    right: -2px; /* Sesuaikan agar pas di pojok kanan */
    background-color: #ff4757; /* Merah terang */
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff; /* Garis tepi putih agar kontras */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-showPengumuman {
    background-color: #c07cf7;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.badge-checkin {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-checkout {
    background-color: #fce7f3;
    color: #9f1239;
}

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

.badge-luarKampus {
    background-color: #fce7f3;
    color: #9f1239;
}

.badge-sakit {
    background-color: #fce7f3;
    color: var(--warning);
}

.badge-tugasLuar {
    background-color: #fce7f3;
    color: var(--secondary);
}

.badge-cuti {
    background-color: #fce7f3;
    color: var(--info);
}

.badge-pending {
    background-color: #fce7f3;
    color: var(--warning);
}

.badge-ditolak {
    background-color: #fce7f3;
    color: var(--danger);
}

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

.badge-onduty {
    background-color: #fef3c7;
    color: #92400e;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-header {
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--neutral-900);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-close {
    position: absolute;
    right: 28px;
    top: 28px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--neutral-600);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 300;
}

.modal-close:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-900);
}

.modal-body {
    margin-bottom: 28px;
}

.modal-footer {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
}

.modal-footer button {
    min-width: 120px;
}

.camera-container {
    position: relative;
    background-color: #000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 4 / 3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#camera,
#camera2 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#canvas,
#canvas2 {
    display: none;
}

.camera-preview {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.camera-controls {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 20px;
}

.camera-controls button {
    padding: 12px 24px;
    flex: 1;
}

.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--neutral-100);
    animation: fadeInUp 0.6s ease-out;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: 36px;
    animation: slideUp 0.6s ease-out 0.2s backwards;
}

.form-actions button {
    min-width: 140px;
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--neutral-500);
    animation: fadeIn 0.4s ease-out;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--neutral-700);
    margin-bottom: 10px;
    font-weight: 700;
}

/* Custom logout modal */
.logout-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.logout-modal.show {
    display: flex;
}

.logout-modal-content {
    background-color: white;
    border-radius: 16px;
    padding: 48px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.logout-modal-icon {
    font-size: 56px;
    margin-bottom: 20px;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.logout-modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.logout-modal-content p {
    font-size: 15px;
    color: var(--neutral-600);
    margin-bottom: 32px;
    line-height: 1.5;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

.logout-modal-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
}

.btn-cancel {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid var(--neutral-300);
    background-color: white;
    color: var(--neutral-600);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-cancel:hover {
    border-color: var(--neutral-400);
    background-color: var(--neutral-50);
    color: var(--neutral-800);
}

.btn-confirm {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.pagination,
.pagination .page-link {
    box-shadow: none !important;
}
/* Container pagination */
.pagination {
    display: flex;
    justify-content: flex-end; /* rata kanan */
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 20px 0;
    list-style: none;
}

/* Setiap item */
.pagination .page-item {
    list-style: none;
}

/* Link angka */
.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #e67e22; /* warna tema kamu */
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* Hover effect */
.pagination .page-link:hover {
    background-color: #fff3e6;
    border-color: #e67e22;
    color: #e67e22;
    transform: translateY(-2px);
}

/* Active page */
.pagination .page-item.active .page-link {
    background-color: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}

/* Disabled */
.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

.pagination .page-link {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Overlay sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

/* Header info user di dalam sidebar */
.sidebar-user-info {
    display: none; /* Hanya tampil di mobile */
    padding: 20px 24px;
    border-bottom: 1px solid var(--neutral-100);
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .login-box {
        padding: 40px 28px;
        margin: 0 20px;
    }

    .login-header h1 {
        font-size: 26px;
    }

    .header-content {
        gap: 10px;
    }

    .logo-section {
        gap: 10px;
    }

    .logo-image {
        width: 48px;
        height: 48px;
    }

    .logo-image img {
        width: 42px;
        height: 42px;
    }

    .logo-text .app-name {
        font-size: 18px;
    }

    .logo-text .app-subtitle {
        font-size: 11px;
    }

    .hamburger {
        display: flex;
    }

    /* nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav {
        max-height: 0;
        overflow: hidden;
        border-bottom: none;
    }

    nav.active {
        max-height: 600px;
        border-bottom: 1px solid var(--neutral-200);
    }

    nav button {
        padding: 18px;
        border-bottom: 1px solid var(--neutral-100);
        border-radius: 0;
        text-transform: capitalize;
        font-size: 14px;
    }

    nav button.active {
        background-color: var(--neutral-50);
        border-bottom: 3px solid var(--primary);
    } */

    nav {
        position: fixed;
        top: 0;
        left: -280px; /* Sembunyikan ke kiri */
        width: 280px;
        height: 100vh;
        background-color: white;
        z-index: 999;
        max-height: none; /* Override max-height dari nav default */
        overflow-y: auto;
        border-bottom: none;
        box-shadow: none;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 80px; /* Beri ruang agar tidak tertutup header */
    }

    nav.active {
        left: 0; /* Geser masuk dari kiri */
        max-height: none;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        border-bottom: none;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }

    nav button {
        width: 100%;
        text-align: left;
        padding: 16px 24px;
        border-bottom: 1px solid var(--neutral-100);
        border-radius: 0;
        font-size: 14px;
        text-transform: capitalize;
        border-left: 4px solid transparent; /* Indikator aktif di kiri */
        border-bottom-color: transparent; /* Hapus border bawah aktif */
    }

    nav button:hover {
        border-left-color: var(--primary);
        padding-left: 28px;
    }

    nav button.active {
        background-color: rgba(235, 118, 19, 0.08);
        border-left-color: var(--primary);
        border-bottom-color: transparent;
        color: var(--primary);
    }

    nav button::after {
        display: none; /* Hapus animasi underline karena sudah pakai border-left */
    }

    .sidebar-user-info {
        display: flex;
        color: white;
    }

    .sidebar-user-info div {
        color: white !important;
    }

    .sidebar-user-info .sidebar-avatar {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .attendance-buttons {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .time-display {
        font-size: 40px;
    }

    .modal-content {
        width: 90%;
        padding: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 12px;
    }

    .attendance-section {
        padding: 28px;
    }

    .form-section {
        padding: 24px;
    }

    .history-section {
        padding: 20px;
    }

    main {
        padding: 20px 0;
    }

    .logout-modal-content {
        width: 90%;
        padding: 36px 24px;
    }
}

.dp3-card {
    background: var(--white, #fff);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.section-header-dp3 {
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 6px;
}

/* ── Tabel desktop ── */
.card-table-dp3 {
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.dp3-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 560px;
}

.dp3-table th {
    background: var(--neutral-50);
    padding: 8px 10px;
    font-weight: 500;
    font-size: 12px;
    color: var(--neutral-600);
    border-bottom: 1px solid var(--neutral-200);
    text-align: left;
    white-space: nowrap;
}

.dp3-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: top;
    font-size: 18px !important;
}

.dp3-table tr:last-child td {
    border-bottom: none;
}

.dp3-table tfoot td {
    border-bottom: none;
    background: var(--neutral-50);
}

/* ── Badge bobot ── */
.badge-bobot-dp3 {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: #e6f1fb;
    color: #185fa5;
    white-space: nowrap;
}

/* ── Input realisasi ── */
.realisasi-input-dp3 {
    width: 56px;
    padding: 4px 6px;
    border: 1px solid var(--neutral-300);
    border-radius: 6px;
    font-size: 17px;
    text-align: center;
}

.realisasi-input-dp3:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* ── Total row ── */
.dp3-total-row td {
    background: #e6f1fb;
    color: #0c447c;
    font-weight: 500;
}

/* ── Score colors ── */
.score-high {
    color: #3b6d11;
    font-weight: 500;
}
.score-mid {
    color: #854f0b;
    font-weight: 500;
}
.score-low {
    color: #a32d2d;
    font-weight: 500;
}

/* ── Form header & footer ── */
.form-dp3-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.form-dp3-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.form-dp3-cetak-approve {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    /* flex-wrap: wrap; */
}

/* ── Kartu KPI (mobile) ── */
.kpi-mobile-cards {
    display: none;
}

.kpi-card {
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--white, #fff);
}

.kpi-card-no {
    font-size: 11px;
    color: var(--neutral-400);
    margin-bottom: 4px;
}

.kpi-card-title {
    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
    margin-bottom: 8px;
}

.kpi-card-target {
    font-size: 12px;
    color: var(--neutral-500);
    margin-bottom: 12px;
    line-height: 1.4;
}

.kpi-card-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--neutral-100);
}

.kpi-card-input-label {
    font-size: 12px;
    color: var(--neutral-600);
    font-weight: 500;
}

.kpi-card-input-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.kpi-subtotal-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

footer {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 18px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Breakpoints ── */
@media (max-width: 640px) {
    .dp3-card {
        padding: 14px;
    }

    /* Sembunyikan tabel, tampilkan kartu */
    .card-table-dp3 {
        display: none;
    }
    .kpi-mobile-cards {
        display: block;
    }

    .form-dp3-footer button {
        flex: 1;
    }
    .form-dp3-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .pagination {
        justify-content: center;
    }

    .form-riwayat {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .alert-danger {
        font-size: small;
    }

    .login-box {
        padding: 32px 20px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .time-display {
        font-size: 32px;
    }

    .card-value {
        font-size: 24px;
    }

    .stat-value {
        font-size: 22px;
    }

    .modal-content {
        border-radius: 16px 16px 0 0;
    }

    header {
        padding: 14px 0;
    }

    .header-left {
        gap: 12px;
    }

    .user-info {
        display: none;
    }

    .logout-modal-content {
        border-radius: 16px 16px 0 0;
    }

    .dp3-table .cat-row td {
        font-size: 13px !important;
    }

    .dp3-table .subtotal-row .subtotal-kategori {
        font-size: 10px !important;
    }
}
