/* ════════════════════════════════════════════════════════════
   Order detail screen (/zlecenia/szczegoly/{slug}).
   Base styles (:root, .page, .btn*, nav, footer) live in main.css —
   this file only adds the detail-specific components (the dark navbar
   is now global, in main.css).
   ════════════════════════════════════════════════════════════ */

/* ── CATEGORY SWITCHER BAR ── */
.cat-switcher { background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:68px; z-index:100; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.cat-sw-inner { max-width:1140px; margin:0 auto; padding:0 32px; display:flex; align-items:center; gap:0; overflow-x:auto; scrollbar-width:none; }
.cat-sw-inner::-webkit-scrollbar { display:none; }
.cat-sw-label { font-size:11px; font-weight:700; color:var(--gray-light); letter-spacing:.08em; text-transform:uppercase; white-space:nowrap; padding:0 14px 0 0; flex-shrink:0; }
.cat-tab { display:flex; align-items:center; gap:6px; padding:14px 16px; font-size:13px; font-weight:600; color:var(--gray); text-decoration:none; white-space:nowrap; border-bottom:2px solid transparent; transition:all .15s; flex-shrink:0; }
.cat-tab:hover { color:var(--dark); }
.cat-tab.active { color:var(--orange); border-bottom-color:var(--orange); }
.cat-tab-emoji { display:inline-flex; }

/* ── BREADCRUMB ── */
.breadcrumb { display:flex; align-items:center; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.breadcrumb a { font-size:13px; color:var(--gray); text-decoration:none; transition:color .15s; }
.breadcrumb a:hover { color:var(--orange); }
.breadcrumb span { font-size:13px; color:var(--gray-light); }
.breadcrumb .crumb-active { font-size:13px; color:var(--mid); font-weight:500; }

/* ── ORDER HEADER ── */
.order-hdr { margin-bottom:24px; }
.order-badges { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius:20px; font-size:11px; font-weight:700; letter-spacing:.04em; white-space:nowrap; }
.badge-g { background:#ECFDF5; color:#059669; }
.badge-o { background:var(--orange-pale); color:var(--orange); }
.badge-b { background:#EFF6FF; color:#2563EB; }
.badge-r { background:#FEE2E2; color:#DC2626; }
.badge-s { background:var(--bg); color:var(--gray); }
.badge-dot { width:5px; height:5px; border-radius:50%; background:currentColor; }

.order-title { font-size:28px; font-weight:900; letter-spacing:-0.04em; line-height:1.2; margin-bottom:12px; }

.order-meta { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.ometa { display:flex; align-items:center; gap:5px; font-size:13px; color:var(--gray); }
.ometa svg { width:13px; height:13px; color:var(--gray-light); flex-shrink:0; }
.ometa strong { color:var(--mid); font-weight:600; }

/* ── TWO-COLUMN LAYOUT ── */
.detail-grid { display:grid; grid-template-columns:1fr 340px; gap:24px; align-items:start; }
.main-content { display:flex; flex-direction:column; gap:20px; }

.content-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:28px; }
.card-title { font-size:16px; font-weight:800; letter-spacing:-0.02em; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.card-title svg { width:18px; height:18px; color:var(--orange); }

/* Description */
.desc-text { font-size:15px; line-height:1.75; color:var(--mid); white-space:pre-line; }

/* Specification table */
.spec-table { width:100%; border-collapse:collapse; }
.spec-table tr { border-bottom:1px solid var(--border); }
.spec-table tr:last-child { border-bottom:none; }
.spec-table td { padding:11px 4px; font-size:14px; vertical-align:top; }
.spec-table td:first-child { color:var(--gray); font-weight:500; width:44%; padding-right:12px; }
.spec-table td:last-child { color:var(--dark); font-weight:600; }
.spec-empty { font-size:14px; color:var(--gray-light); }

/* Files */
.files-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.file-card { display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:11px; padding:11px 13px; cursor:pointer; transition:all .18s; text-decoration:none; }
.file-card:hover { border-color:var(--orange); box-shadow:0 2px 10px rgba(255,77,0,.1); }
.file-card:hover .file-download { color:var(--orange); }
.file-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:10px; font-weight:800; letter-spacing:.04em; background:#FFF0EB; color:#FF4D00; }
.file-info { min-width:0; flex:1; }
.file-download { width:18px; height:18px; flex-shrink:0; color:var(--gray-light); transition:color .18s; }
.files-empty { display:flex; align-items:center; gap:10px; padding:18px; border:1px dashed var(--border); border-radius:11px; color:var(--gray); font-size:13px; }
.files-empty svg { width:20px; height:20px; color:var(--gray-light); flex-shrink:0; }
.file-name { font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--dark); }
.file-size { font-size:11px; color:var(--gray-light); margin-top:2px; }

/* ── OFFERS SECTION ── */
.offers-header { display:flex; align-items:center; justify-content:space-between; margin:24px 0 14px; flex-wrap:wrap; gap:12px; }
.offers-title { font-size:19px; font-weight:800; letter-spacing:-0.02em; }
.offers-title span { color:var(--orange); }
.offers-empty { background:var(--surface); border:1px dashed var(--border); border-radius:16px; padding:40px 28px; text-align:center; }
.offers-empty-icon { width:54px; height:54px; border-radius:14px; background:var(--orange-pale); color:var(--orange); display:flex; align-items:center; justify-content:center; margin:0 auto 14px; }
.offers-empty-icon svg { width:26px; height:26px; }
.offers-empty-title { font-size:16px; font-weight:800; letter-spacing:-0.02em; margin-bottom:6px; }
.offers-empty-text { font-size:13px; color:var(--gray); line-height:1.6; max-width:360px; margin:0 auto; }

/* ── SIDEBAR ── */
.sidebar { position:sticky; top:130px; display:flex; flex-direction:column; gap:14px; }
.side-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:22px; }
.side-title { font-size:12px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--gray-light); margin-bottom:16px; }

.side-stat { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--border); }
.side-stat:last-of-type { border-bottom:none; }
.ss-label { font-size:13px; color:var(--gray); display:flex; align-items:center; gap:6px; }
.ss-label svg { width:14px; height:14px; color:var(--gray-light); flex-shrink:0; }
.ss-val { font-size:14px; font-weight:700; color:var(--dark); text-align:right; }
.ss-val.hi { color:var(--orange); font-size:15px; }
.deadline-bar { height:3px; background:var(--bg); border-radius:4px; margin:0 0 4px; overflow:hidden; }
.deadline-fill { height:100%; background:linear-gradient(90deg,#FF6B2B,#FF3200); border-radius:4px; }

/* Client card */
.client-row { display:flex; align-items:center; gap:11px; }
.client-av { width:44px; height:44px; border-radius:10px; background:var(--orange-pale); color:var(--orange); display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:900; flex-shrink:0; }
.client-name { font-size:14px; font-weight:800; letter-spacing:-0.01em; }
.client-sub { font-size:12px; color:var(--gray-light); margin-top:2px; }
.client-verif { display:inline-flex; align-items:center; gap:4px; background:#EFF6FF; color:#2563EB; font-size:10px; font-weight:700; padding:2px 8px; border-radius:20px; margin-top:6px; }
.client-verif svg { width:11px; height:11px; }
.client-stats { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:14px; }
.cstat { background:var(--bg); border-radius:8px; padding:9px; text-align:center; }
.cstat-v { font-size:16px; font-weight:900; color:var(--dark); letter-spacing:-0.03em; }
.cstat-l { font-size:10px; color:var(--gray-light); margin-top:2px; }

/* CTA card */
.cta-main { width:100%; padding:14px; font-size:15px; font-weight:800; border-radius:11px; background:var(--orange); color:#fff; border:none; cursor:pointer; font-family:inherit; transition:all .18s; display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.cta-main svg { width:16px; height:16px; }
.cta-main:hover { background:var(--orange-hover); transform:translateY(-1px); box-shadow:0 4px 14px rgba(255,77,0,.3); }
.cta-sec { width:100%; padding:11px; font-size:13px; font-weight:600; border-radius:11px; background:transparent; color:var(--mid); border:1.5px solid var(--border); cursor:pointer; font-family:inherit; transition:all .15s; margin-top:8px; }
.cta-sec:hover { border-color:var(--orange); color:var(--orange); }
.cta-note { font-size:11px; color:var(--gray-light); text-align:center; margin-top:10px; line-height:1.5; }

/* Secondary action buttons (phone + message) */
.cta-actions-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.cta-act-btn { width:100%; padding:10px 6px; border-radius:10px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; transition:all .18s; border:1.5px solid var(--border); background:var(--surface); color:var(--mid); display:flex; align-items:center; justify-content:center; gap:6px; }
.cta-act-btn:hover { border-color:var(--orange); color:var(--orange); background:var(--orange-pale); }
.cta-act-btn svg { width:14px; height:14px; flex-shrink:0; }

/* Phone reveal */
@keyframes popIn { from { opacity:0; transform:scale(.94); } to { opacity:1; transform:scale(1); } }
.phone-revealed { background:var(--orange-pale); border:1px solid #FFCBAD; border-radius:10px; padding:11px 13px; animation:popIn .18s ease; grid-column:span 2; margin-top:8px; }
.phone-number { font-size:16px; font-weight:900; color:var(--orange); display:block; letter-spacing:.03em; margin-bottom:9px; }
.phone-row { display:flex; gap:7px; }
.phone-link { display:inline-flex; align-items:center; justify-content:center; gap:5px; font-size:12px; font-weight:700; text-decoration:none; padding:6px 12px; border-radius:8px; cursor:pointer; font-family:inherit; border:none; transition:all .15s; }
.phone-link-call { background:var(--orange); color:#fff; flex:1; }
.phone-link-call:hover { background:var(--orange-hover); }
.phone-link-copy { background:var(--surface); border:1.5px solid #FFCBAD; color:var(--orange); }
.phone-link-copy:hover { background:#fff0e8; }
.phone-link-copy.copied { background:#ECFDF5; border-color:#A7F3D0; color:#059669; }

/* ── MESSAGE MODAL ── */
.msg-modal { position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; align-items:center; justify-content:center; z-index:500; padding:16px; backdrop-filter:blur(4px); }
.msg-modal.open { display:flex; animation:fadeIn .15s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.msg-box { background:var(--surface); border-radius:20px; width:100%; max-width:480px; box-shadow:0 20px 60px rgba(0,0,0,.22); animation:slideUp .2s ease; overflow:hidden; }
@keyframes slideUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.msg-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px 14px; border-bottom:1px solid var(--border); }
.msg-title { font-size:16px; font-weight:800; letter-spacing:-0.02em; display:flex; align-items:center; gap:8px; }
.msg-title svg { width:17px; height:17px; color:var(--orange); }
.msg-close { width:32px; height:32px; border-radius:8px; border:1.5px solid var(--border); background:transparent; cursor:pointer; font-size:18px; color:var(--gray); display:flex; align-items:center; justify-content:center; transition:all .15s; line-height:1; }
.msg-close:hover { border-color:#DC2626; color:#DC2626; background:#FEF2F2; }
.msg-to { display:flex; align-items:center; gap:11px; padding:13px 20px; border-bottom:1px solid var(--border); background:var(--bg); }
.msg-to-av { width:36px; height:36px; border-radius:9px; background:var(--orange-pale); color:var(--orange); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:900; flex-shrink:0; }
.msg-to-name { font-size:13px; font-weight:700; color:var(--dark); }
.msg-to-re { font-size:11px; color:var(--gray-light); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:320px; }
.msg-body { padding:16px 20px 0; }
.msg-textarea { width:100%; min-height:130px; resize:none; border:1.5px solid var(--border); border-radius:11px; font-size:14px; font-family:inherit; color:var(--dark); padding:12px 14px; outline:none; line-height:1.6; transition:border-color .2s, box-shadow .2s; }
.msg-textarea:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(255,77,0,.1); }
.msg-textarea.error { border-color:#DC2626; }
.msg-char { text-align:right; font-size:11px; color:var(--gray-light); margin-top:4px; }
.msg-footer { display:flex; align-items:center; justify-content:space-between; padding:14px 20px 18px; gap:10px; }
.msg-hint { font-size:12px; color:var(--gray-light); display:flex; align-items:center; gap:5px; }
.msg-hint svg { width:13px; height:13px; color:var(--gray-light); flex-shrink:0; }
.msg-send { display:flex; align-items:center; gap:7px; padding:11px 22px; background:var(--orange); color:#fff; border:none; border-radius:10px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit; transition:all .18s; white-space:nowrap; }
.msg-send:hover { background:var(--orange-hover); transform:translateY(-1px); box-shadow:0 4px 12px rgba(255,77,0,.3); }
.msg-send svg { width:14px; height:14px; }
.msg-success { display:none; text-align:center; padding:36px 20px; }
.msg-success-icon { width:56px; height:56px; background:#ECFDF5; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.msg-success-icon svg { width:26px; height:26px; color:#059669; }
.msg-success h3 { font-size:17px; font-weight:800; letter-spacing:-0.02em; margin-bottom:6px; }
.msg-success p { font-size:13px; color:var(--gray); line-height:1.6; }

/* ── RWD ── */
@media (max-width:1023px) {
  .detail-grid { grid-template-columns:1fr; }
  .sidebar     { position:static; }
}
@media (max-width:767px) {
  .cat-switcher { top:0; }
  .cat-sw-inner { padding:0 16px; }
  .order-title { font-size:22px; }
  .files-grid  { grid-template-columns:1fr; }
}
@media (max-width:479px) {
  .order-title { font-size:19px; }
}
