
:root {
    --bg: #f8fafc;
    --sidebar: #0f172a;
    --panel: #1e293b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-light: #f1f5f9;
    --text-dark: #334155;
    --text-muted: #94a3b8;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --cut: #ef4444;
    --fill: #22c55e;
    --warn: #f59e0b;
}

* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text-dark); display: flex; height: 100vh; overflow: hidden; }

/* LAYOUT */
.app-container { display: flex; width: 100%; }
.sidebar { width: 340px; background: var(--sidebar); color: var(--text-light); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.dashboard { flex: 1; padding: 30px 40px; overflow-y: auto; }

/* SIDEBAR COMPONENTS */
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; border-bottom: 1px solid var(--panel); padding-bottom: 15px; }
.brand i { color: #38bdf8; }
.panel { background: var(--panel); padding: 15px; border-radius: 8px; }
.panel h3 { font-size: 13px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; margin-bottom: 4px; color: #cbd5e1; }
.form-group input { width: 100%; padding: 8px; border-radius: 6px; border: 1px solid #334155; background: #0f172a; color: white; outline: none; }
.highlight-inp { font-size: 14px; font-weight: bold; color: #38bdf8 !important; border-color: #38bdf8 !important; }
.help-text { font-size: 11px; color: #94a3b8; margin-bottom: 8px; line-height: 1.4; }
.sheet-list { font-size: 11px; color: #cbd5e1; margin-left: 15px; margin-bottom: 12px; }
.sheet-list span { color: #64748b; font-size: 9px; }

/* Drag & Drop */
.drop-zone { border: 2px dashed #475569; border-radius: 6px; padding: 15px 10px; text-align: center; color: #94a3b8; font-size: 12px; cursor: pointer; transition: all 0.2s; position: relative; }
.drop-zone:hover, .drop-zone.dragover { border-color: #38bdf8; color: #38bdf8; background: rgba(56, 189, 248, 0.05); }
.drop-zone i { font-size: 24px; margin-bottom: 8px; display: block; }
.drop-zone input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-name { font-size: 11px; color: #10b981; margin-top: 8px; word-break: break-all; text-align: center; }

/* BRANDING */
.dev-info { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; border-left: 3px solid #38bdf8; font-size: 11px; color: #cbd5e1; line-height: 1.6;}
.dev-title { font-weight: bold; color: white; font-size: 12px; margin-bottom: 5px;}
.dev-subtitle { color: #64748b; }
.dev-name { font-size: 13px; font-weight: bold; color: #38bdf8; }
.dev-tel { margin-top: 5px; font-family: monospace; color: white;}

/* BUTTONS */
.btn-primary, .btn-secondary, .btn-secondary-outline, .btn-danger { width: 100%; padding: 10px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.2s; font-size: 12px;}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { background: #334155; color: #64748b; cursor: not-allowed; }
.btn-secondary { background: #10b981; color: white; }
.btn-secondary:hover { background: #059669; }
.btn-secondary-outline { background: transparent; border: 1px solid #475569; color: #e2e8f0; }
.btn-secondary-outline:hover { background: rgba(255,255,255,0.05); border-color: #94a3b8; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 15px; } .mt-4 { margin-top: 30px; }

/* DASHBOARD */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-header h1 { font-size: 24px; font-weight: 700; color: #1e293b; }
.badge { background: #e2e8f0; color: #475569; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.badge.success { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.danger { background: #fee2e2; color: #b91c1c; }

.empty-state { height: 60vh; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 15px; opacity: 0.5; }
.hidden { display: none !important; }

/* PROJECT SNAPSHOT */
.project-snapshot { background: white; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; color: var(--text-dark); display: inline-block; }

/* COMPACT STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stat-box { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.stat-box h5 { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; border-bottom: 1px solid #f1f5f9; padding-bottom: 4px; display:flex; align-items:center; gap:5px; }
.stat-list { list-style: none; font-size: 11px; color: var(--text-dark); }
.stat-list li { margin-bottom: 4px; display: flex; justify-content: space-between; }
.stat-list li span:last-child { font-weight: bold; }

/* PREMIUM CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.kpi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); transition: transform 0.2s; }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card .icon { width: 50px; height: 50px; border-radius: 10px; background: #f1f5f9; display: flex; justify-content: center; align-items: center; font-size: 20px; color: #64748b; }
.kpi-card .info { display: flex; flex-direction: column; }
.kpi-card .label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
.kpi-card .value { font-size: 22px; font-weight: 800; color: #0f172a; }

.card-dark { background: #1e293b; border-color: #1e293b; } .card-dark .label { color: #94a3b8; } .card-dark .value, .card-dark .icon { color: white; } .card-dark .icon { background: #334155; }
.card-primary { background: var(--primary); border-color: var(--primary); } .card-primary .label { color: #bfdbfe; } .card-primary .value, .card-primary .icon { color: white; } .card-primary .icon { background: #1d4ed8; }

.text-cut { color: var(--cut) !important; } .text-fill { color: var(--fill) !important; } 
.text-warn { color: var(--warn) !important; } .text-primary { color: var(--primary) !important; }
.text-success { color: var(--fill) !important; } .text-danger { color: var(--cut) !important; }

/* MAPS */
.maps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 15px; }
.map-box { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 15px; text-align: center; }
.map-box h4 { font-size: 13px; color: var(--text-dark); margin-bottom: 10px; }
.map-box canvas { width: 100%; height: auto; border-radius: 6px; background: #f8fafc; border: 1px solid #e2e8f0; }

/* PDF TEMPLATE */
.pdf-wrapper { position: absolute; top: -9999px; left: -9999px; width: 794px; background: white; }
.pdf-page { width: 794px; height: 1123px; padding: 50px; box-sizing: border-box; position: relative; background: white; }
.pdf-header { border-bottom: 2px solid #1e293b; padding-bottom: 15px; margin-bottom: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.pdf-header h2 { font-size: 24px; color: #1e293b; font-weight: 800; text-transform: uppercase; margin: 0 0 8px 0; }
.pdf-header .meta { text-align: center; font-size: 14px; color: #64748b; font-weight: bold; }
.pdf-section { margin-bottom: 40px; }
.pdf-section h3 { font-size: 16px; color: var(--primary); margin-bottom: 15px; text-transform: uppercase; border-bottom: 1px solid #e2e8f0; padding-bottom: 5px; }
.pdf-section p { font-size: 14px; line-height: 1.6; color: #334155; margin-bottom: 20px; }
.pdf-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.p-card { border: 1px solid #cbd5e1; padding: 20px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.p-card.dark { background: #1e293b; color: white; border-color: #1e293b; }
.p-card.highlight { background: var(--primary); color: white; border-color: var(--primary); }
.p-label { font-size: 14px; font-weight: bold; }
.p-val { font-size: 20px; font-weight: 900; }
.pdf-maps { display: flex; justify-content: space-between; gap: 15px; margin-top: 20px; }
.p-map { flex: 1; text-align: center; border: 1px solid #e2e8f0; padding: 10px; border-radius: 8px; }
.p-map h4 { font-size: 12px; margin-bottom: 10px; }
.p-map img { width: 100%; height: auto; }
.pdf-footer { position: absolute; bottom: 50px; left: 50px; right: 50px; display: flex; justify-content: space-between; border-top: 1px solid #e2e8f0; padding-top: 15px; font-size: 12px; color: #64748b; font-weight: bold; }
