/* ========================================
   DESIGN SYSTEM — Anti-Gravity Light Mode
   Accreditation Dashboard
   ======================================== */

/* CSS modules are loaded directly from index.html to avoid @import waterfall. */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Primary — Mint Green / Emerald */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    --emerald-950: #022c22;

    /* Soft Gold Highlights */
    --gold-light: #fde68a;
    --gold: #D4AF37;
    --gold-dark: #b8941e;
    --gold-subtle: rgba(212, 175, 55, 0.12);

    /* Neutrals — Light Mode */
    --bg-primary: #f7f7f7;
    --bg-secondary: #fafafa;
    --bg-card: rgba(250, 250, 250, 0.9);
    --surface-elevated: #fafafa;
    --surface-soft: #f7f7f7;
    --divider-soft: rgba(15, 23, 42, 0.08);
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Functional */
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 64px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    /* Anti-Gravity Shadows — Multi-layered for floating depth */
    --shadow-float-sm:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(16, 185, 129, 0.04);
    --shadow-float-md:
        0 2px 4px rgba(0, 0, 0, 0.03),
        0 8px 24px rgba(0, 0, 0, 0.05),
        0 16px 48px rgba(16, 185, 129, 0.06);
    --shadow-float-lg:
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 12px 32px rgba(0, 0, 0, 0.06),
        0 24px 64px rgba(16, 185, 129, 0.08);
    --shadow-float-xl:
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 16px 40px rgba(0, 0, 0, 0.06),
        0 32px 80px rgba(16, 185, 129, 0.1);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-border-subtle: rgba(16, 185, 129, 0.12);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(212, 175, 55, 0.04) 0%, transparent 60%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    /* Fix body for SPA */
    height: 100vh;
    line-height: 1.6;
}

/* ---------- Watermark Logo ---------- */
.watermark-logo {
    position: fixed;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.015;
    mix-blend-mode: multiply;
}

.watermark-logo img {
    width: 500px;
    height: 500px;
    object-fit: contain;
    filter: grayscale(50%) brightness(1.2) contrast(0.5);
    opacity: 0.15;
    mix-blend-mode: multiply;
}

/* Sidebar/header styles moved to: frontend/css/modules/sidebar-header.css */

/* ========================================
   LOGOUT MODAL (Glassmorphism)
   ======================================== */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* ========================================
   VIEW SECTIONS — SPA Logic
   ======================================== */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    background: var(--surface-elevated);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-2xl);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    padding-top: 14px;
    padding-bottom: 40px;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    background-image:
        radial-gradient(ellipse at 100% 0%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    transition: margin-left var(--transition-slow);
}

.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.15);
    border-radius: 10px;
}

.logout-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.logout-modal-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logout-modal-overlay.show .logout-modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    font-size: 3rem;
    color: #f87171;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 15px rgba(248, 113, 113, 0.4));
}

.logout-modal-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.logout-modal-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-confirm-logout {
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    border: none;
    background: #ef4444;
    /* red-500 */
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    flex: 1;
}

.btn-confirm-logout:hover {
    background: #f87171;
    /* red-400 */
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}

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

/* Login styles moved to: frontend/css/pages/login.css */

/* ========================================
   ADD USER MODAL & RBAC (Anti-Gravity)
   ======================================== */

/* FAB Add User (Bottom Right) */
.fab-add-user {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    background: var(--emerald-500);
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-add-user:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--emerald-400);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6);
}

.fab-add-user:active {
    transform: translateY(0) scale(0.95);
}

/* Modal Overlay */
.add-user-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.add-user-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content (The Floating Slate) */
.add-user-modal-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border-radius: 2rem;
    /* organic corners */
    width: 90%;
    max-width: 680px;
    padding: 2.5rem;
    box-shadow: 0 0 40px rgba(5, 47, 32, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(100px) scale(0.9);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.add-user-modal-overlay.show .add-user-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Floating Particles inside Modal Overlay */
.modal-particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(16, 185, 129, 0.15));
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.p-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 20%;
    animation: particleFloat 6s ease-in-out infinite alternate;
}

.p-2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    right: 25%;
    animation: particleFloat 8s ease-in-out infinite alternate-reverse;
}

.p-3 {
    width: 180px;
    height: 60px;
    border-radius: 99px;
    top: 70%;
    left: 15%;
    animation: particleFloat 10s ease-in-out infinite alternate;
    transform: rotate(-15deg);
}

@keyframes particleFloat {
    from {
        transform: translateY(0) rotate(0);
    }

    to {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* Modal Header & Badge */
.modal-glass-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.icon-box {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--emerald-400);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.header-left p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.privileged-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fca5a5;
    /* red-300 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
    animation: neonGlowSoft 4s ease-in-out infinite;
}

/* Soft pulse - mengurangi kedip dibanding alternate tajam */
@keyframes neonGlowSoft {
    0%, 100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.45);
    }
    50% {
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 0.65);
    }
}

.login-toggle {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.login-toggle a {
    color: var(--emerald-600);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-base);
}

.login-toggle a:hover {
    color: var(--emerald-700);
    text-decoration: underline;
}

/* Form controls moved to: frontend/css/components/forms.css */

/* Approval Card Styles */
.approval-card {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.approval-icon {
    font-size: 3.5rem;
    color: #f59e0b;
    margin-bottom: 20px;
}

.approval-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--emerald-900);
    margin-bottom: 10px;
}

.approval-text {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

.status-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Table Card & Content */
.admin-table-card {
    background: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--divider-soft);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-float-lg);
    margin-bottom: 2rem;
}

.admin-table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th {
    background: rgba(16, 185, 129, 0.03);
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    border-bottom: 2px solid rgba(16, 185, 129, 0.05);
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.03);
    vertical-align: middle;
}

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

.admin-table tr:hover {
    background: rgba(16, 185, 129, 0.02);
}

/* Badges for Admin Table */
.status-badge-inline {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.role-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Notification Badge Sidebar */
.badge-notif {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #f43f5e;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

/* Floating Action Button */
.fab-admin {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--emerald-600);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.fab-admin:hover {
    background: var(--emerald-700);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
}

.fab-admin:active {
    transform: scale(0.9);
}

/* Table Action Buttons */
.btn-action {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

@media (max-width: 640px) {
    .btn-action {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        margin-right: 0.35rem;
    }
}

.btn-approve {
    background: #10b981;
    color: white;
}

.btn-approve:hover {
    background: #059669;
}

.btn-edit {
    background: #f1f5f9;
    color: #475569;
}

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

.btn-delete {
    background: #fff1f2;
    color: #f43f5e;
}

.btn-delete:hover {
    background: #ffe4e6;
}

/* Form action styles moved to: frontend/css/components/forms.css */

/* Dashboard core styles moved to: frontend/css/pages/dashboard.css */

/* Predictor styles moved to: frontend/css/pages/dashboard.css */

/* Kriteria/table styles moved to: frontend/css/pages/dashboard.css */

/* Checklist and table form controls moved to: frontend/css/components/forms.css */

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes checkPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* On-scroll animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dashboard Entrance Stagger */
.dashboard-hidden {
    opacity: 0;
    pointer-events: none;
}

.dashboard-visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease-out;
}

.staggered-item {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Login Anim Keyframes */
@keyframes fadeInLogin {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOutUpLogin {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes floatY {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-40px);
    }
}

@keyframes floatX {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(40px);
    }
}

@keyframes slideUpFade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes floatYSoft {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    /* Sidebar responsive moved to: frontend/css/modules/sidebar-header.css */

    /* Dashboard responsive styles moved to: frontend/css/pages/dashboard.css */
}

@media (max-width: 640px) {
    /* Sidebar responsive moved to: frontend/css/modules/sidebar-header.css */

    /* Dashboard responsive styles moved to: frontend/css/pages/dashboard.css */
}
/* Sidebar overlay moved to: frontend/css/modules/sidebar-header.css */

/* SPMI styles moved to: frontend/css/pages/dashboard.css */

/* ========================================
   SPLASH SCREEN — Cinematic Glassmorphism (Mint & Emerald)
   ======================================== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Soft airy gradient: Mint green (#50C878) and pastel white */
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 25%, #d1fae5 65%, #50c878 100%);
    overflow: hidden;
    transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    transform: translateZ(0);
}

.splash-screen.splash-exit {
    opacity: 0;
    filter: blur(12px) brightness(1.02);
    pointer-events: none;
    transform: scale(1.008) translateZ(0);
}

/* Sasirangan / Ethnic Abstract Overlay */
.splash-sasirangan-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Simulate an ethnic pattern with crossing diagonal gradients */
    background-image:
        repeating-linear-gradient(45deg, rgba(5, 47, 32, 0.02) 0, rgba(5, 47, 32, 0.02) 2px, transparent 2px, transparent 12px),
        repeating-linear-gradient(-45deg, rgba(80, 200, 120, 0.03) 0, rgba(80, 200, 120, 0.03) 2px, transparent 2px, transparent 12px),
        radial-gradient(circle at center, rgba(5, 47, 32, 0.03) 0%, transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    opacity: 0.6;
    mix-blend-mode: multiply;
}

/* Abstract 3D Fluid Tubular Shapes */
.fluid-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.8;
    animation: flowFloat 10s infinite alternate ease-in-out;
}

.fluid-1 {
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.9);
    top: -150px;
    left: -100px;
    animation-delay: 0s;
}

.fluid-2 {
    width: 500px;
    height: 500px;
    background: rgba(80, 200, 120, 0.6);
    /* lime/mint shape */
    bottom: -100px;
    right: -50px;
    animation-delay: -3s;
}

.fluid-3 {
    width: 400px;
    height: 400px;
    background: rgba(167, 243, 208, 0.7);
    top: 40%;
    left: 60%;
    animation-duration: 12s;
    animation-delay: -5s;
}

/* Background glow */
.splash-bg-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 40%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: splashGlowPulse 4s ease-in-out infinite;
    z-index: 1;
}

/* Glassmorphism content card */
.glass-card-splash {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 40px;
    padding: 70px 90px;
    box-shadow:
        0 40px 80px rgba(5, 47, 32, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 20px 40px rgba(255, 255, 255, 0.5);
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    animation: glassSlideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fallback: konten splash tetap terlihat jika animasi dinonaktifkan (reduced motion) */
@media (prefers-reduced-motion: reduce) {
    .glass-card-splash,
    .splash-logo-glass,
    .splash-authority-logos,
    .splash-authority-caption,
    .splash-title,
    .splash-university,
    .splash-tagline,
    .splash-bar {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .splash-bar-fill {
        animation: none !important;
        width: 100% !important;
    }
}

.splash-logo-glass {
    opacity: 0;
    transform: scale(0.5);
    animation: logoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
    margin-bottom: 24px;
}

.splash-logo-glass i {
    font-size: 3.5rem;
    color: #052F20;
    /* Deep emerald logo */
    filter: drop-shadow(0 4px 12px rgba(5, 47, 32, 0.15));
}

.splash-authority-logos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(14px);
    animation: splashFadeText 0.7s ease-out 0.55s forwards;
}

.splash-brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(5, 47, 32, 0.12));
}

.splash-brand-logo.upm {
    width: 46px;
    height: 46px;
}

.splash-brand-separator {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, rgba(5, 47, 32, 0.1), rgba(5, 47, 32, 0.35), rgba(5, 47, 32, 0.1));
}

.splash-authority-caption {
    font-size: clamp(0.68rem, 1.2vw, 0.82rem);
    color: #1f6a49;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(12px);
    animation: splashFadeText 0.7s ease-out 0.68s forwards;
    margin-bottom: 10px;
}

.splash-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: #052F20;
    /* Deep emerald */
    letter-spacing: 4px;
    line-height: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: splashFadeText 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    text-shadow: 0 4px 20px rgba(5, 47, 32, 0.1);
}

.splash-university {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: #0f5132;
    letter-spacing: 8px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: splashFadeText 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
    margin-top: 16px;
}

.splash-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: #1a744a;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(15px);
    animation: splashFadeText 0.7s ease-out 1s forwards;
    margin-top: 12px;
}

/* Loading bar */
.splash-bar {
    width: 240px;
    height: 4px;
    background: rgba(5, 47, 32, 0.08);
    border-radius: 100px;
    margin: 40px auto 0;
    overflow: hidden;
    opacity: 0;
    animation: splashFadeText 0.5s ease-out 1.2s forwards;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.splash-bar-fill {
    height: 100%;
    width: 0%;
    /* Gradient line in emerald tones */
    background: linear-gradient(90deg, #10b981, #052F20);
    border-radius: 100px;
    animation: splashBarFill 3.4s cubic-bezier(0.65, 0, 0.35, 1) 1.0s forwards;
    box-shadow: 0 0 12px rgba(5, 47, 32, 0.3);
}

/* Floating particles */
.splash-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.splash-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: splashFloat 6s ease-in-out infinite;
}

.splash-particles span:nth-child(1) {
    left: 15%;
    top: 25%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.splash-particles span:nth-child(2) {
    left: 25%;
    top: 75%;
    animation-delay: 0.5s;
    animation-duration: 5.5s;
    width: 4px;
    height: 4px;
}

.splash-particles span:nth-child(3) {
    left: 45%;
    top: 35%;
    animation-delay: 1.2s;
    animation-duration: 8s;
    width: 8px;
    height: 8px;
}

.splash-particles span:nth-child(4) {
    left: 65%;
    top: 85%;
    animation-delay: 0.3s;
    animation-duration: 6s;
}

.splash-particles span:nth-child(5) {
    left: 85%;
    top: 15%;
    animation-delay: 1.8s;
    animation-duration: 7.5s;
    width: 9px;
    height: 9px;
}

.splash-particles span:nth-child(6) {
    left: 90%;
    top: 60%;
    animation-delay: 1.2s;
    animation-duration: 5s;
    width: 5px;
    height: 5px;
}

.splash-particles span:nth-child(7) {
    left: 35%;
    top: 90%;
    animation-delay: 0.6s;
    animation-duration: 6.8s;
}

.splash-particles span:nth-child(8) {
    left: 75%;
    top: 45%;
    animation-delay: 2.5s;
    animation-duration: 7.2s;
    width: 7px;
    height: 7px;
}

/* Splash Keyframes */
@keyframes glassSlideUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoPop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes splashFadeText {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flowFloat {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(30px, -40px) scale(1.05) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

@keyframes splashGlowPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes splashBarFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes splashFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.4;
    }

    25% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-50px) translateX(-10px);
        opacity: 0.5;
    }

    75% {
        transform: translateY(-25px) translateX(20px);
        opacity: 0.7;
    }
}

@media (max-width: 640px) {
    .splash-brand-logo {
        width: 42px;
        height: 42px;
    }

    .splash-brand-logo.upm {
        width: 38px;
        height: 38px;
    }

    .splash-authority-caption {
        letter-spacing: 1.2px;
        font-size: 0.64rem;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        overflow-y: visible;
        padding: 70px 12px 20px;
    }

    .view-section {
        border-radius: 18px;
    }

    .glass-card-splash {
        width: calc(100vw - 24px);
        max-width: 560px;
        padding: 40px 24px;
        border-radius: 28px;
    }

    .splash-bar {
        width: min(240px, 70vw);
    }
}

@media (max-width: 640px) {
    .glass-card-splash {
        width: calc(100vw - 20px);
        padding: 32px 18px;
        border-radius: 24px;
    }

    .splash-title {
        letter-spacing: 2px;
    }

    .splash-university {
        letter-spacing: 3px;
    }

    .splash-tagline {
        letter-spacing: 2px;
    }
}

@media (max-width: 1024px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    #mainContent.main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box;
    }

    .view-section {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* ========================================
   RPS BUILDER (Integrated)
   ======================================== */
.view-header {
    padding: 32px;
    margin: 0 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float-md);
}

.view-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.view-title h1 {
    margin-bottom: 0;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.view-title p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.header-icon-glass {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-500);
    font-size: 1.2rem;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.rps-container {
    padding: 0 32px 40px;
}

.welcome-item {
    background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-800) 100%);
    color: white;
    padding: 2.5rem;
    border: none;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

.welcome-item h3 {
    font-size: 1.6rem;
    font-weight: 800;
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float-md);
    transition: all var(--transition-base);
}

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float-lg);
    border-color: var(--emerald-300);
}

.header-icon-glass.small {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.form-card-glass {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-float-xl);
}

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

.btn-save-glass, .btn-cancel-glass {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all var(--transition-base);
}

@media (max-width: 1024px) {
    .view-header {
        margin: 0 16px 20px;
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions button {
        flex: 1;
    }
    
    .rps-container {
        padding: 0 16px 32px;
    }
}