@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 {
    --primary: 243 75% 59%;       /* Modern Indigo */
    --primary-rgb: 79, 70, 229;
    --primary-light: 242 78% 95%;
    --success: 142 76% 36%;       /* Sage Green */
    --success-rgb: 22, 163, 74;
    --success-light: 143 76% 95%;
    --danger: 350 89% 60%;        /* Vibrant Coral Red */
    --danger-rgb: 220, 38, 38;
    --danger-light: 350 89% 96%;
    --warning: 38 92% 50%;        /* Amber Orange */
    --warning-rgb: 217, 119, 6;
    --background: 220 25% 97%;    /* Cool Slate/Grey BG */
    --card-bg: 0 0% 100%;
    --text-primary: 224 47% 12%;  /* Near Black */
    --text-secondary: 220 9% 46%; /* Muted Slate */
    --border: 220 13% 91%;        /* Very light border */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px -2px rgba(79, 70, 229, 0.08);
    --shadow-lg: 0 10px 30px -4px rgba(79, 70, 229, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--text-primary));
    min-height: 100vh;
    letter-spacing: -0.011em;
}

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

/* Glassmorphic Top Navbar */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition-smooth);
}

.navbar-brand-custom {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: hsl(var(--primary)) !important;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-custom span {
    color: hsl(var(--text-primary));
}

.nav-link-custom {
    font-weight: 500;
    font-size: 0.88rem;
    color: hsl(var(--text-secondary)) !important;
    padding: 6px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 38px;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: hsl(var(--primary)) !important;
    background-color: hsl(var(--primary-light));
}

/* Custom Dropdown Styling */
.dropdown-menu {
    border: 1px solid hsl(var(--border)) !important;
    background-color: hsl(var(--card-bg)) !important;
    padding: 8px !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

.dropdown-item {
    color: hsl(var(--text-primary)) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    height: 38px !important;
    transition: var(--transition-smooth) !important;
}

.dropdown-item:hover {
    background-color: hsl(var(--primary-light)) !important;
    color: hsl(var(--primary)) !important;
}


/* KPI Card Designs */
.kpi-card {
    background-color: hsl(var(--card-bg));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.kpi-card.kpi-bank::before { background-color: hsl(var(--primary)); }
.kpi-card.kpi-income::before { background-color: hsl(var(--success)); }
.kpi-card.kpi-expense::before { background-color: hsl(var(--danger)); }
.kpi-card.kpi-profit::before { background-color: hsl(var(--warning)); }

.kpi-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    color: hsl(var(--text-secondary));
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    margin-bottom: 0;
}

/* Premium Card Components */
.premium-card {
    background-color: hsl(var(--card-bg));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.premium-card-header {
    background: transparent;
    border-bottom: 1px solid hsl(var(--border));
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-card-body {
    padding: 24px;
}

/* Form Styles */
.form-label-custom {
    font-size: 0.9rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    margin-bottom: 6px;
}

.form-control-custom {
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    color: hsl(var(--text-primary));
    transition: var(--transition-smooth);
}

.form-control-custom:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.input-group-text-custom {
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--text-secondary));
}

/* Clean Button Styling */
.btn-custom-primary {
    background-color: hsl(var(--primary));
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    transition: var(--transition-smooth);
}

.btn-custom-primary:hover {
    background-color: rgb(67, 56, 202);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
    color: #fff;
}

.btn-custom-secondary {
    background-color: hsl(var(--primary-light));
    color: hsl(var(--primary));
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    transition: var(--transition-smooth);
}

.btn-custom-secondary:hover {
    background-color: rgba(var(--primary-rgb), 0.15);
    color: hsl(var(--primary));
}

/* Modern Badges */
.badge-custom {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: capitalize;
}

.badge-income {
    background-color: hsl(var(--success-light));
    color: hsl(var(--success));
}

.badge-expense {
    background-color: hsl(var(--danger-light));
    color: hsl(var(--danger));
}

.badge-partner-contrib {
    background-color: hsl(var(--primary-light));
    color: hsl(var(--primary));
}

.badge-partner-drawings {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-partner-exp {
    background-color: #f3e8ff;
    color: #9333ea;
}

.badge-partner-reimb {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-profit-dist {
    background-color: #e2e8f0;
    color: #475569;
}

/* Modern Tables */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.table-custom th {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--text-secondary));
    padding: 16px 24px;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
}

.table-custom td {
    padding: 16px 24px;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 0.95rem;
    color: hsl(var(--text-primary));
}

.table-custom tbody tr {
    transition: var(--transition-smooth);
}

.table-custom tbody tr:hover {
    background-color: rgba(var(--primary-rgb), 0.02);
}

/* Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-fadeIn {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Reports Styles */
.report-section {
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.report-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.report-amount {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.report-amount.credit {
    color: hsl(var(--success));
}

.report-amount.debit {
    color: hsl(var(--danger));
}

.balance-sheet-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed hsl(var(--border));
}

.balance-sheet-row:last-child {
    border-bottom: none;
}

.balance-sheet-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-weight: 700;
    border-top: 2px solid hsl(var(--text-primary));
    border-bottom: 2px double hsl(var(--text-primary));
    margin-top: 10px;
}

/* Card hover animation scale */
.hover-scale {
    transition: var(--transition-smooth) !important;
}

.hover-scale:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg) !important;
}

/* Floating Action Button (FAB) Dropup for Profile & Settings */
.floating-profile-dropup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
}

.floating-profile-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: hsl(var(--primary));
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
    transition: var(--transition-smooth);
}

.floating-profile-btn:hover, .floating-profile-btn:focus {
    background-color: rgb(67, 56, 202);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.45);
    color: white;
    outline: none;
}

.floating-profile-btn:active {
    transform: translateY(0) scale(0.98);
}


