/* Sky Cleaning Albania CRM — Stylesheet */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:'Segoe UI',system-ui,-apple-system,sans-serif;font-size:15px;background:#f8fafc;color:#1e293b}
a{text-decoration:none;color:inherit}
button{cursor:pointer;font-family:inherit}
input,select,textarea{font-family:inherit}

/* ── Layout ──────────────────────────────────────────── */
.app-wrap{display:flex;min-height:100vh}
.sidebar{width:220px;background:#0f172a;display:flex;flex-direction:column;flex-shrink:0;position:fixed;top:0;left:0;height:100vh;overflow-y:auto;z-index:100}
.main{flex:1;margin-left:220px;padding:28px;min-height:100vh;background:#f8fafc}

/* ── Sidebar ─────────────────────────────────────────── */
.sb-logo{padding:18px 16px;border-bottom:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;gap:10px}
.sb-logo-icon{width:36px;height:36px;background:#0ea5e9;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.sb-logo-name{color:#fff;font-size:13px;font-weight:700;letter-spacing:.03em}
.sb-logo-sub{color:#64748b;font-size:11px}
.sb-nav{flex:1;padding:10px 8px}
.sb-link{display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;border-radius:8px;border:none;background:transparent;color:#94a3b8;font-size:14px;font-weight:400;text-align:left;transition:background .15s,color .15s;margin-bottom:2px}
.sb-link:hover{background:rgba(14,165,233,.12);color:#cbd5e1}
.sb-link.active{background:rgba(14,165,233,.18);color:#38bdf8;font-weight:600}
.sb-link span.icon{font-size:17px;flex-shrink:0}
.sb-foot{padding:12px 16px;border-top:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;gap:10px}
.sb-avatar{width:30px;height:30px;background:#0ea5e9;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:#fff;flex-shrink:0}
.sb-user-name{color:#fff;font-size:12px;font-weight:600}
.sb-user-role{color:#475569;font-size:11px}

/* ── Page header ─────────────────────────────────────── */
.page-title{font-size:22px;font-weight:700;color:#0f172a;margin-bottom:4px}
.page-sub{font-size:14px;color:#64748b;margin-bottom:22px}
.page-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.page-head h1{font-size:22px;font-weight:700;color:#0f172a}

/* ── Buttons ─────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:8px;border:none;font-size:14px;font-weight:500;transition:opacity .15s,transform .1s;cursor:pointer}
.btn:hover{opacity:.88}
.btn:active{transform:scale(.98)}
.btn-primary{background:#0ea5e9;color:#fff}
.btn-green{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}
.btn-red{background:#fef2f2;color:#dc2626;border:1px solid #fecaca}
.btn-ghost{background:#fff;color:#64748b;border:1px solid #e2e8f0}
.btn-sm{padding:5px 10px;font-size:12px;border-radius:6px}
.btn-icon{width:32px;height:32px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;font-size:15px;border:none}
.btn-icon-red{background:#fef2f2;color:#dc2626}
.btn-icon-green{background:#f0fdf4;color:#15803d}
.btn-icon-yellow{background:#fefce8;color:#854d0e}

/* ── Cards ───────────────────────────────────────────── */
.card{background:#fff;border-radius:12px;border:1px solid #e2e8f0;padding:20px}
.card-pad0{padding:0;overflow:auto}
.stat-grid{display:grid;gap:14px;margin-bottom:20px}
.stat-grid-4{grid-template-columns:repeat(4,1fr)}
.stat-grid-3{grid-template-columns:repeat(3,1fr)}
.stat-card{border-radius:10px;padding:16px 18px}
.stat-card .label{font-size:13px;margin-bottom:3px}
.stat-card .value{font-size:23px;font-weight:700}
.sc-blue{background:#eff6ff;color:#1d4ed8}
.sc-green{background:#f0fdf4;color:#15803d}
.sc-purple{background:#fdf4ff;color:#7e22ce}
.sc-orange{background:#fff7ed;color:#c2410c}
.sc-red{background:#fef2f2;color:#dc2626}

/* ── Tables ──────────────────────────────────────────── */
.tbl{width:100%;border-collapse:collapse;min-width:600px}
.tbl th{text-align:left;padding:11px 14px;font-size:13px;color:#64748b;font-weight:500;border-bottom:1px solid #e2e8f0;white-space:nowrap;background:#f8fafc}
.tbl td{padding:11px 14px;font-size:14px;color:#475569;vertical-align:middle;border-bottom:1px solid #f1f5f9}
.tbl tr:last-child td{border-bottom:none}
.tbl tr:hover td{background:#fafafa}
.tbl tfoot td{background:#f8fafc;border-top:2px solid #e2e8f0;font-weight:600;color:#0f172a}
.td-bold{font-weight:600;color:#0f172a}
.td-link{color:#0ea5e9}
.td-trunc{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── Badges ──────────────────────────────────────────── */
.badge{display:inline-block;font-size:12px;padding:3px 10px;border-radius:20px;white-space:nowrap}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-purple{background:#ede9fe;color:#7c3aed}
.badge-green{background:#dcfce7;color:#15803d}
.badge-gray{background:#f1f5f9;color:#475569}
.badge-yellow{background:#fef9c3;color:#854d0e}
.badge-red{background:#fef2f2;color:#dc2626}
.badge-pink{background:#fce7f3;color:#be185d}

/* ── Forms ───────────────────────────────────────────── */
.form-grid{display:grid;gap:12px}
.form-grid-2{grid-template-columns:1fr 1fr}
.form-group{display:flex;flex-direction:column;gap:4px}
.form-group.full{grid-column:1/-1}
label.lbl{font-size:13px;font-weight:500;color:#374151}
input[type=text],input[type=email],input[type=tel],input[type=number],input[type=date],input[type=password],select,textarea{width:100%;padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;transition:border-color .15s;color:#1e293b;background:#fff}
input:focus,select:focus,textarea:focus{border-color:#0ea5e9;box-shadow:0 0 0 3px rgba(14,165,233,.12)}
textarea{resize:vertical}
.form-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}
.check-row{display:flex;align-items:center;gap:8px}
.check-row input[type=checkbox]{width:16px;height:16px}

/* ── Modal ───────────────────────────────────────────── */
.modal-bg{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:9999;align-items:center;justify-content:center;padding:20px}
.modal-bg.open{display:flex}
.modal-box{background:#fff;border-radius:16px;padding:28px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.modal-head h2{font-size:18px;font-weight:600;color:#0f172a}
.modal-close{background:none;border:none;font-size:24px;line-height:1;color:#94a3b8;cursor:pointer;padding:0}
.modal-close:hover{color:#475569}

/* ── Dashboard charts ────────────────────────────────── */
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.chart-wrap{position:relative;height:220px}
canvas{max-width:100%}

/* ── Calendar ────────────────────────────────────────── */
.cal-header{display:grid;grid-template-columns:repeat(7,1fr);background:#f8fafc;border-bottom:1px solid #e2e8f0}
.cal-dayname{padding:10px 0;font-size:13px;font-weight:500;color:#64748b;text-align:center}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.cal-cell{min-height:88px;padding:6px 8px;border-right:1px solid #f1f5f9;border-bottom:1px solid #f1f5f9}
.cal-cell:nth-child(7n){border-right:none}
.cal-cell.today{background:#f0f9ff}
.cal-cell.empty{background:#fafafa}
.cal-num{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:13px;color:#374151;margin-bottom:3px}
.cal-num.today-dot{background:#0ea5e9;color:#fff;font-weight:700}
.cal-res{background:#0ea5e9;color:#fff;font-size:10px;padding:2px 6px;border-radius:4px;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── Chat ────────────────────────────────────────────── */
.chat-wrap{display:flex;flex-direction:column;height:calc(100vh - 160px);min-height:500px;background:#fff;border-radius:12px;border:1px solid #e2e8f0;overflow:hidden}
.chat-header{padding:12px 16px;background:#0f172a;display:flex;align-items:center;gap:10px}
.chat-online-dot{width:8px;height:8px;border-radius:50%;background:#10b981}
.chat-title{color:#fff;font-size:14px;font-weight:500}
.chat-powered{margin-left:auto;font-size:12px;color:#475569}
.chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.chat-msg{display:flex}
.chat-msg.user{justify-content:flex-end}
.chat-bubble{max-width:76%;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.chat-bubble.assistant{background:#f1f5f9;color:#1e293b;border-radius:14px 14px 14px 3px}
.chat-bubble.user{background:#0ea5e9;color:#fff;border-radius:14px 14px 3px 14px}
.chat-bubble.typing{color:#94a3b8}
.chat-quick{padding:8px 16px;display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid #f1f5f9}
.chat-quick-btn{font-size:12px;padding:4px 10px;background:#f0f9ff;color:#0369a1;border:1px solid #bae6fd;border-radius:20px;cursor:pointer}
.chat-quick-btn:hover{background:#e0f2fe}
.chat-input-row{padding:12px 16px;border-top:1px solid #e2e8f0;display:flex;gap:8px}
.chat-input{flex:1;padding:9px 14px;border:1px solid #e2e8f0;border-radius:10px;font-size:14px;outline:none}
.chat-input:focus{border-color:#0ea5e9}
.chat-send{padding:9px 16px;background:#0ea5e9;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:500}

/* ── Filter pills ────────────────────────────────────── */
.filter-pills{display:flex;gap:6px;margin-bottom:12px}
.pill{padding:6px 14px;border-radius:20px;border:1px solid #e2e8f0;background:#fff;color:#64748b;font-size:13px;cursor:pointer;transition:all .15s}
.pill.active{background:#0ea5e9;color:#fff;border-color:#0ea5e9}

/* ── Search bar ──────────────────────────────────────── */
.search-bar{padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:14px;width:220px;outline:none}
.search-bar:focus{border-color:#0ea5e9}

/* ── Toast ───────────────────────────────────────────── */
.toast{position:fixed;bottom:24px;right:24px;background:#1e293b;color:#fff;padding:12px 20px;border-radius:10px;font-size:14px;z-index:99999;opacity:0;transform:translateY(8px);transition:all .25s}
.toast.show{opacity:1;transform:translateY(0)}
.toast.ok{border-left:4px solid #10b981}
.toast.err{border-left:4px solid #ef4444}

/* ── Empty state ─────────────────────────────────────── */
.empty-state{text-align:center;padding:48px 20px;color:#94a3b8}
.empty-state .emoji{font-size:40px;margin-bottom:12px}
.empty-state p{font-size:15px}

/* ── Upload area ─────────────────────────────────────── */
.upload-area{border:2px dashed #d1d5db;border-radius:8px;padding:20px;text-align:center;cursor:pointer;transition:border-color .15s;font-size:14px;color:#64748b}
.upload-area:hover{border-color:#0ea5e9;color:#0ea5e9}

/* ── Applicant profile ───────────────────────────────── */
.profile-head{display:flex;align-items:center;gap:14px;background:#f8fafc;border-radius:10px;padding:16px;margin-bottom:18px}
.profile-avatar{width:52px;height:52px;border-radius:50%;background:#dbeafe;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:#1d4ed8;flex-shrink:0}
.profile-row{display:flex;padding:8px 0;border-bottom:1px solid #f1f5f9;font-size:14px}
.profile-key{width:100px;color:#64748b;font-weight:500;flex-shrink:0}
.profile-val{color:#0f172a}
.profile-about{background:#f8fafc;border-radius:8px;padding:12px;font-size:14px;line-height:1.7;color:#374151;margin-top:4px}

/* ── Responsive ──────────────────────────────────────── */
@media(max-width:900px){
  .stat-grid-4{grid-template-columns:repeat(2,1fr)}
  .chart-grid{grid-template-columns:1fr}
  .form-grid-2{grid-template-columns:1fr}
}
@media(max-width:640px){
  .sidebar{width:200px}
  .main{margin-left:200px;padding:16px}
  .stat-grid-4{grid-template-columns:1fr 1fr}
}
