/* ========================================
   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 — Deep Teal Brand (was emerald) */
    --emerald-50: #eef6f6;
    --emerald-100: #c5e3e3;
    --emerald-200: #8fc4c4;
    --emerald-300: #5aa3a3;
    --emerald-400: #3d8a8a;
    --emerald-500: #2a7575;
    --emerald-600: #206060;
    --emerald-700: #1a5050;
    --emerald-800: #134e4a;
    --emerald-900: #0d3333;
    --emerald-950: #0a2a2a;

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

    /* UPM Portal — Deep Teal (SoftQA-inspired gradient) */
    --upm-teal-950: #0a2a2a;
    --upm-teal-900: #0d3333;
    --upm-teal-800: #134e4a;
    --upm-teal-700: #1a5050;
    --upm-teal-600: #206060;
    --upm-teal-500: #2a7575;
    --upm-teal-glow: rgba(42, 117, 117, 0.35);
    --upm-gradient-hero: linear-gradient(135deg, #0a2a2a 0%, #134e4a 48%, #206060 100%);
    --upm-gradient-hero-radial:
        radial-gradient(ellipse 120% 80% at 100% 0%, rgba(42, 117, 117, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(10, 42, 42, 0.9) 0%, transparent 50%),
        linear-gradient(135deg, #0a2a2a 0%, #134e4a 45%, #206060 100%);

    /* Neutrals — Light Mode (teal-tinted) */
    --bg-primary: #f2f7f7;
    --bg-secondary: #f6fafa;
    --bg-card: rgba(246, 250, 250, 0.92);
    --surface-elevated: #f8fbfb;
    --surface-soft: #f2f7f7;
    --divider-soft: rgba(19, 78, 74, 0.1);
    --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: #206060;
    --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(10, 42, 42, 0.05);
    --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(10, 42, 42, 0.07);
    --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(10, 42, 42, 0.09);
    --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(10, 42, 42, 0.11);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.62);
    --glass-bg-strong: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.72);
    --glass-border-subtle: rgba(19, 78, 74, 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 15% 0%, rgba(19, 78, 74, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(212, 175, 55, 0.05) 0%, transparent 55%);
    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: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 246, 246, 0.92) 100%);
    border: 1px solid rgba(19, 78, 74, 0.1);
    border-radius: var(--radius-2xl);
    box-shadow:
        0 12px 28px rgba(10, 42, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    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(19, 78, 74, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(212, 175, 55, 0.04) 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(19, 78, 74, 0.2);
    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: linear-gradient(135deg, var(--upm-teal-800, #134e4a), var(--upm-teal-600, #206060));
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 99px;
    cursor: pointer;
    box-shadow:
        0 10px 28px rgba(10, 42, 42, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    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: linear-gradient(135deg, var(--upm-teal-900, #0d3333), var(--upm-teal-700, #1a5050));
    box-shadow:
        0 15px 35px rgba(10, 42, 42, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.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(19, 78, 74, 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(19, 78, 74, 0.2), rgba(19, 78, 74, 0.05));
    border: 1px solid rgba(19, 78, 74, 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(19, 78, 74, 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(19, 78, 74, 0.05);
}

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

.admin-table th {
    background: rgba(19, 78, 74, 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(19, 78, 74, 0.05);
}

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

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

.admin-table tr:hover {
    background: rgba(19, 78, 74, 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: #c5e3e3;
    color: var(--upm-teal-900);
}

.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(19, 78, 74, 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(19, 78, 74, 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: var(--upm-teal-600);
    color: white;
}

.btn-approve:hover {
    background: var(--upm-teal-700);
}

.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 */

@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;
    }
}

@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(19, 78, 74, 0.1), rgba(19, 78, 74, 0.05));
    border: 1px solid rgba(19, 78, 74, 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(19, 78, 74, 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;
    }
}