@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors (Matched with Logo) */
    --primary: #2C4C3B;
    /* Dark Pine Green */
    --primary-hover: #1E3629;
    /* Darker Green */
    --secondary: #4A7C59;
    /* Lighter Leaf Green */
    --accent: #F59E0B;
    /* Amber 500 */

    /* Neutral Colors (Light Theme) */
    --bg-base: #F3F4F6;
    /* Gray 100 */
    --bg-surface: #FFFFFF;
    --text-main: #111827;
    /* Gray 900 */
    --text-muted: #6B7280;
    /* Gray 500 */
    --border: #E5E7EB;
    /* Gray 200 */

    /* Status Colors */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(44, 76, 59, 0.5);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ================== UTILITIES ================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

/* Font sizes */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

/* Spacing */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Layout */
.w-full {
    width: 100%;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Borders */
.border {
    border: 1px solid var(--border);
}

.border-l-4 {
    border-left: 4px solid;
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

/* Button outline */
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: var(--bg-base);
    border-color: var(--primary);
    color: var(--primary);
}

/* ================== COMPONENTS ================== */

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Card */
.card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 10px rgba(44, 76, 59, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #E5E7EB;
}

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

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #F9FAFB;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 76, 59, 0.15);
    background-color: #FFFFFF;
}

input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
    min-height: 2.8rem; /* ensures the height is consistent even without native styling */
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: #FEF2F2;
    border-left: 4px solid var(--danger);
    color: #991B1B;
}

.alert-success {
    background-color: #F0FDF4;
    border-left: 4px solid var(--success);
    color: #166534;
}

/* ================== LAYOUTS ================== */

/* Auth Layout */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
}

.auth-layout::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44, 76, 59, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top: -200px;
    left: -200px;
    border-radius: 50%;
}

.auth-layout::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -150px;
    right: -100px;
    border-radius: 50%;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-base);
}

/* ================== SIDEBAR ================== */
.app-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #1a2f25 0%, #0f1f18 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 40;
    transition: transform var(--transition-normal);
    overflow: hidden;
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-brand-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}
.sidebar-brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: -0.01em;
}
.sidebar-brand-name strong {
    font-weight: 700;
    color: #fff;
}
.sidebar-brand-tagline {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.875rem;
}
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Section Label */
.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.sidebar-section-label:first-child {
    margin-top: 0.25rem;
}

/* Sidebar Link */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}
.sidebar-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.sidebar-link:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-link:hover .sidebar-link-icon {
    background: rgba(255, 255, 255, 0.1);
}
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: 0 4px 12px rgba(44, 76, 59, 0.4);
}
.sidebar-link.active .sidebar-link-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar CTA (Perpanjangan) */
.sidebar-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.sidebar-cta-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.sidebar-cta-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.sidebar-cta-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fbbf24;
}
.sidebar-cta-btn {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fde68a;
    text-decoration: none;
    transition: color 0.2s;
}
.sidebar-cta-btn:hover {
    color: #fff;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-footer-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sidebar-footer-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-footer-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ================== TOPBAR ================== */
.app-topbar {
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.topbar-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 1.35rem;
    cursor: pointer;
    transition: all 0.2s;
}
.topbar-menu-btn:hover {
    background: var(--bg-base);
}
.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Topbar User Dropdown */
.topbar-user {
    position: relative;
}
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s;
}
.topbar-user-btn:hover {
    border-color: #d1d5db;
    box-shadow: var(--shadow-sm);
}
.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.topbar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}
.topbar-chevron {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

/* Dropdown Panel */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    padding: 0.5rem;
    display: none;
    animation: dropdownSlide 0.2s ease;
    z-index: 50;
}
.topbar-dropdown.show {
    display: block !important;
}
@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.topbar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}
.topbar-dropdown-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.topbar-dropdown-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-dropdown-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}
.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.topbar-dropdown-item i {
    font-size: 1.15rem;
    color: var(--text-muted);
}
.topbar-dropdown-item:hover {
    background: var(--bg-base);
}
.topbar-dropdown-item--danger {
    color: var(--danger);
}
.topbar-dropdown-item--danger i {
    color: var(--danger);
}
.topbar-dropdown-item--danger:hover {
    background: #fef2f2;
}

/* ================== MOBILE OVERLAY ================== */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 35;
    transition: opacity 0.3s;
}
#sidebar-overlay.show {
    display: block !important;
}

/* ================== MAIN CONTENT ================== */
.app-main {
    flex: 1;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.app-content {
    padding: 1.75rem;
    flex: 1;
}

/* ================== APP FOOTER ================== */
.app-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.app-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ================== ANIMATIONS ================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .app-content {
        padding: 1rem;
    }

    .topbar-menu-btn {
        display: flex !important;
    }

    .topbar-user-name {
        display: none;
    }

    .topbar-chevron {
        display: none;
    }

    .app-footer {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .app-topbar {
        padding: 0 1rem;
    }
    .topbar-title {
        font-size: 0.95rem;
    }
}

/* ========== FLOATING ACTION BUTTON (FAB) ========== */
.fab-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 14px rgba(44, 76, 59, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.fab-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(44, 76, 59, 0.6);
    color: white;
}

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

@media (max-width: 768px) {
    .fab-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
}

@media print {
    .fab-btn {
        display: none !important;
    }
}