/* ================================================================
   KANOON MITRA SOLUTIONS — LABOUR LAW COMPLIANCE PORTAL — COMPLIANCE DATA PAGES
   Premium visual + motion layer for Live Rates (public) and
   Pending Review (staff). Shared by both pages.
   ================================================================ */

@keyframes cd-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cd-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cd-scale-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes cd-rotate-slow { to { transform: rotate(360deg); } }
@keyframes cd-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(122,31,31,.4); } 70% { box-shadow: 0 0 0 10px rgba(122,31,31,0); } 100% { box-shadow: 0 0 0 0 rgba(122,31,31,0); } }
@keyframes cd-collapse { to { max-height: 0; opacity: 0; margin: 0; padding-top: 0; padding-bottom: 0; transform: scale(.97); } }

/* ---------- Hero ---------- */
.cd-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: 56px 24px 44px; margin: -28px -24px 32px;
    background: var(--ink);
    border-bottom: 3px solid var(--gold);
}
.cd-hero::before {
    content: ""; position: absolute; inset: -80%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(122,31,31,.14) 90deg, transparent 200deg, rgba(122,31,31,.08) 300deg, transparent 360deg);
    pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) { .cd-hero::before { animation: cd-rotate-slow 50s linear infinite; } }
.cd-hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cd-hero-eyebrow { font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-light); font-weight: 700; margin-bottom: 10px; }
.cd-hero h1 { font-family: 'Archivo', sans-serif; font-size: clamp(24px, 3.6vw, 34px); color: #fff; margin: 0 0 12px; line-height: 1.3; }
.cd-hero p { color: rgba(255,255,255,.65); font-size: 13.5px; line-height: 1.7; max-width: 600px; margin: 0 auto; }
.cd-hero-links { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cd-hero-links a { font-size: 11.5px; color: var(--gold-light); text-decoration: none; border: 1px solid rgba(122,31,31,.4); padding: 7px 14px; border-radius: 20px; transition: background .2s ease, border-color .2s ease; }
.cd-hero-links a:hover { background: rgba(122,31,31,.14); border-color: var(--gold); }

/* ---------- Stat strip ---------- */
.cd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 36px; }
.cd-stat {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 16px; text-align: center; box-shadow: var(--shadow);
    animation: cd-fade-up .45s cubic-bezier(.2,.8,.2,1) both;
}
.cd-stat:nth-child(1) { animation-delay: .04s; }
.cd-stat:nth-child(2) { animation-delay: .08s; }
.cd-stat:nth-child(3) { animation-delay: .12s; }
.cd-stat:nth-child(4) { animation-delay: .16s; }
.cd-stat-num { font-family: 'Archivo', sans-serif; font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 6px; background: linear-gradient(120deg, var(--ink), #1e3a6e); -webkit-background-clip: text; background-clip: text; }
.cd-stat-label { font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- Category cards ---------- */
.cd-cat-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); overflow: hidden; margin-bottom: 22px;
    animation: cd-fade-up .5s cubic-bezier(.2,.8,.2,1) both;
    transition: box-shadow .25s ease, transform .25s ease;
}
.cd-cat-card:nth-of-type(1) { animation-delay: .1s; }
.cd-cat-card:nth-of-type(2) { animation-delay: .16s; }
.cd-cat-card:nth-of-type(3) { animation-delay: .22s; }
.cd-cat-card:nth-of-type(4) { animation-delay: .28s; }
.cd-cat-card:hover { box-shadow: var(--shadow-lg); }

.cd-cat-head {
    padding: 16px 22px; display: flex; align-items: center; gap: 12px;
    background: linear-gradient(120deg, var(--ink), #142850); color: #fff;
    border-left: 4px solid var(--accent, var(--gold));
}
.cd-cat-head .cd-icon { font-size: 20px; }
.cd-cat-head .cd-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; }
.cd-cat-head .cd-count { margin-left: auto; font-size: 10.5px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 20px; letter-spacing: .3px; }

.cd-news-list { display: flex; flex-direction: column; }
.cd-news-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--border); transition: background .15s ease; }
.cd-news-item:first-child { border-top: none; }
.cd-news-item:hover { background: rgba(0,0,0,.02); }
.cd-news-state { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); min-width: 76px; }
.cd-news-title { flex: 1; font-size: 13px; font-weight: 600; }
.cd-news-date { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); }

.cd-table-wrap { overflow-x: auto; }
table.cd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.cd-table th {
    background: var(--cream); color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
    font-size: 9.5px; font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
table.cd-table td { padding: 11px 14px; border-bottom: 1px solid #f0ebe0; vertical-align: top; }
table.cd-table tbody tr { animation: cd-fade-in .4s ease both; transition: background .18s ease; }
table.cd-table tbody tr:hover { background: var(--gold-pale); }
table.cd-table td.cd-value { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.cd-verified-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--green); font-weight: 700; }
.cd-verified-badge::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: var(--green-pale); font-size: 9px; }

/* ---------- Empty / building-out state ---------- */
.cd-empty {
    text-align: center; padding: 48px 24px; background: var(--white); border: 1px dashed var(--border);
    border-radius: var(--radius-lg); animation: cd-fade-up .5s cubic-bezier(.2,.8,.2,1) both;
}
.cd-empty .cd-empty-icon { font-size: 34px; margin-bottom: 14px; display: inline-block; animation: cd-pulse-ring 2.4s ease-out infinite; border-radius: 50%; padding: 14px; }
.cd-empty h3 { font-family: 'Archivo', sans-serif; font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.cd-empty p { font-size: 12.5px; color: var(--muted); max-width: 440px; margin: 0 auto; line-height: 1.7; }
.cd-empty-cats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.cd-empty-cats span { font-size: 10.5px; padding: 5px 12px; border-radius: 20px; background: var(--cream); border: 1px solid var(--border); color: var(--muted); }

/* ---------- Minimum Wage pivot (category-first, states underneath) ---------- */
.mw-pivot { }
.mw-search-bar { padding: 16px 22px 0; }
.mw-search-bar input {
    width: 100%; max-width: 280px; font-family: 'DM Sans', sans-serif; font-size: 12.5px;
    padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--cream); color: var(--ink);
    transition: border-color .18s ease, background .18s ease;
}
.mw-search-bar input:focus { outline: none; border-color: var(--gold); background: var(--white); }

.mw-tabs {
    display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 22px 0;
}
.mw-tab {
    font-family: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
    background: var(--cream); color: var(--muted); border: 1px solid var(--border);
    border-radius: 20px 20px 0 0; padding: 9px 16px 8px; cursor: pointer;
    transition: background .18s ease, color .18s ease; display: inline-flex; align-items: center; gap: 7px;
}
.mw-tab:hover { background: var(--gold-pale); color: var(--ink); }
.mw-tab.active { background: var(--white); color: var(--ink); border-bottom-color: var(--white); position: relative; }
.mw-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); }
.mw-tab-count { font-size: 9.5px; background: rgba(0,0,0,.08); padding: 1px 7px; border-radius: 10px; }
.mw-tab.active .mw-tab-count { background: var(--gold-pale); color: var(--ink); }
.mw-panels { border-top: 1px solid var(--border); }
.mw-panel { display: none; animation: cd-fade-in .35s ease both; }
.mw-panel.active { display: block; }
.mw-sub { font-size: 10px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.mw-derived { border-bottom: 1px dashed var(--muted); cursor: help; }

/* Status badges. These were referenced by live-rates.html from the start but never actually
   styled — Verified and On-file rendered as two near-identical runs of plain text, which made
   the page's whole verified-vs-maintained distinction invisible across ~200 rows. Built on the
   same small-pill shape as .mw-tab-count above. */
.mw-badge {
    display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
    border: 1px solid transparent; cursor: help;
}
.mw-badge-verified { background: rgba(26,107,60,.10); color: #14562f; border-color: rgba(26,107,60,.28); }
.mw-badge-reference { background: var(--gold-pale); color: var(--gold-dark); border-color: var(--gold); }
.mw-pdf-cell { text-align: center; }
.mw-pdf-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; background: var(--cream); border: 1px solid var(--border);
    text-decoration: none; font-size: 14px; transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.mw-pdf-link:hover { background: var(--gold-pale); border-color: var(--gold); transform: scale(1.08); }

/* ---------- Pending Review items ---------- */
.cd-review-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
    animation: cd-scale-in .35s cubic-bezier(.2,.8,.2,1) both;
    transition: box-shadow .2s ease, max-height .35s ease, opacity .3s ease, margin .35s ease, padding .35s ease, transform .3s ease;
    max-height: 900px;
}
.cd-review-card.cd-removing { animation: cd-collapse .4s ease forwards; overflow: hidden; }
.cd-review-head { padding: 14px 20px; background: linear-gradient(120deg, var(--ink), #142850); color: #fff; display: flex; align-items: center; gap: 10px; }
.cd-review-head .cd-cat-pill { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; background: var(--gold); color: var(--ink); padding: 3px 10px; border-radius: 20px; }
.cd-review-body { padding: 18px 20px; }
.cd-review-title { font-weight: 700; color: var(--ink); font-size: 13.5px; margin-bottom: 4px; }
.cd-review-link { font-size: 11px; word-break: break-all; }
.cd-review-meta { font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.cd-review-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.cd-review-actions { margin-top: 14px; display: flex; gap: 8px; }
