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

/* Color Variables - White & Brown Theme */
:root {
    --bg-main: #fdfcfb;
    --bg-accent-grad: linear-gradient(135deg, #fbf7f4 0%, #f6f0ea 100%);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-bg-hover: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(139, 90, 43, 0.15);
    /* Soft brown border */
    --glass-border-focus: rgba(139, 90, 43, 0.5);

    --text-primary: #2d241d;
    /* Very dark brown/slate */
    --text-secondary: #5c4b40;
    /* Dark brown */
    --text-muted: #9c8a7f;
    /* Muted brown */

    --color-primary: #8b5a2b;
    /* Coffee Brown */
    --color-secondary: #6e4420;
    /* Dark Mocha */
    --color-success: #10b981;
    /* Emerald 500 */
    --color-warning: #f59e0b;
    /* Amber 500 */
    --color-danger: #f43f5e;
    /* Rose 500 */

    --gradient-primary: linear-gradient(135deg, #a67c52 0%, #8b5a2b 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(at 10% 20%, rgba(139, 90, 43, 0.06) 0px, transparent 40%),
        radial-gradient(at 90% 80%, rgba(166, 124, 82, 0.08) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.25);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

/* Base Glassmorphic Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.03);
}

.glass-panel:hover {
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.06);
}

/* App Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(236, 72, 153, 0.12);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 30px 10px;
    border-bottom: 1px solid rgba(236, 72, 153, 0.1);
    margin-bottom: 25px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 20px;
    color: white;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1e293b;
}

.logo-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.nav-item a:hover {
    color: var(--color-primary);
    background: rgba(236, 72, 153, 0.05);
}

.nav-item.active a {
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.25);
}

.nav-item.active a i {
    transform: scale(1.1);
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 10px 0 10px;
    border-top: 1px solid rgba(236, 72, 153, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(236, 72, 153, 0.1);
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-primary);
}

.user-info .username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    padding: 40px;
    width: calc(100% - 280px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* Header Styles */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-time {
    font-family: monospace;
    font-size: 14px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.05);
}

/* Impending Bills (Jatuh Tempo) Notifications Panel */
.due-alert-container {
    background: #fff5f5;
    /* Light Red */
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.05);
    display: none;
    /* Show/hide dynamically */
}

.due-alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #be123c;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
}

.due-alert-header i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.due-bills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.due-bill-item {
    background: white;
    border-radius: 10px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--color-danger);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.due-bill-info {
    font-size: 13px;
}

.due-bill-info strong {
    color: var(--text-primary);
    font-size: 14px;
}

.due-bill-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 8px;
}

.status-overdue {
    background: #ffe4e6;
    color: #e11d48;
}

.status-today {
    background: #ffedd5;
    color: #ea580c;
}

.status-impending {
    background: #fef9c3;
    color: #ca8a04;
}

/* Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 85px;
    height: 85px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-title {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-icon.pemasukan {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.metric-icon.pengeluaran {
    background: rgba(244, 63, 94, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.metric-icon.profit {
    background: rgba(236, 72, 153, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.metric-icon.aset {
    background: rgba(71, 85, 105, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(71, 85, 105, 0.15);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 750;
    margin-bottom: 5px;
}

.metric-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    margin-right: 5px;
}

.metric-trend.up {
    color: var(--color-success);
}

.metric-trend.down {
    color: var(--color-danger);
}

/* Dashboard Analytics Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    padding: 24px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.chart-body {
    flex-grow: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Recent Activity Grid & Sections */
.sections-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tables & Glass Panel Content Header */
.section-panel {
    padding: 25px;
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    background: rgba(236, 72, 153, 0.05);
    color: var(--color-primary);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.45);
    transform: translateY(-1px);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 13px;
}

.btn-mini {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
}

/* Search and Filters */
.filter-box {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 200px;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.filter-select {
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Tables styling */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: white;
}

.elegant-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.elegant-table th {
    background: #f8fafc;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid rgba(236, 72, 153, 0.12);
    font-family: var(--font-heading);
}

.elegant-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(236, 72, 153, 0.05);
    color: var(--text-primary);
}

.elegant-table tbody tr:hover {
    background: rgba(236, 72, 153, 0.02);
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
}

.badge-success {
    background: #ecfdf5;
    /* Emerald Light */
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: #fff1f2;
    /* Rose Light */
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-warning {
    background: #fffbeb;
    /* Amber Light */
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-info {
    background: #fdf2f8;
    /* Pink Light */
    color: #c026d3;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

/* Goods Grid/Cards */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.asset-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
}

.asset-image-container {
    height: 180px;
    width: 100%;
    background: #f1f5f9;
    position: relative;
    border-bottom: 1px solid rgba(236, 72, 153, 0.1);
}

.asset-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    gap: 8px;
}

.asset-no-img i {
    font-size: 32px;
    color: rgba(236, 72, 153, 0.2);
}

.asset-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.asset-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.asset-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.asset-code {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.asset-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.asset-meta-row strong {
    color: var(--text-primary);
}

.asset-price {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(236, 72, 153, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-actions {
    display: flex;
    gap: 5px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 80%;
    max-width: 750px;
    max-height: 80vh;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.15);
    transform: scale(0.95);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(236, 72, 153, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-body {
    padding: 14px 18px;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(88vh - 110px);
}

.modal-content.modal-sm {
    max-width: 500px;
}

.modal-content.modal-md {
    max-width: 700px;
}

.modal-content.modal-lg {
    max-width: 1000px;
    width: 92%;
}

.modal-content.modal-xl {
    max-width: 1200px;
    width: 95%;
}

.modal-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: stretch;
}

.modal-inputs-column {
    display: block;
}

.modal-upload-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-upload-column .form-group {
    flex-grow: 1;
    margin-bottom: 0;
}

.modal-upload-column .upload-zone {
    flex-grow: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    height: 48px;
    padding: 8px 12px;
    gap: 8px;
}

.modal-upload-column .upload-zone i {
    font-size: 16px;
    margin-bottom: 0;
}

.modal-upload-column .upload-zone p {
    font-size: 12px;
    margin-bottom: 0;
}

.modal-upload-column .upload-zone span {
    display: none;
}

@media(max-width: 992px) {
    .modal-layout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-upload-column .upload-zone {
        min-height: 48px;
    }
}


/* Form Controls - Compact & Efficient */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.form-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 55px;
}

/* Custom Upload Fields - Compact Thumbnail */
.upload-zone {
    border: 1.5px dashed rgba(236, 72, 153, 0.35);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(236, 72, 153, 0.02);
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background: rgba(236, 72, 153, 0.05);
}

.upload-zone i {
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--color-primary);
}

.upload-zone p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.upload-zone span {
    font-size: 10px;
    color: var(--text-muted);
}

.file-input {
    display: none;
}

.upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-item {
    position: relative;
    width: 100%;
    height: 130px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #f1f5f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.preview-item:hover {
    transform: translateY(-2px);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f1f5f9;
    cursor: pointer;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.9);
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 5;
}

.single-preview-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.single-preview-item {
    width: 100%;
    max-width: 280px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.single-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Detail Modal Styles */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-detail-img-container {
    height: 250px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    background: #f8fafc;
}

.main-detail-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-notes-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.receipt-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.receipt-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    object-fit: cover;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.receipt-thumb:hover,
.receipt-thumb.active {
    opacity: 1;
    border-color: var(--color-primary);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    border-bottom: 1px solid rgba(236, 72, 153, 0.1);
    padding-bottom: 10px;
    color: #1e293b;
}

.detail-table {
    width: 100%;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(236, 72, 153, 0.1);
    font-size: 14px;
}

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

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
}

.detail-value.highlight-total {
    font-size: 20px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 800;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 35px rgba(236, 72, 153, 0.1);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: #f0fdf4;
    /* Emerald light */
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

.toast.error {
    background: #fff1f2;
    /* Rose light */
    color: #e11d48;
    border-color: rgba(225, 29, 72, 0.2);
}

.toast.info {
    background: #fdf2f8;
    /* Pink light */
    color: #be185d;
    border-color: rgba(219, 39, 119, 0.2);
}

/* Activity Items on Dashboard */
.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(236, 72, 153, 0.05);
    transition: var(--transition-smooth);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.activity-item:hover {
    background: rgba(236, 72, 153, 0.01);
    border-color: rgba(236, 72, 153, 0.15);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.activity-icon.in {
    background: #ecfdf5;
    color: var(--color-success);
}

.activity-icon.out {
    background: #fff1f2;
    color: var(--color-danger);
}

.activity-details {
    flex-grow: 1;
}

.activity-name {
    font-size: 14px;
    font-weight: 600;
}

.activity-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-amount {
    font-weight: 750;
    font-size: 14px;
    font-family: var(--font-heading);
}

.activity-amount.in {
    color: var(--color-success);
}

.activity-amount.out {
    color: var(--color-danger);
}

/* Responsive adjustments */
@media(max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }
}


/* ========================================= */
/* Login Overlay Styles                      */
/* ========================================= */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-accent-grad);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.1);
    animation: slideUpFade 0.5s ease;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================= */
/* POS Kasir & Lightbox Custom Styles        */
/* ========================================= */

.btn-subtab {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.btn-subtab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(139, 90, 43, 0.05);
}

.btn-subtab.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.25);
}

.pos-cat-pill {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.pos-cat-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(139, 90, 43, 0.05);
}

.pos-cat-pill.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.2);
}

.pemasukan-subtab-content {
    display: none;
}

.pemasukan-subtab-content.active {
    display: block;
    animation: slideUpFade 0.3s ease;
}

#tbody-pemasukan-lainnya-items input.form-input,
#tbody-pengeluaran-items input.form-input,
#tbody-pengeluaran-items select.form-select {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 12px;
}

.pos-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 15px;
    height: 100%;
}

@media (max-width: 992px) {
    .pos-grid-layout {
        grid-template-columns: 1fr;
    }
}

.pos-catalog-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
}

.pos-search-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pos-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.pos-card-item {
    background: #ffffff;
    border: 1px solid rgba(139, 90, 43, 0.15);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    user-select: none;
}

.pos-card-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.15);
}

.pos-card-img {
    width: 100%;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    background: #f8fafc;
    margin-bottom: 6px;
}

.pos-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-card-price {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-primary);
}

.pos-card-stock {
    font-size: 10px;
    color: var(--text-muted);
}

.pos-cart-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.pos-cart-table-wrapper {
    flex-grow: 1;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 10px;
}

.pos-quick-cash-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-quick-cash-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====================================================
   COLLAPSIBLE SIDEBAR & RESPONSIVE LAYOUT
   ==================================================== */

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    background: rgba(139, 90, 43, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--color-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-left: auto;
    font-size: 14px;
}

.sidebar-toggle-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Sidebar Collapsed State (Desktop) */
.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 30px 12px;
}

.sidebar-collapsed .sidebar .logo-container {
    justify-content: center;
    padding: 0 0 20px 0;
}

.sidebar-collapsed .sidebar .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin-left: 0;
    transition: var(--transition-smooth);
}

.sidebar-collapsed .sidebar .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-collapsed .sidebar .nav-menu {
    align-items: center;
}

.sidebar-collapsed .sidebar .nav-item {
    width: 100%;
}

.sidebar-collapsed .sidebar .nav-item a {
    justify-content: center;
    padding: 12px;
    gap: 0;
}

.sidebar-collapsed .sidebar .nav-item a span {
    display: none;
}

.sidebar-collapsed .sidebar .sidebar-footer {
    justify-content: center;
    padding: 15px 0 0 0;
}

.sidebar-collapsed .sidebar .sidebar-footer .user-info {
    display: none;
}

.sidebar-collapsed .sidebar .sidebar-footer button {
    display: none;
}

.sidebar-collapsed .main-content {
    margin-left: 80px;
    width: calc(100% - 80px);
}

/* Mobile Header & Overlay Base */
.mobile-header {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ====================================================
   TABLET & MOBILE RESPONSIVE DESIGN (<= 1024px)
   ==================================================== */
@media screen and (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    /* Show Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--glass-border);
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.04);
        height: 60px;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: var(--color-primary);
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        transition: var(--transition-smooth);
    }

    .mobile-menu-btn:hover {
        background: rgba(139, 90, 43, 0.08);
    }

    /* Transform Sidebar into Mobile Drawer */
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh !important;
        width: 280px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1001 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        padding: 30px 20px !important;
        background: white;
    }

    .sidebar-open .sidebar {
        transform: translateX(0) !important;
    }

    .sidebar-toggle-btn {
        display: none !important;
    }

    /* Reset logo and elements inside drawer */
    .sidebar .logo-container {
        padding: 0 10px 30px 10px !important;
        border-bottom: 1px solid rgba(236, 72, 153, 0.1) !important;
        margin-bottom: 25px !important;
    }

    .sidebar .logo-text {
        opacity: 1 !important;
        width: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .sidebar .nav-menu {
        flex-direction: column !important;
        overflow-x: visible !important;
        flex: none !important;
        margin-top: 10px;
        width: 100%;
        align-items: stretch !important;
    }

    .sidebar .nav-menu .nav-item {
        width: 100%;
    }

    .sidebar .nav-menu .nav-item a {
        padding: 12px 18px !important;
        font-size: 14px !important;
        white-space: normal !important;
        justify-content: flex-start !important;
        gap: 15px !important;
    }

    .sidebar .nav-menu .nav-item a span {
        display: inline !important;
    }

    .sidebar .sidebar-footer {
        margin-top: auto !important;
        padding: 15px 10px 0 10px !important;
        border-top: 1px solid rgba(236, 72, 153, 0.1) !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .sidebar .sidebar-footer .user-info {
        display: block !important;
    }

    .sidebar .sidebar-footer button {
        display: inline-flex !important;
    }

    /* Reset Main Content */
    .main-content {
        margin-left: 0 !important;
        padding: 16px;
        width: 100% !important;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
    }

    /* Make 2-column grid flexible on tablet */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    div[style*="grid-template-columns: 1.8fr 1.2fr"] {
        grid-template-columns: 1fr !important;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .elegant-table th, .elegant-table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .btn {
        min-height: 38px;
        padding: 8px 14px;
    }

    .modal-content.modal-xl, .modal-content.modal-lg {
        width: 95vw !important;
        max-width: 95vw !important;
    }
}

@media screen and (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}