/* SARARA - eRenstra CSS Stylesheet */
/* Super Premium & Glassmorphic Full-Width Design */

:root {
    --primary-color: #522A77; /* Deep Purple eRISPRO */
    --primary-light: #F3EBF9;
    --primary-gradient: linear-gradient(135deg, #522A77, #6B329B);
    --primary-glow: 0 4px 14px rgba(82, 42, 119, 0.2);
    --secondary-color: #61328E;
    --border-color: rgba(255, 255, 255, 0.4);
    --inner-border: rgba(82, 42, 119, 0.08);
    --card-bg: rgba(255, 255, 255, 0.9);
    --sidebar-width: 290px;
    --header-height: 70px;
    
    /* EDUPRO Pastel Gradients */
    --stat-purple: linear-gradient(135deg, #F0E6FF, #E6D5FF);
    --stat-green: linear-gradient(135deg, #E6FDF5, #C6F6D5);
    --stat-blue: linear-gradient(135deg, #EBF8FF, #BEE3F8);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 30px rgba(82, 42, 119, 0.04);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.03);
}

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

body {
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.6;
    color: #2D3748;
    /* Soft colorful watercolor background matching the EDUPRO mockup */
    background: linear-gradient(135deg, #E5E0FA 0%, #F5EFFF 35%, #E6F0FA 70%, #FFF0F5 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Full Width Application Container */
.app-window {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    display: flex;
    margin: 0;
    border: none;
    border-radius: 0;
}

/* High-Contrast Left Sidebar (Distinct white background with strong divider/shadow) */
.sidebar {
    width: var(--sidebar-width);
    background: #FFFFFF; /* High-contrast Solid White */
    border-right: 1px solid rgba(82, 42, 119, 0.12); /* Clear Divider */
    box-shadow: 6px 0 30px rgba(82, 42, 119, 0.04); /* Sidebar Elevation Shadow */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
    overflow-y: auto;
}

.sidebar-profile {
    padding: 30px 24px 20px;
    border-bottom: 1px solid var(--inner-border);
    text-align: center;
    background: linear-gradient(to bottom, #FCFBFD, #FFFFFF);
}

.avatar-wrapper {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
}

.profile-avatar-img {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    box-shadow: 0 8px 20px rgba(82, 42, 119, 0.12);
    object-fit: cover;
}

.avatar-badge-verified {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: #00A896;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sidebar-profile h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 4px;
}

.sidebar-profile .verified-text {
    font-size: 10px;
    color: #00A896;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.sidebar-profile .badge-role {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 99px;
    border: 1px solid rgba(82, 42, 119, 0.15);
}

.profile-details-list {
    text-align: left;
    border-top: 1px solid var(--inner-border);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 11px;
    color: #718096;
}

.profile-details-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.profile-details-item svg {
    width: 14px;
    height: 14px;
    color: #A0AEC0;
    flex-shrink: 0;
}

.profile-details-item span {
    word-break: break-all;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4A5568;
    font-weight: 600;
    font-size: 13.5px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu-item:hover {
    background-color: rgba(82, 42, 119, 0.05);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Sleek capsule dark-mode active item like EDUPRO */
.sidebar-menu-item.active {
    background: #1A202C; /* Dark capsule item */
    color: #FFFFFF;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.sidebar-menu-item svg {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Right Content Area Wrapper (slightly muted background for better contrast) */
.right-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: rgba(246, 248, 252, 0.55); /* Soft contrasting background */
}

/* Header / Top Bar */
.header {
    height: var(--header-height);
    border-bottom: 1px solid rgba(82, 42, 119, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.5);
}

.header-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #1A202C;
    display: flex;
    align-items: center;
}

.header-brand span {
    margin-left: 10px;
    font-size: 10px;
    background: var(--primary-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 700;
    letter-spacing: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-nav-item {
    font-size: 11.5px;
    color: #4A5568;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--inner-border);
}

.btn-signout {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #4A5568;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-signout:hover {
    background-color: #FFF5F5;
    border-color: #FEB2B2;
    color: #C53030;
}

/* Main Content Panel */
.main-content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 11px;
    color: #718096;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #718096;
    font-weight: 500;
}

.breadcrumb span {
    margin: 0 6px;
    color: #A0AEC0;
}

.page-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #1A202C;
    letter-spacing: -0.5px;
}

/* Welcome Back Banner - EDUPRO Style without heavy grids, just clean layout */
.welcome-banner {
    margin-bottom: 24px;
}

.welcome-banner h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #1A202C;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.welcome-banner p {
    font-size: 13px;
    color: #718096;
}

/* Premium Floating Cards (Frosted Glass) */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.card-header {
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--inner-border);
    padding: 16px 20px;
    font-weight: 700;
    font-size: 14px;
    color: #1A202C;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
    color: #4A5568;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    border: 1px solid var(--inner-border);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.6);
    color: #2D3748;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(82, 42, 119, 0.12);
}

.form-control:disabled, .form-control[readonly] {
    background-color: rgba(247, 250, 252, 0.5);
    color: #718096;
    cursor: not-allowed;
}

/* Grid System */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-form { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }

/* EDUPRO Pastel Summary Cards */
.summary-card {
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.summary-card:nth-child(1) { background: var(--stat-purple); }
.summary-card:nth-child(2) { background: var(--stat-green); }
.summary-card:nth-child(3) { background: var(--stat-blue); }
.summary-card:nth-child(4) { background: var(--stat-purple); }

.summary-card-info h5 {
    font-size: 11px;
    text-transform: uppercase;
    color: #4A5568;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.summary-card-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #1A202C;
    letter-spacing: -0.5px;
}

.summary-card-icon {
    display: none; /* Removed icons for cleaner layout */
}

/* Tables Styling */
.table-responsive {
    overflow: auto;
    max-height: 70vh;
    width: 100%;
}

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

.table-formal th, .table-formal td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--inner-border);
    text-align: left;
}

.table-formal th {
    background-color: rgba(248, 249, 251, 0.4);
    font-weight: 700;
    color: #4A5568;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-formal tr:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
}

.badge-success { background-color: #DEF7EC; color: #03543F; border: 1px solid #BCF0DA; }
.badge-warning { background-color: #FEF08A; color: #713F12; border: 1px solid #FDE047; }
.badge-info { background-color: #E1EFFE; color: #1E429F; border: 1px solid #C3DDFD; }
.badge-danger { background-color: #FDE8E8; color: #9B1C1C; border: 1px solid #FBD5D5; }
.badge-neutral { background-color: #F3F4F6; color: #374151; border: 1px solid #E5E7EB; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: #1A202C; /* Modern dark high-contrast buttons */
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #2D3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: var(--inner-border);
    color: #4A5568;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* Matriks Styling */
.matrix-row-goal {
    background: linear-gradient(to right, rgba(82, 42, 119, 0.08), rgba(255,255,255,0)) !important;
    font-weight: 800;
    font-size: 13.5px;
    color: #381254;
    border-left: 5px solid var(--primary-color);
}

.matrix-row-goal td {
    padding-left: 20px;
}

.matrix-row-indicator {
    background: linear-gradient(to right, rgba(0, 123, 255, 0.05), rgba(255,255,255,0)) !important;
    font-weight: 700;
    font-size: 13px;
    color: #1A365D;
    border-left: 5px solid #007bff;
}

.matrix-row-indicator td {
    padding-left: 40px;
}

.matrix-row-program {
    background: linear-gradient(to right, rgba(0, 168, 150, 0.04), rgba(255,255,255,0)) !important;
    font-weight: 700;
    font-size: 12.5px;
    color: #137333;
    border-left: 5px solid #00A896;
}

.matrix-row-program td {
    padding-left: 60px;
}

.matrix-row-activity {
    background: linear-gradient(to right, rgba(255, 140, 0, 0.04), rgba(255,255,255,0)) !important;
    font-weight: 600;
    font-size: 12px;
    color: #B06000;
    border-left: 5px solid #FF8C00;
}

.matrix-row-activity td {
    padding-left: 80px;
}

.matrix-row-item {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.matrix-row-item td:first-child {
    padding-left: 100px;
}

/* Matriks Perbandingan Warna Revisi */
.rev-tidak-berubah { background-color: rgba(255, 255, 255, 0.5); }
.rev-baru { background-color: #EBF8FF; color: #2B6CB0; } 
.rev-anggaran-berubah { background-color: #FFFDF5; color: #C05621; } 
.rev-sasaran-berubah { background-color: #F0FFF4; color: #2F855A; } 
.rev-dibatalkan { background-color: #FFF5F5; color: #C53030; text-decoration: line-through; } 

/* TOR Print & CSS Layout */
.print-section {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 40px;
    max-width: 850px;
    margin: 0 auto;
    font-family: 'Lora', Georgia, serif;
    font-size: 14.5px;
    line-height: 1.7;
    color: #000000;
}

.print-header {
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.print-header h1 {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Utilities */
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.text-bold { font-weight: 700; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.mr-2 { margin-right: 10px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Responsive / Mobile CSS */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #1A202C;
    padding: 8px;
    margin-right: 12px;
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .header {
        left: 0 !important;
        padding: 0 20px;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 20px;
    }
    
    .sidebar-toggle-btn {
        display: block; /* Show hamburger button on mobile */
    }
    
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    
    .grid-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .header-nav-item {
        display: none; /* Hide year and unit info badges on mobile header to save space */
    }
    
    .welcome-banner {
        padding: 20px;
    }
    
    .welcome-banner h1 {
        font-size: 20px;
    }
}

/* Modal Overlay Dialog (eRISPRO / SweetAlert Style) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 9, 36, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Content Card */
.modal-card {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(82, 42, 119, 0.15);
    border: 1px solid rgba(82, 42, 119, 0.08);
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    background: var(--primary-gradient);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0;
    margin: 0;
}

.modal-close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

/* Premium Tabs Style */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(82, 42, 119, 0.08);
    padding-bottom: 8px;
}

.tab-item {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    color: #4A5568;
    background: transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.tab-item:hover {
    color: var(--primary-color);
    background: rgba(82, 42, 119, 0.04);
}

.tab-item.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(82, 42, 119, 0.15);
}

/* Sticky Table Column Headers */
.main-content table thead th {
    position: sticky;
    top: 0; /* Sticks to the top of scroll container (.table-responsive) */
    z-index: 15;
    background: #F8F9FB !important;
    box-shadow: inset 0 -1px 0 #CBD5E0, inset 0 1px 0 #CBD5E0;
}
