/* ══════════════════════════════════════
   Tender Calendar — tender-calendar.css
   ══════════════════════════════════════ */

/* ── Page layout ── */
.cal-page { max-width:1280px; margin:0 auto; padding:28px 16px 0; }
.cal-page *,.cal-page *::before,.cal-page *::after { box-sizing:border-box; }

/* ── Hero ── */
.cal-hero { margin-bottom:24px; }
.cal-hero .eyebrow { margin:0 0 8px; font-size:.92rem; font-weight:700; color:#0f6f99; letter-spacing:.02em; }
.cal-hero h1 { font-size:clamp(1.6rem,2.8vw,2.4rem); margin:0 0 8px; line-height:1.1; }
.cal-hero p  { max-width:680px; color:#4f5b6b; line-height:1.7; margin:0; font-size:.95rem; }

/* ── Top stat strip ── */
.cal-stats { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px; }
.cal-stat { background:#f6fbff; border:1px solid #e2f1f8; border-radius:14px; padding:14px 18px; min-width:150px; flex:1; }
.cal-stat .label { font-size:.82rem; color:#5a7a8a; margin-bottom:4px; }
.cal-stat .value { font-size:1.2rem; font-weight:700; color:#16475d; }

/* ── Main grid: calendar + sidebar ── */
.cal-main { display:grid; grid-template-columns:1fr; gap:20px; }
@media(min-width:960px){ .cal-main { grid-template-columns:1fr 380px; } }

/* ── Calendar card ── */
.cal-card { background:#fff; border:1px solid #e6ebf3; border-radius:20px; overflow:hidden; box-shadow:0 12px 32px rgba(14,27,47,.05); }
.cal-nav { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-bottom:1px solid #edf1f7; background:#fbfdff; }
.cal-nav .month-label { font-size:1.1rem; font-weight:700; color:#172b4d; min-width:180px; text-align:center; }
.cal-nav button { width:38px; height:38px; border:1px solid #d1d9e6; background:#fff; border-radius:10px; cursor:pointer; font-size:1rem; color:#344563; display:grid; place-items:center; transition:all .15s ease; }
.cal-nav button:hover { background:#edf7ff; border-color:#0f6f99; color:#0f6f99; }
.cal-nav .today-btn { width:auto; padding:0 16px; font-size:.88rem; font-weight:600; border-radius:999px; }

/* ── Calendar grid ── */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); }
.cal-grid .day-header { padding:10px 4px; text-align:center; font-size:.8rem; font-weight:700; color:#6b7c8d; text-transform:uppercase; letter-spacing:.04em; background:#f9fbfd; border-bottom:1px solid #edf1f7; }
.cal-grid .day-cell { min-height:80px; padding:6px; border:1px solid #f0f3f8; position:relative; cursor:pointer; transition:background .15s ease; }
.cal-grid .day-cell:hover { background:#f5fbff; }
.cal-grid .day-cell.other-month { background:#fafbfc; }
.cal-grid .day-cell.other-month .day-num { color:#bcc5d0; }
.cal-grid .day-cell.today { background:#edf7ff; }
.cal-grid .day-cell.today .day-num { background:#0f6f99; color:#fff; border-radius:50%; width:28px; height:28px; display:grid; place-items:center; }
.cal-grid .day-cell.selected { outline:2px solid #0f6f99; outline-offset:-2px; z-index:1; }
.day-num { font-size:.88rem; font-weight:600; color:#344563; margin-bottom:4px; }
.day-dots { display:flex; flex-wrap:wrap; gap:3px; }
.day-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.day-dot.urgent    { background:#e74c3c; }
.day-dot.warning   { background:#f39c12; }
.day-dot.normal    { background:#27ae60; }
.day-count { font-size:.72rem; font-weight:700; color:#0f6f99; margin-top:2px; }

/* ── Sidebar ── */
.cal-sidebar { background:#fff; border:1px solid #e6ebf3; border-radius:20px; box-shadow:0 12px 32px rgba(14,27,47,.05); display:flex; flex-direction:column; max-height:620px; }
.sidebar-header { padding:16px 20px; border-bottom:1px solid #edf1f7; background:#fbfdff; border-radius:20px 20px 0 0; }
.sidebar-header .sel-date { font-size:1.05rem; font-weight:700; color:#172b4d; }
.sidebar-header .sel-count { font-size:.85rem; color:#6b7c8d; margin-top:2px; }
.sidebar-list { flex:1; overflow-y:auto; padding:12px; }

/* ── Tender item in sidebar ── */
.tender-item { border:1px solid #edf1f7; border-radius:14px; padding:14px 16px; margin-bottom:10px; background:#fff; transition:transform .15s ease, box-shadow .15s ease; cursor:pointer; }
.tender-item:hover { transform:translateY(-1px); box-shadow:0 8px 20px rgba(14,27,47,.06); }
.tender-item:last-child { margin-bottom:0; }
.tender-item .urgency-bar { height:4px; border-radius:2px; margin-bottom:10px; }
.tender-item .urgency-bar.urgent  { background:linear-gradient(90deg,#e74c3c,#ff6b6b); }
.tender-item .urgency-bar.warning { background:linear-gradient(90deg,#f39c12,#f1c40f); }
.tender-item .urgency-bar.normal  { background:linear-gradient(90deg,#27ae60,#2ecc71); }
.tender-item .t-name { font-size:.94rem; font-weight:700; color:#172b4d; line-height:1.35; margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tender-item .t-buyer { font-size:.86rem; color:#53627c; margin-bottom:6px; }
.tender-item .t-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:.8rem; color:#6a7480; }
.tender-item .t-meta i { color:#0f6f99; margin-inline-end:3px; }
.tender-item .t-days { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; font-size:.78rem; font-weight:700; margin-top:8px; }
.tender-item .t-days.urgent  { background:#fde8e8; color:#c0392b; }
.tender-item .t-days.warning { background:#fef9e7; color:#b7950b; }
.tender-item .t-days.normal  { background:#e8f8f0; color:#1e8449; }
.tender-item .t-link { display:inline-flex; align-items:center; gap:4px; margin-top:8px; color:#0f6f99; font-weight:700; font-size:.85rem; text-decoration:none; }
.tender-item .t-link:hover { text-decoration:underline; }

/* ── Legend ── */
.cal-legend { display:flex; gap:16px; flex-wrap:wrap; margin-top:16px; font-size:.82rem; color:#6b7c8d; }
.cal-legend span { display:inline-flex; align-items:center; gap:5px; }
.cal-legend .dot { width:10px; height:10px; border-radius:50%; }

/* ── Empty/loading ── */
.state-msg { text-align:center; padding:40px 14px; color:#8793a4; font-size:.92rem; }
.state-msg i { font-size:1.4rem; margin-bottom:8px; display:block; }

/* ── Responsive ── */
@media(max-width:600px){
    .cal-page { padding:16px 10px; }
    .cal-grid .day-cell { min-height:56px; padding:4px; }
    .day-num { font-size:.78rem; }
    .cal-sidebar { max-height:none; }
}

