/* ═══ LAZIA CRM ═══ */
:root {
    --bg: #f4f6f9;
    --white: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6c7a89;
    --accent: #C6A86B;
    --accent-hover: #b5974e;
    --border: #e2e8f0;
    --sidebar-bg: #1a1a2e;
    --sidebar-w: 240px;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); font-size:14px; }
a { color:var(--accent); text-decoration:none; }
a:hover { color:var(--accent-hover); }

/* Sidebar */
.sidebar { position:fixed; left:0; top:0; bottom:0; width:var(--sidebar-w); background:var(--sidebar-bg); color:#fff; display:flex; flex-direction:column; z-index:50; }
.sidebar-logo { padding:24px 20px; font-size:1.4rem; font-weight:700; letter-spacing:3px; border-bottom:1px solid rgba(255,255,255,0.1); }
.sidebar-logo span { color:var(--accent); font-weight:400; font-size:0.9rem; margin-left:4px; }
.sidebar-nav { flex:1; padding:16px 0; }
.nav-item { display:flex; align-items:center; gap:12px; padding:12px 20px; color:rgba(255,255,255,0.6); transition:0.2s; font-size:0.9rem; position:relative; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,0.05); }
.nav-item.active { color:#fff; background:rgba(198,168,107,0.15); border-right:3px solid var(--accent); }
.badge { background:var(--accent); color:#fff; font-size:0.7rem; padding:2px 8px; border-radius:10px; margin-left:auto; }
.sidebar-footer { padding:16px 20px; border-top:1px solid rgba(255,255,255,0.1); font-size:0.8rem; display:flex; justify-content:space-between; color:rgba(255,255,255,0.4); }
.sidebar-footer a { color:rgba(255,255,255,0.6); }

/* Main */
.main-with-sidebar { margin-left:var(--sidebar-w); padding:24px 32px; min-height:100vh; }
.main-full { display:flex; justify-content:center; align-items:center; min-height:100vh; }

/* Page top */
.page-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.page-top h1 { font-size:1.6rem; font-weight:700; }

/* Cards */
.card { background:var(--white); border-radius:var(--radius); padding:20px; margin-bottom:20px; box-shadow:var(--shadow); }
.card h3 { font-size:1rem; font-weight:600; margin-bottom:16px; }
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.card-header h3 { margin-bottom:0; }

/* Stats */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
.stat-card { background:var(--white); border-radius:var(--radius); padding:20px; display:flex; gap:16px; align-items:center; box-shadow:var(--shadow); }
.stat-icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.4rem; }
.stat-icon.blue { background:#e8f4fd; }
.stat-icon.green { background:#e8f8f0; }
.stat-icon.orange { background:#fef3e2; }
.stat-icon.purple { background:#f0e8fd; }
.stat-value { font-size:1.3rem; font-weight:700; }
.stat-label { font-size:0.8rem; color:var(--text-muted); }

.stats-row { display:flex; gap:16px; margin-bottom:20px; }
.mini-stat { background:var(--white); border-radius:var(--radius); padding:12px 20px; flex:1; box-shadow:var(--shadow); display:flex; justify-content:space-between; align-items:center; }
.mini-label { font-size:0.8rem; color:var(--text-muted); }
.mini-value { font-weight:600; font-size:0.9rem; }

/* Pipeline */
.pipeline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pipe-stage { text-align:center; padding:12px 16px; border-radius:var(--radius); flex:1; min-width:80px; transition:0.2s; }
.pipe-stage:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.pipe-count { font-size:1.5rem; font-weight:700; }
.pipe-label { font-size:0.75rem; color:var(--text-muted); }
.pipe-new { background:#fff3cd; }
.pipe-confirmed { background:#d1ecf1; }
.pipe-shipped { background:#d4edda; }
.pipe-delivered { background:#cce5ff; }
.pipe-completed { background:#e2e3e5; }
.pipe-arrow { color:var(--text-muted); font-size:1.2rem; }

/* Table */
.table { width:100%; border-collapse:collapse; }
.table th { text-align:left; padding:10px 12px; border-bottom:2px solid var(--border); font-size:0.8rem; text-transform:uppercase; color:var(--text-muted); letter-spacing:0.5px; }
.table td { padding:10px 12px; border-bottom:1px solid var(--border); font-size:0.85rem; }
.table tfoot td { border-bottom:none; padding:8px 12px; font-size:0.85rem; }
.total-row td { font-size:1rem !important; padding-top:12px !important; }
.text-right { text-align:right; }
.text-center { text-align:center; }
.text-muted { color:var(--text-muted); }
.clickable { cursor:pointer; }
.clickable:hover { background:#f8f9fa; }

/* Badges */
.status-badge { padding:4px 10px; border-radius:20px; font-size:0.75rem; font-weight:600; text-transform:uppercase; letter-spacing:0.3px; }
.status-badge.large { font-size:0.9rem; padding:8px 20px; }
.status-new { background:#fff3cd; color:#856404; }
.status-confirmed { background:#d1ecf1; color:#0c5460; }
.status-shipped { background:#d4edda; color:#155724; }
.status-delivered { background:#cce5ff; color:#004085; }
.status-completed { background:#e2e3e5; color:#383d41; }
.status-cancelled { background:#f8d7da; color:#721c24; }

.source-badge { padding:3px 8px; border-radius:4px; font-size:0.7rem; font-weight:500; text-transform:uppercase; }
.source-badge.website { background:#e8f4fd; color:#0c5460; }
.source-badge.telegram { background:#e8f0fd; color:#1a3c6e; }
.source-badge.instagram { background:#fde8f0; color:#6e1a3c; }
.source-badge.manual { background:#e8e8e8; color:#555; }
.source-badge.cotton { background:#e8f8f0; color:#155724; }
.source-badge.viscose { background:#f0e8fd; color:#3c1a6e; }
.source-badge.family { background:#fef3e2; color:#856404; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; padding:8px 20px; border-radius:6px; font-size:0.85rem; font-weight:500; cursor:pointer; transition:0.2s; border:none; font-family:inherit; }
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent-hover); color:#fff; }
.btn-outline { background:transparent; color:var(--text); border:1px solid var(--border); }
.btn-outline:hover { background:var(--bg); }
.btn-sm { padding:5px 12px; font-size:0.8rem; }
.btn-block { width:100%; }

/* Forms */
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-weight:500; margin-bottom:6px; font-size:0.85rem; }
.form-group input, .form-select { width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:6px; font-size:0.9rem; font-family:inherit; }
.form-group input:focus, .form-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(198,168,107,0.15); }
.alert { padding:10px 16px; border-radius:6px; margin-bottom:16px; font-size:0.85rem; }
.alert.error { background:#f8d7da; color:#721c24; }

/* Filter tabs */
.filter-tabs { display:flex; gap:4px; margin-bottom:20px; flex-wrap:wrap; }
.tab { padding:8px 16px; border-radius:6px; font-size:0.8rem; color:var(--text-muted); background:var(--white); border:1px solid var(--border); transition:0.2s; }
.tab:hover { background:var(--bg); color:var(--text); }
.tab.active { background:var(--accent); color:#fff; border-color:var(--accent); }

/* Login */
.login-wrap { width:100%; max-width:380px; padding:20px; }
.login-card { background:var(--white); border-radius:var(--radius); padding:40px; box-shadow:0 4px 20px rgba(0,0,0,0.1); }
.login-logo { text-align:center; font-size:2rem; font-weight:700; letter-spacing:5px; margin-bottom:32px; }
.login-logo span { color:var(--accent); font-weight:400; font-size:1rem; }

/* Detail page */
.detail-grid { display:grid; grid-template-columns:1fr 380px; gap:20px; }
.detail-row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--bg); font-size:0.85rem; }
.detail-row span:first-child { color:var(--text-muted); }
.status-form { display:flex; gap:8px; margin:12px 0; }
.status-form select { flex:1; }
.status-timeline { margin-top:12px; }
.timeline-item { padding:6px 0; font-size:0.8rem; color:var(--text-muted); }
.current-status { margin-bottom:12px; }

/* Responsive */
@media(max-width:1024px) { .stats-grid { grid-template-columns:repeat(2,1fr); } .detail-grid { grid-template-columns:1fr; } }
@media(max-width:768px) {
    .sidebar { width:100%; height:auto; position:relative; flex-direction:row; align-items:center; }
    .sidebar-nav { display:flex; padding:0; overflow-x:auto; }
    .nav-item { padding:12px 16px; white-space:nowrap; }
    .nav-item.active { border-right:none; border-bottom:3px solid var(--accent); }
    .sidebar-footer { display:none; }
    .main-with-sidebar { margin-left:0; padding:16px; }
    .stats-grid { grid-template-columns:1fr 1fr; }
    .stats-row { flex-direction:column; }
    .pipeline { flex-direction:column; }
    .pipe-arrow { transform:rotate(90deg); }
    .filter-tabs { overflow-x:auto; flex-wrap:nowrap; }
}
