/**
 * F.S.S.M.S. - Main Stylesheet
 * Modern Dark Theme with Pastel Accents
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: #1e1e32;
    --bg-hover: #252542;
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border-color: #2d2d44;
    --border-light: #3d3d5c;
    
    /* Dynamic Colors (set via PHP) */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    
    --secondary: #8b5cf6;
    --accent: #10b981;
    --danger: #ef4444;
    --warning: #f97316;
    --success: #10b981;
    --info: #3b82f6;
    
    /* Pastel Colors for Categories */
    --pastel-green: #86efac;
    --pastel-red: #fca5a5;
    --pastel-blue: #93c5fd;
    --pastel-yellow: #fde047;
    --pastel-purple: #c4b5fd;
    --pastel-pink: #f9a8d4;
    --pastel-orange: #fdba74;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    
    /* Header */
    --header-height: 70px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

/* ===== Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

.content-wrapper {
    flex: 1;
    padding: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition-normal), width var(--transition-normal);
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo img {
    height: 150px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md) 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: var(--spacing-xs) var(--spacing-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-md) var(--spacing-lg);
}

.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.user-balance {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
}

.balance-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xs);
}

.balance-amount {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

/* ===== Header ===== */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-lg);
    gap: var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
}

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

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

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.813rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

.quick-add-btn {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.quick-add-btn:hover {
    transform: scale(1.05);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Stats Card */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-icon.income {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stats-icon.expense {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stats-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stats-icon.warning {
    background: rgba(249, 115, 22, 0.15);
    color: var(--warning);
}

.stats-content {
    flex: 1;
}

.stats-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stats-change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.stats-change.positive {
    color: var(--success);
}

.stats-change.negative {
    color: var(--danger);
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.balance-card::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.balance-meta {
    display: flex;
    gap: var(--spacing-xl);
}

.balance-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.balance-meta-item i {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-error {
    color: var(--danger);
    font-size: 0.813rem;
    margin-top: var(--spacing-xs);
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table-striped tbody tr:nth-child(even) {
    background: var(--bg-tertiary);
}

/* ===== Dropdowns ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-menu-end {
    left: auto;
    right: 0;
}

.dropdown-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-sm) 0;
}

/* ===== Modals ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 2000;
    padding: var(--spacing-lg);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    width: 100%;
    max-width: 500px;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

/* Quick Add Options */
.quick-add-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.quick-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

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

.quick-option i {
    font-size: 2rem;
}

.quick-option.income {
    background: rgba(16, 185, 129, 0.1);
}

.quick-option.income i {
    color: var(--success);
}

.quick-option.expense {
    background: rgba(239, 68, 68, 0.1);
}

.quick-option.expense i {
    color: var(--danger);
}

.quick-option.utility {
    background: rgba(234, 179, 8, 0.1);
}

.quick-option.utility i {
    color: var(--warning);
}

.quick-option.bank {
    background: var(--primary-light);
}

.quick-option.bank i {
    color: var(--primary);
}

/* ===== Alerts ===== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

.alert-dismissible {
    padding-right: 50px;
    position: relative;
}

.alert-close {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

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

.badge-warning {
    background: var(--warning);
    color: white;
}

/* ===== Progress Bars ===== */
.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.success {
    background: var(--success);
}

.progress-bar.danger {
    background: var(--danger);
}

.progress-bar.warning {
    background: var(--warning);
}

/* ===== Utility Status Circles ===== */
.utility-status {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.utility-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.utility-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid;
    transition: all var(--transition-fast);
}

.utility-icon.pending {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.utility-icon.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.utility-name {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.dashboard-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-lg);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ===== Transactions List ===== */
.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.transaction-item:hover {
    background: var(--bg-hover);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.transaction-meta {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
    text-align: right;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

.transaction-status {
    margin-top: 2px;
    font-size: 0.75rem;
}

/* ===== Avatar ===== */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 28px;
    height: 28px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 96px;
    height: 96px;
}

/* ===== User Menu ===== */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-menu-btn:hover {
    background: var(--bg-hover);
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.user-menu-btn i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== Notifications ===== */
.notification-dropdown .dropdown-menu {
    width: 360px;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--primary-light);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.notification-text {
    font-size: 0.813rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Assistant Widget ===== */
.assistant-widget {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 1500;
}

.assistant-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.assistant-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.assistant-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-normal);
}

.assistant-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.assistant-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.assistant-header h4 {
    margin: 0;
    color: white;
    font-size: 1rem;
}

.assistant-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.assistant-close:hover {
    opacity: 1;
}

.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.assistant-message {
    max-width: 85%;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
}

.assistant-message.bot {
    background: var(--bg-tertiary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.assistant-message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.assistant-suggestion {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-hover);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.assistant-suggestion:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.assistant-input {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-sm);
}

.assistant-input input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.assistant-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.assistant-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.assistant-input button:hover {
    background: var(--primary-hover);
}

/* ===== Due Date Status ===== */
.due-date {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.due-date.overdue {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.due-date.urgent {
    background: rgba(249, 115, 22, 0.15);
    color: var(--warning);
}

.due-date.normal {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-lg);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--primary);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.tab-link {
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

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

.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .sidebar-close {
        display: block;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: var(--spacing-md);
    }
    
    .top-header {
        padding: 0 var(--spacing-md);
    }
    
    .search-box {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .balance-value {
        font-size: 1.75rem;
    }
    
    .balance-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .assistant-panel {
        width: calc(100vw - 32px);
        right: -8px;
    }
    
    .notification-dropdown .dropdown-menu {
        width: calc(100vw - 32px);
        right: -70px;
    }
    
    .quick-add-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 16px;
        --spacing-xl: 24px;
    }
    
    .stats-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-dialog {
        margin: var(--spacing-md);
    }
}

/* ===== Print Styles ===== */
@media print {
    .sidebar,
    .top-header,
    .assistant-widget,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-circle {
    border-radius: 50%;
}

/* ===== Tooltips ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: white;
}
/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    background: var(--bg-primary);
    transition: margin-left 0.3s ease;
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

/* Content Wrapper */
.content-wrapper {
    padding: var(--spacing-lg);
    max-width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar-close {
        display: none;
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.dashboard-main {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    color: white;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: var(--spacing-sm) 0;
}

/* Stats Cards */
.stats-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.stats-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    font-size: 1.5rem;
}

.stats-icon.income {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stats-icon.expense {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stats-icon.primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

/* Utility Status */
.utility-status {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.utility-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.utility-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.utility-icon.completed {
    background: var(--success);
    color: white;
}

.utility-icon.pending {
    background: var(--warning);
    color: white;
}

/* Transaction List */
.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

/* Chart Containers */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .content-wrapper {
        padding: var(--spacing-md);
    }
    
    .balance-value {
        font-size: 1.75rem;
    }
    
    .stats-card {
        padding: var(--spacing-sm);
    }
    
    .utility-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
/* Admin Panel Styles */
.sidebar .logo img {
    max-height: 40px;
    width: auto;
}

.sidebar .logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Responsive fixes for admin */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}
}
/* ==================================================
   MOBILE RESPONSIVE STYLES
   Adauga acest cod la finalul fisierului style.css
   ================================================== */

/* Asigură box-sizing pentru toate elementele */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Meta viewport asigurat în header - adaugă dacă lipsește */

/* ===== SIDEBAR MOBILE ===== */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        background: var(--bg-secondary);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-close {
        display: block !important;
        position: absolute;
        right: 16px;
        top: 20px;
        background: none;
        border: none;
        font-size: 1.25rem;
        cursor: pointer;
        color: var(--text-muted);
        z-index: 10;
    }
    
    .sidebar-close:hover {
        color: var(--danger);
    }
}

/* ===== LAYOUT GENERAL ===== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .dashboard-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem !important;
    }
    
    .top-header {
        padding: 0.75rem 1rem !important;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .user-name {
        display: none;
    }
    
    .balance-value {
        font-size: 1.5rem !important;
    }
    
    .balance-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== CARDS ===== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stats-card {
        flex-direction: row;
        padding: 1rem;
    }
    
    .stats-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .stats-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .stats-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-icon {
        margin-bottom: 0.5rem;
    }
}

/* ===== BUTOANE ===== */
@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .page-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ===== TABELE ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    min-width: 600px;
    width: 100%;
}

@media (max-width: 768px) {
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* ===== FORMULARE ===== */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Grupuri de câmpuri pe 2 coloane devin coloană unică */
    [style*="grid-template-columns: repeat(2, 1fr)"]:not(.no-responsive) {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Filtrele din admin */
    .card-body form {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .card-body form .form-group {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .card-body form .btn,
    .card-body form .btn-secondary {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ===== MODALURI ===== */
.modal-dialog {
    width: calc(100% - 2rem);
    max-width: 500px;
    margin: 1rem auto;
}

@media (max-width: 768px) {
    .modal-dialog {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }
    
    .modal-content {
        border-radius: 0.75rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ===== QUICK ADD OPTIONS ===== */
.quick-add-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 480px) {
    .quick-add-options {
        grid-template-columns: 1fr;
    }
    
    .quick-option {
        padding: 1rem;
    }
    
    .quick-option i {
        font-size: 1.5rem;
    }
}

/* ===== ASSISTANT WIDGET ===== */
@media (max-width: 768px) {
    .assistant-panel {
        width: calc(100vw - 2rem);
        right: 0;
        bottom: 70px;
        height: 450px;
        max-height: 60vh;
    }
    
    .assistant-toggle {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .assistant-panel {
        width: calc(100vw - 1rem);
        height: 400px;
    }
}

/* ===== NOTIFICATIONS DROPDOWN ===== */
@media (max-width: 768px) {
    .notification-dropdown .dropdown-menu {
        width: calc(100vw - 2rem);
        right: -50px;
        left: auto;
    }
}

/* ===== GRID-URI PENTRU CARDURI ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* ===== UTILITATI - QUICK ENTRY CARDS ===== */
[style*="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr))"] {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 0.75rem !important;
}

@media (max-width: 480px) {
    [style*="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr))"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== GRAFICE ===== */
.chart-container {
    min-height: 250px;
    position: relative;
}

.chart-container canvas {
    max-height: 250px;
    width: 100% !important;
}

@media (max-width: 768px) {
    .chart-container {
        min-height: 200px;
    }
    
    .chart-container canvas {
        max-height: 200px;
    }
}

/* ===== TABS ===== */
@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
        border-bottom: none;
    }
    
    .tab-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        background: var(--bg-tertiary);
        border-radius: var(--radius-md);
        border-bottom: none;
    }
    
    .tab-link.active {
        background: var(--primary);
        color: white;
        border-bottom: none;
    }
}

/* ===== PAGINA DE ACHIEVEMENTS ===== */
@media (max-width: 768px) {
    .achievement-card .achievement-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .achievement-card h4 {
        font-size: 0.875rem;
    }
    
    .achievement-card .text-muted {
        font-size: 0.7rem;
    }
}

/* ===== PAGINA DE BUGET ===== */
@media (max-width: 768px) {
    .budget-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .budget-card .card-body > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== PAGINA DE CREDITE BANCARE ===== */
@media (max-width: 768px) {
    .banks-list .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .banks-list .card-body > div:first-child {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .banks-list .card-body > div:first-child {
        grid-template-columns: 1fr !important;
    }
}

/* ===== PAGINA DE DOCUMENTE ===== */
@media (max-width: 768px) {
    .document-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .document-card .card-header > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== PAGINA DE RAPOARTE ===== */
@media (max-width: 768px) {
    .reports-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reports-filter .form-group {
        width: 100%;
    }
    
    .reports-filter .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ===== ADMIN PANEL ===== */
@media (max-width: 768px) {
    .admin-main-content {
        margin-left: 0;
    }
    
    .admin-menu-toggle {
        display: block !important;
    }
    
    /* Admin users table */
    .users-table th,
    .users-table td {
        white-space: nowrap;
    }
    
    /* Admin permissions form */
    .permissions-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* ===== AUTH PAGES (Login, Register) ===== */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem !important;
        margin: 1rem;
    }
    
    .auth-logo {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.hide-on-mobile {
    display: inline-flex;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .full-width-mobile {
        width: 100% !important;
    }
}

/* ===== SCROLLBARE PE MOBIL ===== */
@media (max-width: 768px) {
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: var(--bg-tertiary);
        border-radius: 3px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 3px;
    }
}

/* ===== PREVENIRE SCROLL ORIZONTAL ===== */
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.app-container {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.main-content,
.content-wrapper {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* ===== ASIGURARE LĂȚIME 100% ===== */
.card,
.stats-card,
.transaction-item,
.alert {
    max-width: 100%;
    overflow-x: auto;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ===== FIX PENTRU INPUT GROUP PE MOBIL ===== */
@media (max-width: 768px) {
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .form-control {
        flex: 1 1 100%;
        border-radius: var(--radius-md) !important;
        margin-bottom: 0.5rem;
    }
    
    .input-group .input-group-text {
        display: none;
    }
}