/* ==========================================================
   Ijisho Support Center -- Design System
   Palette: deep ink navy + indigo, warm amber accent
   Type: Space Grotesk (display) + Inter (body/UI)
   Card language: left-accent-bar, keyed to priority/status --
   not the uniform rounded-shadow kit.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #0F172A;
    --ink-soft: #1E293B;
    --surface: #F7F9FC;
    --surface-card: #FFFFFF;
    --border: #E2E8F0;
    --text: #1E293B;
    --text-muted: #64748B;
    --text-on-ink: #E2E8F0;

    --indigo: #4F46E5;
    --indigo-dark: #3730A3;
    --indigo-soft: #EEF2FF;
    --amber: #F59E0B;
    --amber-dark: #B45309;

    --p-emergency: #DC2626;
    --p-emergency-bg: #FEF2F2;
    --p-high: #EA580C;
    --p-high-bg: #FFF7ED;
    --p-medium: #D97706;
    --p-medium-bg: #FFFBEB;
    --p-low: #16A34A;
    --p-low-bg: #F0FDF4;

    --s-open: #4F46E5;
    --s-assigned: #7C3AED;
    --s-progress: #0891B2;
    --s-waiting: #D97706;
    --s-resolved: #16A34A;
    --s-closed: #64748B;

    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 8px 24px rgba(15,23,42,0.08);

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 0.5em 0;
    font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em 0; max-width: 68ch; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius); font-family: var(--font-body);
    font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer;
    text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,0.35); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #E08E0B; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245,158,11,0.35); }
.btn-ghost { background: transparent; color: var(--text-on-ink); border: 1.5px solid rgba(226,232,240,0.35); }
.btn-ghost:hover { background: rgba(226,232,240,0.1); }
.btn-outline { background: #fff; color: var(--indigo); border: 1.5px solid var(--indigo); }
.btn-outline:hover { background: var(--indigo-soft); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
    border-radius: 20px; font-size: 0.76rem; font-weight: 700;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; }

.p-emergency { background: var(--p-emergency-bg); color: var(--p-emergency); }
.p-emergency .badge-dot { background: var(--p-emergency); }
.p-high { background: var(--p-high-bg); color: var(--p-high); }
.p-high .badge-dot { background: var(--p-high); }
.p-medium { background: var(--p-medium-bg); color: var(--p-medium); }
.p-medium .badge-dot { background: var(--p-medium); }
.p-low { background: var(--p-low-bg); color: var(--p-low); }
.p-low .badge-dot { background: var(--p-low); }

.s-open { background: #EEF2FF; color: var(--s-open); }
.s-assigned { background: #F3E8FF; color: var(--s-assigned); }
.s-progress { background: #ECFEFF; color: var(--s-progress); }
.s-waiting { background: #FFFBEB; color: var(--s-waiting); }
.s-resolved { background: #F0FDF4; color: var(--s-resolved); }
.s-closed { background: #F1F5F9; color: var(--s-closed); }

.card {
    background: var(--surface-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); border: 1px solid var(--border);
    padding: 24px; transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-accent { border-left: 4px solid var(--indigo); }
.card:hover { box-shadow: var(--shadow-md); }

.ticket-stub {
    background: var(--surface-card); border-radius: 12px; border: 1px solid var(--border);
    box-shadow: var(--shadow); display: flex; overflow: hidden; transition: box-shadow 0.2s ease;
}
.ticket-stub:hover { box-shadow: var(--shadow-md); }
.ticket-stub-accent { width: 6px; flex-shrink: 0; }
.ticket-stub-body { padding: 20px 22px; flex: 1; min-width: 0; }
.ticket-stub-perf {
    width: 28px; flex-shrink: 0; background: var(--surface);
    background-image: radial-gradient(circle, var(--border) 2px, transparent 2.2px);
    background-size: 12px 16px; background-position: center;
    border-left: 1px dashed var(--border); border-right: 1px dashed var(--border);
}

.site-nav {
    background: var(--ink); position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand .brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--indigo), #7C3AED);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.95rem;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: rgba(226,232,240,0.85); font-weight: 500; font-size: 0.92rem; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
.user-chip {
    display: flex; align-items: center; gap: 8px; color: #fff; font-size: 0.88rem; font-weight: 600;
    background: rgba(255,255,255,0.08); padding: 6px 12px 6px 6px; border-radius: 30px;
}
.avatar-initials {
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.72rem; font-weight: 700;
}

@media (max-width: 860px) {
    .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--ink); flex-direction: column;
        align-items: flex-start; padding: 20px 24px; gap: 18px; transform: translateY(-120%); transition: transform 0.25s ease; }
    .nav-links.open { transform: translateY(0); }
    .nav-toggle { display: block; }
}

.hero {
    background: var(--ink);
    background-image: radial-gradient(1200px 600px at 85% -10%, rgba(79,70,229,0.35), transparent 60%);
    color: var(--text-on-ink); padding: 88px 0 96px 0; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); font-weight: 600; font-size: 0.85rem; margin-bottom: 18px; }
.hero h1 { color: #fff; }
.hero p.lede { color: rgba(226,232,240,0.85); font-size: 1.12rem; max-width: 52ch; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.status-ticker {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 36px; padding: 8px 16px;
    background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.3); border-radius: 30px;
    font-size: 0.85rem; font-weight: 600; color: #4ADE80;
}
.status-ticker .pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #4ADE80;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
    70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.queue-panel {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); padding: 20px; backdrop-filter: blur(6px);
}
.queue-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.queue-panel-head span:first-child { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 0.92rem; }
.queue-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.queue-row:last-child { border-bottom: none; }
.queue-row-bar { width: 4px; height: 32px; border-radius: 2px; flex-shrink: 0; }
.queue-row-text { flex: 1; min-width: 0; }
.queue-row-text .qt-title { color: #fff; font-size: 0.86rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-row-text .qt-meta { color: rgba(226,232,240,0.55); font-size: 0.75rem; }

.reveal { opacity: 0; transform: translateY(14px); animation: reveal-in 0.6s ease forwards; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.16s; }
.reveal-3 { animation-delay: 0.27s; }
.reveal-4 { animation-delay: 0.38s; }
@keyframes reveal-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; opacity: 1; transform: none; }
    .pulse-dot { animation: none; }
}

.priority-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.priority-card { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); border-left: 4px solid; }
.priority-card h4 { font-family: var(--font-body); font-size: 0.98rem; font-weight: 700; margin-bottom: 6px; }
.priority-card p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }
.priority-card.pc-emergency { border-left-color: var(--p-emergency); }
.priority-card.pc-emergency h4 { color: var(--p-emergency); }
.priority-card.pc-high { border-left-color: var(--p-high); }
.priority-card.pc-high h4 { color: var(--p-high); }
.priority-card.pc-medium { border-left-color: var(--p-medium); }
.priority-card.pc-medium h4 { color: var(--p-medium); }
.priority-card.pc-low { border-left-color: var(--p-low); }
.priority-card.pc-low h4 { color: var(--p-low); }

.action-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.action-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px 22px; text-decoration: none; color: var(--text); transition: all 0.2s ease;
    display: flex; flex-direction: column; gap: 10px;
}
.action-card:hover { text-decoration: none; border-color: var(--indigo); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.action-card .ac-icon {
    width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: var(--indigo-soft); color: var(--indigo); font-size: 1.15rem;
}
.action-card h3 { font-size: 1.02rem; margin: 0; }
.action-card p { font-size: 0.84rem; color: var(--text-muted); margin: 0; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; gap: 20px; flex-wrap: wrap; }
.section-head p { color: var(--text-muted); margin: 6px 0 0 0; }

.tut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tut-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; text-decoration: none; color: var(--text); transition: all 0.2s ease; }
.tut-card:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tut-card-top { background: var(--indigo-soft); color: var(--indigo-dark); padding: 22px; display: flex; align-items: center; justify-content: space-between; }
.tut-card-top i { font-size: 1.4rem; }
.tut-card-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; }
.tut-card-body { padding: 18px 20px 22px 20px; }
.tut-card-body h3 { font-size: 1rem; margin-bottom: 6px; }
.tut-card-body p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.tut-card-meta { display: flex; gap: 14px; margin-top: 14px; font-size: 0.76rem; color: var(--text-muted); }

.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.news-item:last-child { border-bottom: none; }
.news-item:hover { text-decoration: none; }
.news-item:hover h3 { color: var(--indigo); }
.news-date { color: var(--text-muted); font-size: 0.85rem; padding-top: 3px; }
.news-type { display: inline-block; margin-bottom: 6px; }
.news-item h3 { margin-bottom: 6px; transition: color 0.15s; }
.news-item p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px; cursor: pointer; font-weight: 600; color: var(--ink); background: none; border: none; width: 100%; text-align: left; font-size: 0.98rem; font-family: var(--font-body); }
.faq-q i { transition: transform 0.2s ease; color: var(--text-muted); flex-shrink: 0; margin-left: 12px; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--text-muted); font-size: 0.92rem; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 4px 18px 4px; }

.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border); padding: 36px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 6px; color: var(--ink); }
.form-group .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-control {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); font-size: 0.94rem; color: var(--text); background: #fff; transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.priority-select { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.priority-option { position: relative; }
.priority-option input { position: absolute; opacity: 0; }
.priority-option label {
    display: block; text-align: center; padding: 12px 8px; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.po-emergency label { color: var(--p-emergency); } .po-emergency input:checked + label { background: var(--p-emergency-bg); border-color: var(--p-emergency); }
.po-high label { color: var(--p-high); } .po-high input:checked + label { background: var(--p-high-bg); border-color: var(--p-high); }
.po-medium label { color: var(--p-medium); } .po-medium input:checked + label { background: var(--p-medium-bg); border-color: var(--p-medium); }
.po-low label { color: var(--p-low); } .po-low input:checked + label { background: var(--p-low-bg); border-color: var(--p-low); }
.file-drop {
    border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center;
    color: var(--text-muted); font-size: 0.86rem; cursor: pointer; transition: all 0.15s;
}
.file-drop:hover { border-color: var(--indigo); background: var(--indigo-soft); }

.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 20px; border: 1px solid transparent; }
.alert-success { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-info { background: var(--indigo-soft); color: var(--indigo-dark); border-color: #C7D2FE; }

.search-hero { max-width: 640px; margin: 0 auto; position: relative; }
.search-hero input {
    width: 100%; padding: 16px 20px 16px 52px; border-radius: 14px; border: none;
    font-size: 1rem; font-family: var(--font-body); box-shadow: var(--shadow-md);
}
.search-hero i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { text-align: left; background: var(--surface); color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFF; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: #fff; padding: 18px 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 20px; }
.filter-group label { display: block; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.filter-group select, .filter-group input { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.86rem; font-family: var(--font-body); }

.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-box { background: #fff; border-radius: var(--radius-lg); padding: 18px 20px; border: 1px solid var(--border); border-left: 4px solid var(--indigo); }
.stat-box .num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.stat-box .lbl { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

.thread-msg { display: flex; gap: 14px; margin-bottom: 20px; }
.thread-msg-body { flex: 1; background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--border); }
.thread-msg.is-staff .thread-msg-body { background: var(--indigo-soft); border-color: #C7D2FE; }
.thread-msg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.thread-msg-head .name { font-weight: 700; font-size: 0.88rem; }
.thread-msg-head .time { font-size: 0.76rem; color: var(--text-muted); }
.thread-msg-internal { background: #FFFBEB !important; border-color: #FDE68A !important; }

.site-footer { background: var(--ink); color: rgba(226,232,240,0.65); padding: 56px 0 28px 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.footer-grid a { color: rgba(226,232,240,0.65); display: block; margin-bottom: 10px; font-size: 0.88rem; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.82rem; flex-wrap: wrap; gap: 10px; }

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .priority-grid, .action-row, .tut-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .priority-grid, .action-row, .tut-grid, .stat-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .news-item { grid-template-columns: 1fr; gap: 6px; }
    .priority-select { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 48px 0; }
}
