* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #020617; color: #e2e8f0; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 32px 16px 80px; }
.muted { color: #94a3b8; }
.sm { font-size: 13px; }
.xs { font-size: 11px; }
.green { color: #34d399; }
.red { color: #fb7185; }
.accent { color: #fbbf24; }
.nowrap { white-space: nowrap; }

/* Header */
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
h1 { font-size: 28px; color: #fff; }
.head p { margin-top: 4px; }
.head a.ghost { margin-top: 12px; display: inline-block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 10px;
    padding: 10px 20px; font-size: 15px; font-weight: 600; cursor: pointer; transition: .15s;
    font-family: inherit; }
.btn.sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 32px; font-size: 17px; }
.btn.block { width: 100%; justify-content: center; }
.btn.primary { background: #f59e0b; color: #020617; }
.btn.primary:hover { background: #fbbf24; }
.btn.success { background: #059669; color: #fff; }
.btn.success:hover { background: #10b981; }
.btn.danger { background: #dc2626; color: #fff; }
.btn.danger:hover { background: #ef4444; }
.btn.danger-ghost { background: transparent; border: 1px solid #7f1d1d; color: #fb7185; }
.btn.danger-ghost:hover { background: #450a0a; }
.btn.ghost { background: transparent; border: 1px solid #334155; color: #e2e8f0; }
.btn.ghost:hover { background: #1e293b; }
.btn.price { background: transparent; border: 1px solid #b45309; color: #fbbf24; }
.btn.price:hover { background: #451a03; }
.btn.disabled { opacity: .4; pointer-events: none; }

/* Panel */
.panel { border: 1px solid #1e293b; background: #0f172a; border-radius: 14px; padding: 20px; margin-bottom: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nowrap-row { flex-wrap: nowrap; }

/* Progress */
.progress-wrap { margin-top: 16px; border: 1px solid #334155; border-radius: 14px; padding: 14px; background: #020617; }
.crawl-loading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #fbbf24; font-weight: 700; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #334155; border-top-color: #f59e0b; animation: spin .75s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.progress { height: 10px; background: #1e293b; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg,#f59e0b,#fbbf24,#10b981); background-size: 180% 100%; transition: width .3s; animation: progressGlow 1.2s linear infinite; }
@keyframes progressGlow { 0%{background-position:0 0} 100%{background-position:180% 0} }
.progress-note { margin-top: 8px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.stat { border: 1px solid #334155; background: #0f172a; border-radius: 14px; padding: 20px; }
.stat.green-b { border-color: #065f46; }
.stat.red-b { border-color: #7f1d1d; }
.stat-label { font-size: 13px; color: #94a3b8; }
.stat-val { font-size: 30px; font-weight: 700; color: #fff; margin-top: 4px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.tabs { display: flex; border: 1px solid #1e293b; background: #0f172a; border-radius: 10px; padding: 4px; }
.tab { padding: 6px 16px; border-radius: 7px; font-size: 14px; font-weight: 500; color: #cbd5e1; }
.tab.active { background: #f59e0b; color: #020617; }
.input { background: #020617; border: 1px solid #1e293b; border-radius: 10px; padding: 10px 14px;
    color: #fff; font-size: 14px; outline: none; font-family: inherit; }
.input:focus { border-color: #f59e0b; }
.filters .input[name=q] { flex: 1; min-width: 180px; }

/* Table */
.table-wrap { border: 1px solid #1e293b; border-radius: 14px; overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: #0f172a; color: #94a3b8; }
th { text-align: left; padding: 12px 16px; font-weight: 500; }
tbody tr { border-top: 1px solid #1e293b; background: #020617; }
tbody tr:hover { background: #0f172a99; }
td { padding: 12px 16px; }
.pname { font-weight: 500; color: #f1f5f9; }
.pname:hover { color: #fbbf24; }
.badge { background: #1e293b; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.empty { text-align: center; padding: 40px; color: #64748b; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; }
.status .dot { width: 6px; height: 6px; border-radius: 99px; }
.status.in { background: rgba(16,185,129,.15); color: #34d399; }
.status.in .dot { background: #34d399; }
.status.out { background: rgba(244,63,94,.15); color: #fb7185; }
.status.out .dot { background: #fb7185; }

/* Pager */
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.pager-btns { display: flex; align-items: center; gap: 8px; }

/* CTA */
.cta { margin-top: 40px; text-align: center; border: 1px solid #065f46; border-radius: 18px;
    padding: 32px; background: linear-gradient(135deg, rgba(6,78,59,.5), #0f172a); }
.cta-emoji { font-size: 40px; }
.cta h2 { color: #fff; font-size: 24px; margin: 8px 0; }
.cta p { max-width: 520px; margin: 0 auto 20px; }

/* FAB */
.fab { position: fixed; bottom: 20px; right: 20px; z-index: 40; display: flex; align-items: center; gap: 8px;
    background: #f59e0b; color: #020617; border: none; border-radius: 99px; padding: 14px 20px;
    font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 10px 30px rgba(245,158,11,.3); }
.fab:hover { background: #fbbf24; }
.fab span:first-child { font-size: 20px; }
@media (max-width: 640px) { .fab-text { display: none; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7);
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #0f172a; border: 1px solid #1e293b; border-radius: 18px; padding: 24px;
    width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { color: #fff; font-size: 20px; }
.modal-close { background: none; border: none; color: #64748b; font-size: 28px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal label { display: block; font-size: 14px; font-weight: 500; color: #cbd5e1; margin: 14px 0 6px; }
.modal .input { width: 100%; }
.req { color: #fb7185; }
.dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px;
    border: 2px dashed #334155; background: #020617; border-radius: 10px; padding: 28px; color: #94a3b8; cursor: pointer; }
.dropzone:hover { border-color: #f59e0b; color: #fbbf24; }
.dz-emoji { font-size: 28px; }
.photo-preview { position: relative; }
.photo-preview img { max-height: 220px; width: 100%; object-fit: contain; background: #020617; border: 1px solid #1e293b; border-radius: 10px; }
.photo-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff;
    border: none; border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.photo-remove:hover { background: #dc2626; }
.error { background: rgba(244,63,94,.15); color: #fb7185; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-top: 14px; }
.success-box { text-align: center; padding: 32px 0; }
.big-emoji { font-size: 48px; }
.success-box h3 { font-size: 18px; margin: 8px 0; }
#submitBtn { margin-top: 18px; }

/* Login */
.login { max-width: 360px; margin: 60px auto; text-align: center; }
.login h1 { margin-bottom: 20px; font-size: 22px; }
.login .input { width: 100%; margin-bottom: 12px; }
.login .ghost { margin-top: 16px; display: inline-block; }

/* Cards (requests) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card { border: 1px solid #1e293b; background: #0f172a; border-radius: 14px; overflow: hidden; }
.card.new { border-color: #92400e; }
.card.done { opacity: .7; }
.card-photo { width: 100%; max-height: 220px; object-fit: contain; background: #020617; display: block; }
.card-body { padding: 16px; }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card-top h3 { color: #fff; font-size: 16px; }
.card-body p { margin-top: 4px; }
.card-body .row { margin-top: 12px; }
.tag { padding: 2px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.tag-new { background: rgba(245,158,11,.15); color: #fbbf24; }
.tag-done { background: #334155; color: #cbd5e1; }
.empty-box, .login .error { text-align: center; }
.empty-box { border: 1px solid #1e293b; background: #0f172a; border-radius: 14px; padding: 40px; color: #64748b; }

/* Messengers */
.messengers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.msg { display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; padding: 7px 14px;
    font-size: 13px; font-weight: 600; color: #fff; transition: .15s; }
.msg-phone { background: #475569; } .msg-phone:hover { background: #64748b; }
.msg-wa { background: #059669; } .msg-wa:hover { background: #10b981; }
.msg-vb { background: #7c3aed; } .msg-vb:hover { background: #8b5cf6; }
.msg-tg { background: #0284c7; } .msg-tg:hover { background: #0ea5e9; }
.modal-messengers { margin-top: 18px; border-top: 1px solid #1e293b; padding-top: 16px; }
.center { text-align: center; margin-bottom: 10px; }
.msg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.msg-grid .msg { justify-content: center; padding: 10px; }
