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

:root {
    --primary: #081b3b;
    --secondary: #8f9aa8;
    --tertiary: #c79b44;
    --accent: #b39253;
    --neutral: #f4f0e0;
    --surface: #FFFFFF;
    --on-primary: #FFFFFF;
    
    --rounded-sm: 8px;
    --rounded-md: 14px;
    --rounded-lg: 24px;
    
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;

    --shadow-sm: 0 2px 8px rgba(8, 27, 59, 0.04);
    --shadow-md: 0 10px 30px rgba(8, 27, 59, 0.08);
    --shadow-lg: 0 20px 50px rgba(8, 27, 59, 0.12);
}

/* Bootstrap Color Overrides */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-tertiary { color: var(--tertiary) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-tertiary { background-color: var(--tertiary) !important; }
.bg-neutral { background-color: var(--neutral) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-tertiary { border-color: var(--tertiary) !important; }

/* Dashboard Cards Overrides */
.card.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1a2a4a 100%) !important;
    border: none !important;
}

.card.bg-tertiary {
    background: linear-gradient(135deg, var(--tertiary) 0%, var(--accent) 100%) !important;
    border: none !important;
}

body {
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--primary);
    background-color: var(--neutral);
    margin: 0;
}

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

.display {
    font-size: clamp(2.5rem, 8vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* Bootstrap Overrides */
.btn {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--tertiary) !important;
    color: var(--on-primary) !important;
    box-shadow: 0 4px 14px rgba(199, 155, 68, 0.3);
    border: none !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 155, 68, 0.4);
    opacity: 1;
}

.btn-light {
    background-color: var(--surface) !important;
    color: var(--primary) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(8, 27, 59, 0.1);
}

.btn-light:hover {
    background-color: var(--neutral) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(8, 27, 59, 0.15);
}

.btn-outline-primary {
    border: 2px solid var(--tertiary) !important;
    color: var(--tertiary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--tertiary) !important;
    color: white !important;
}

.card {
    background-color: var(--surface);
    border-radius: var(--rounded-lg);
    padding: var(--spacing-lg);
    border: 1px solid rgba(8, 27, 59, 0.05);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary);
    background-color: rgba(244, 240, 224, 0.5);
    border-top: none;
    border-bottom: 2px solid rgba(8, 27, 59, 0.05);
    padding: 16px 20px;
}

.table td {
    vertical-align: middle;
    color: var(--primary);
    border-bottom: 1px solid rgba(8, 27, 59, 0.05);
    padding: 16px 20px;
    font-weight: 500;
}

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

/* Form Styling */
.form-label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(8, 27, 59, 0.1);
    background-color: #fcfdfe;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(199, 155, 68, 0.1);
    border-color: var(--tertiary);
    background-color: white;
}

.form-control::placeholder {
    color: var(--secondary) !important;
    opacity: 0.6;
    font-weight: 400;
}

/* Badge Customization */
.badge {
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    border-radius: 8px;
}

.bg-light.text-primary {
    background-color: rgba(8, 27, 59, 0.05) !important;
    color: var(--primary) !important;
}

.bg-light.text-tertiary {
    background-color: rgba(199, 155, 68, 0.1) !important;
    color: var(--tertiary) !important;
}

.badge.bg-success {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
}

.badge.bg-warning {
    background-color: #fffbeb !important;
    color: #d97706 !important;
}

.badge.bg-danger {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral);
}

::-webkit-scrollbar-thumb {
    background: rgba(8, 27, 59, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(8, 27, 59, 0.2);
}

/* Layout Structure */
.fasih-app-wrapper {
    min-height: 100vh;
    background-color: var(--neutral);
    position: relative;
}

.fasih-sidebar {
    width: 280px;
    background-color: var(--surface);
    border-right: 1px solid rgba(8, 27, 59, 0.08);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.fasih-main-content {
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fasih-top-navbar {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(8, 27, 59, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fasih-mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.fasih-sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.fasih-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.fasih-logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.fasih-nav-container {
    padding: 0 16px;
    flex-grow: 1;
    overflow-y: auto;
}

.fasih-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    margin: 24px 12px 12px;
    opacity: 0.6;
}

.fasih-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.fasih-nav-link i {
    font-size: 1.25rem;
}

.fasih-nav-link:hover {
    background-color: rgba(199, 155, 68, 0.08);
    color: var(--tertiary);
}

.fasih-nav-link.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(8, 27, 59, 0.15);
}

.fasih-nav-link.active i {
    color: var(--tertiary);
}

.fasih-content-body {
    padding: 32px;
    flex-grow: 1;
}

@media (max-width: 991.98px) {
    .fasih-sidebar {
        transform: translateX(-100%);
    }
    .fasih-sidebar.show {
        transform: translateX(0);
    }
    .fasih-main-content {
        margin-left: 0;
    }
}

/* Navbar User Profile */
.fasih-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 16px;
    background: var(--surface);
    border: 1px solid rgba(8, 27, 59, 0.08);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.fasih-user-profile:hover {
    border-color: var(--tertiary);
    box-shadow: 0 4px 12px rgba(8, 27, 59, 0.05);
}

.fasih-user-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.fasih-user-details {
    text-align: right;
    line-height: 1.2;
}

.fasih-user-details .name {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.fasih-user-details .role {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--tertiary);
    text-transform: uppercase;
}
