:root {
    --brand-primary: #2563eb;
    --brand-dark: #1e3a8a;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --bg-body: #f4f6fb;
    --border-color: #e5e7eb;
}

* { font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; }

body { background-color: var(--bg-body); }

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

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 20px; border-bottom: 1px solid #1e293b; margin-bottom: 14px; }
.sidebar-brand .brand-icon { font-size: 28px; }
.sidebar-brand .brand-title { font-weight: 700; font-size: 15px; color: #fff; }
.sidebar-brand .brand-sub { font-size: 12px; color: #94a3b8; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav .nav-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background 0.15s ease;
}
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--brand-primary); color: #fff; font-weight: 600; }

.sidebar-logout { padding-top: 10px; border-top: 1px solid #1e293b; }

.content-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}
.topbar-title { font-weight: 700; font-size: 18px; color: #111827; }
.topbar-user { font-size: 14px; color: #6b7280; }

.content-body { padding: 24px 28px; }

/* Auth pages */
.auth-body { background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary)); min-height: 100vh; }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: #fff; border-radius: 16px; padding: 36px; width: 100%; max-width: 440px; box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand-icon { font-size: 40px; display: block; }
.auth-brand .brand-title { font-weight: 700; font-size: 18px; margin-top: 6px; color: #111827; }

/* Cards / widgets */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    height: 100%;
}
.stat-card .stat-label { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: #111827; }
.stat-card.accent-primary { border-top: 3px solid var(--brand-primary); }
.stat-card.accent-success { border-top: 3px solid var(--success); }
.stat-card.accent-danger { border-top: 3px solid var(--danger); }
.stat-card.accent-warning { border-top: 3px solid var(--warning); }

.section-card { background: #fff; border-radius: 12px; padding: 22px; border: 1px solid var(--border-color); margin-bottom: 22px; }
.section-title { font-weight: 700; font-size: 16px; margin-bottom: 16px; color: #111827; }

.table thead th { font-size: 13px; color: #6b7280; font-weight: 600; border-bottom: 2px solid var(--border-color); }
.table td { vertical-align: middle; font-size: 14px; }

.badge-status-available { background: #dcfce7; color: #15803d; }
.badge-status-rented { background: #dbeafe; color: #1d4ed8; }
.badge-status-maintenance { background: #fef3c7; color: #b45309; }
.badge-status-sold { background: #f3f4f6; color: #4b5563; }

.insurance-expired { background: #fee2e2 !important; }
.insurance-soon { background: #fef3c7 !important; }

.profit-positive { color: var(--success); font-weight: 700; }
.profit-negative { color: var(--danger); font-weight: 700; }

.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover { background-color: var(--brand-dark); border-color: var(--brand-dark); }

@media (max-width: 900px) {
    .sidebar { position: fixed; right: -260px; z-index: 1030; transition: right 0.2s ease; }
    .app-wrapper { flex-direction: column; }
    .content-body { padding: 16px; }
}
