/* Catat Uang - Modern Fintech Design */

:root {
    /* Modern Gradient Colors - Gray + Blue Theme */
    --primary-color: #3B82F6;
    --primary-light: #60A5FA;
    --secondary-color: #64748B;
    --success-color: #10B981;
    --success-light: #6EE7B7;
    --danger-color: #EF4444;
    --danger-light: #FCA5A5;
    --warning-color: #F59E0B;
    --info-color: #06B6D4;
    
    /* Neutral Colors */
    --dark-color: #0F172A;
    --dark-secondary: #1E293B;
    --light-color: #F8FAFC;
    --border-color: #CBD5E1;
    --text-color: #475569;
    --text-muted: #94A3B8;
    --bg-color: #F1F5F9;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #6EE7B7 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #FCA5A5 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        'Helvetica', 'Arial', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Main */
.container-main {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #2563EB 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.sidebar-header-content {
    flex: 1;
}

.sidebar-header h2 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    padding: 15px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 25px;
}

.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    border-left: 4px solid #BFDBFE;
    padding-left: 16px;
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #BFDBFE;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-menu hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-top: auto;
}

.sidebar-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100vh;
}

/* Disable transform effects in main-content */
.main-content *:hover {
    transform: none !important;
}

/* Top Header */
.top-header {
    background: white;
    padding: 18px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    gap: 20px;
    width: 100%;
}

.top-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.user-info {
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

/* Content Area */
.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}


/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--dark-color);
    font-weight: 600;
}

.card h4 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--dark-color);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 25px;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, currentColor 0%, transparent 100%);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-card.income {
    color: var(--success-color);
}

.stat-card.income .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(110, 231, 183, 0.08) 100%);
    color: var(--success-color);
}

.stat-card.expense {
    color: var(--danger-color);
}

.stat-card.expense .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(252, 165, 165, 0.08) 100%);
    color: var(--danger-color);
}

.stat-card.balance {
    color: var(--primary-color);
}

.stat-card.balance .stat-icon {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.15) 0%, rgba(236, 72, 153, 0.08) 100%);
    color: var(--primary-color);
}

.stat-card.total {
    color: var(--info-color);
}

.stat-card.total .stat-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(34, 211, 238, 0.08) 100%);
    color: var(--info-color);
}

.stat-icon {
    font-size: 42px;
    margin: 0 0 15px 0;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.stat-header {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #000000;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.stat-value {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-container {
    position: relative;
    height: 450px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
}

.chart-container canvas {
    max-height: 100%;
}

/* Form */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.08);
    background: white;
}

/* Currency Input Wrapper */
.input-currency-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.currency-symbol {
    padding: 12px 14px;
    background-color: var(--bg-color);
    color: var(--text-muted);
    font-weight: 600;
    border-right: 1.5px solid var(--border-color);
    white-space: nowrap;
    font-size: 14px;
}

.input-currency-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    background: transparent;
}

.input-currency-wrapper input:focus {
    outline: none;
    box-shadow: none;
}

.input-currency-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.08);
}

/* Currency Display in Table */
.currency-display {
    display: inline-flex;
    gap: 4px;
}

.currency-label {
    text-align: left;
    min-width: 25px;
    font-weight: 600;
    color: var(--text-color);
}

.currency-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 5px;
}

/* Buttons */
.btn-primary,
.btn-small,
.btn-submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 13px 28px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #E2E8F0;
    color: #334155;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: #CBD5E1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-small {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    font-size: 12px;
    box-shadow: var(--shadow-sm);
    margin: 2px;
}

.btn-small.danger {
    background: var(--danger-color);
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit {
    background: var(--gradient-primary);
    color: white;
    padding: 14px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.2);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(91, 33, 182, 0.3);
}

button:disabled,
.btn-small:disabled {
    background-color: #CBD5E1;
    color: #94A3B8;
    cursor: not-allowed;
    opacity: 0.6;
}


/* Messages */
.message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #ECFDF5;
    color: #065F46;
    border-left-color: var(--success-color);
}

.message.error {
    background: #FEF2F2;
    color: #7F1D1D;
    border-left-color: var(--danger-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table,
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead,
.report-table thead {
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table th,
.report-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td,
.report-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

.report-table .total-row {
    background: linear-gradient(90deg, rgba(91, 33, 182, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    font-weight: 600;
    border-top: 2px solid var(--border-color);
    color: var(--dark-color);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
}

/* Kategori List */
.kategori-list {
    margin-top: 20px;
}

.kategori-list h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-weight: 600;
}

.kategori-list ul {
    list-style: none;
}

.kategori-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    color: var(--text-color);
}

.kategori-list li:last-child {
    border-bottom: none;
}

/* Period Card */
.period-card {
    background: white;
    color: var(--text-color);
}

.period-card h3,
.period-card p {
    color: var(--text-color);
}

.period-card p {
    font-size: 16px;
    color: var(--dark-color);
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-info p {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.profile-info strong {
    color: var(--dark-color);
    font-weight: 600;
}

/* Info Box */
.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-color);
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }

    .sidebar-logo {
        max-width: 85%;
    }

    .main-content {
        margin-left: 240px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .charts-section {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .sidebar-logo {
        max-width: 85%;
    }

    .main-content {
        margin-left: 220px;
    }

    .content {
        padding: 35px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 20px 30px;
    }

    .top-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .container-main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: -100%;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.3);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-logo {
        max-width: 85%;
    }

    .sidebar-menu {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        padding: 15px 0;
    }

    .sidebar-menu a {
        flex: none;
        min-width: auto;
        text-align: left;
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
        border-left: 4px solid transparent;
        gap: 15px;
        font-size: 14px;
    }

    .sidebar-menu a:hover {
        background: rgba(255, 255, 255, 0.08);
        padding-left: 25px;
    }

    .sidebar-menu a.active {
        border-left: 4px solid #FCD34D;
        background: rgba(255, 255, 255, 0.1);
        padding-left: 16px;
    }

    .sidebar-menu a.active::before {
        display: none;
    }

    .sidebar-menu i {
        width: auto;
        font-size: 18px;
    }

    .sidebar-footer {
        display: block;
        padding: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: auto;
    }

    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary-color);
        border: none;
        color: white;
        width: 48px;
        height: 48px;
        border-radius: 10px;
        font-size: 20px;
        cursor: pointer;
        box-shadow: var(--shadow-md);
        transition: all 0.3s ease;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-toggle.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .mobile-menu-toggle:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    .sidebar.active ~ .mobile-menu-toggle,
    .sidebar.active + .mobile-menu-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .main-content {
        margin-left: 0;
        padding-top: 78px;
    }

    .top-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 998;
        flex-direction: column;
        gap: 5px;
        padding: 15px 20px;
        align-items: center;
        justify-content: center;
        height: auto;
        min-height: 65px;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }

    .header-left {
        max-width: 65%;
        flex: 1;
        margin-left: 0;
    }

    .header-left h1 {
        font-size: 18px;
        margin: 0;
        font-weight: 700;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        font-size: 11px;
        gap: 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .header-right h4 {
        display: block;
        margin: 0;
        font-size: 11px;
        font-weight: 500;
        color: var(--text-muted);
    }

    .top-header h1 {
        font-size: 18px;
        margin: 0;
    }

    .content {
        padding: 20px;
        margin-top: 0;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .stat-card {
        flex-direction: column;
        text-align: left;
        padding: 15px;
    }

    .stat-icon {
        min-width: 50px;
        min-height: 50px;
        font-size: 28px;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .stat-info h3 {
        font-size: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .data-table,
    .report-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td,
    .report-table th,
    .report-table td {
        padding: 10px 8px;
    }

    .grid-2 {
        gap: 15px;
    }

    .charts-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-container {
        height: 400px;
        min-height: 400px;
    }

    .btn-primary,
    .btn-submit {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1001;
        width: 48px;
        height: 48px;
    }

    .main-content {
        padding-top: 80px;
    }

    .top-header {
        padding: 12px 15px;
        min-height: 70px;
        flex-direction: column;
        gap: 3px;
    }

    .top-header h1 {
        font-size: 16px;
    }

    .header-right {
        font-size: 10px;
    }

    .header-right h4 {
        font-size: 10px;
    }

    .content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        min-width: 45px;
        min-height: 45px;
        font-size: 24px;
        margin-right: 12px;
    }

    .stat-info h3 {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .stat-value {
        font-size: 18px;
    }

    .card {
        padding: 15px;
        border-radius: 10px;
    }

    .card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-row {
        gap: 12px;
    }

    .data-table,
    .report-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td,
    .report-table th,
    .report-table td {
        padding: 8px 6px;
    }

    .btn-primary,
    .btn-small,
    .btn-submit {
        padding: 10px 14px;
        font-size: 12px;
    }

    .chart-container {
        height: 350px;
        min-height: 350px;
    }

    .sidebar-logo {
        max-width: 85%;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .sidebar-header p {
        font-size: 11px;
    }

    .sidebar-menu a {
        padding: 12px 20px;
        font-size: 14px;
    }

    .sidebar-menu a i {
        width: auto;
        font-size: 16px;
    }

    .period-card {
        text-align: left;
    }

    .period-card p {
        font-size: 14px;
    }

    .modal-content {
        padding: 25px 20px;
        max-width: 95%;
    }

    .modal-content h3 {
        font-size: 18px;
    }
}

/* Modal Styling */
.modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--dark-color);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--dark-color);
    background: var(--bg-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: var(--text-muted);
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.close:hover {
    color: var(--dark-color);
    background: var(--bg-color);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Budget Page Styles */
.budget-table {
    width: 100%;
    border-collapse: collapse;
}

.budget-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
}

.budget-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.budget-table tbody tr:hover {
    background: #f8f9fa;
}

.budget-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: #333;
}

.kategori-cell {
    font-weight: 500;
}

.progress-cell {
    min-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #6EE7B7 100%);
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #EF4444 0%, #FCA5A5 100%);
}

.progress-text {
    font-size: 11px;
    color: #666;
}

.budget-status {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.budget-status.ok {
    background: #D1FAE5;
    color: #047857;
}

.budget-status.warning {
    background: #FEF3C7;
    color: #92400E;
}

.budget-status.exceeded {
    background: #FEE2E2;
    color: #991B1B;
}

.budget-edit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.budget-edit-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    overflow: visible;
}

.summary-label {
    font-size: 15px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #3B82F6;
}

/* Fancy Tooltip Styles */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-wrapper .tooltip-icon {
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tooltip-wrapper:hover .tooltip-icon {
    opacity: 1;
    transform: scale(1.2);
    color: #3B82F6;
}

.tooltip-content {
    visibility: hidden;
    width: 300px;
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #F3F4F6;
    text-align: center;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 10000;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    pointer-events: auto;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #1F2937 transparent;
}

.tooltip-wrapper:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
}

@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }

    .budget-table {
        font-size: 12px;
    }

    .budget-table th,
    .budget-table td {
        padding: 8px 10px;
    }

    .progress-cell {
        min-width: 150px;
    }
}
/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-aktif {
    background: #D1FAE5;
    color: #065F46;
}

.status-dijual {
    background: #FEE2E2;
    color: #7F1D1D;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

/* Profit/Loss Colors */
.profit {
    color: #059669;
}

.loss {
    color: #DC2626;
}

.neutral {
    color: #6B7280;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.summary-card h3 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Provider Badge */
.provider-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
}

.btn-jual {
    background: var(--warning-color);
    color: white;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-small:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Currency Input */
.input-currency {
    text-align: right;
}

/* Modal Overlay (alternative to .modal) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-overlay .modal-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-overlay .modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--dark-color);
    font-weight: 700;
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-overlay .modal-close:hover {
    color: var(--dark-color);
    background: var(--bg-color);
}

.modal-overlay .modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* Modal Hidden */
.modal-hidden {
    display: none !important;
}

/* Disabled Button State */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

button[disabled]:hover {
    background-color: inherit !important;
}