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

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

.hidden {
    display: none !important;
}

.skeleton {
    background: linear-gradient(90deg, #dde8f0 25%, #c8d8e4 50%, #dde8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 0.5rem;
}

.skeleton-text {
    height: 0.875rem;
    border-radius: 0.25rem;
}

.skeleton-card {
    height: 5rem;
    border-radius: 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #93B8D0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: rgba(41, 171, 226, 0.15);
    color: #ffffff;
}

.sidebar-link.active {
    background: #29ABE2;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(41, 171, 226, 0.35);
}

.sidebar-link svg {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
}

.badge-hadir    { background: #d1fae5; color: #065f46; }
.badge-terlambat{ background: #fef3c7; color: #92400e; }
.badge-alpha    { background: #fee2e2; color: #991b1b; }

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(27, 42, 74, 0.06);
    border: 1px solid #e8f3fb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 42, 74, 0.10);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #29ABE2;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: #1a90c2;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #f1f5f9;
    color: #1B2A4A;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #C9A227;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-gold:hover {
    background: #b08a1e;
}

.form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: #1B2A4A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    background: white;
}

.form-input:focus {
    border-color: #29ABE2;
    box-shadow: 0 0 0 3px rgba(41, 171, 226, 0.12);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.375rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: #f8fafc;
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: #f8fbfe;
}

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    animation: slideIn 0.3s ease;
    max-width: 20rem;
}

.toast-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.toast-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.toast-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }
.toast-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(1rem); }
    to   { opacity: 1; transform: translateX(0); }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 53, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: overlayIn 0.2s ease;
}

.modal-overlay.modal-closing {
    animation: overlayOut 0.2s ease forwards;
}

.modal-box {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255,255,255,0.05);
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-box.modal-closing {
    animation: modalOut 0.2s ease forwards;
}

.modal-box-sm { max-width: 22rem; }
.modal-box-lg { max-width: 48rem; }

.modal-header {
    background: linear-gradient(135deg, #1B2A4A 0%, #243B6A 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(41, 171, 226, 0.2);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-header-icon svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #29ABE2;
}

.modal-close-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
}

.modal-delete-icon {
    width: 4rem;
    height: 4rem;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-delete-icon svg {
    width: 2rem;
    height: 2rem;
    color: #dc2626;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes overlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.88) translateY(-16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes modalOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.92) translateY(-8px); }
}

.page-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e8f3fb;
    box-shadow: 0 2px 12px rgba(27,42,74,0.05);
    overflow: hidden;
}

.page-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.scroll-custom::-webkit-scrollbar { width: 5px; height: 5px; }
.scroll-custom::-webkit-scrollbar-track { background: transparent; }
.scroll-custom::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
