/* Support Portal — modern public UI */
:root {
    --primary: #0f766e;
    --accent: #14b8a6;
    --text: #0b1220;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #eef2f6;
    --card: #ffffff;
    --danger: #e11d48;
    --ok: #059669;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .10);
    --radius: 18px;
    --font: "Manrope", "Noto Sans Devanagari", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 420px at 10% -5%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
        radial-gradient(700px 380px at 95% 10%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 50%),
        linear-gradient(180deg, #f7fafb 0%, var(--bg) 45%, #e8eef4 100%);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* Header */
.site-header {
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(16px) saturate(1.15);
    border-bottom: 1px solid rgba(226,232,240,.9);
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.brand:hover { text-decoration: none; color: inherit; }
.brand-logo { height: 52px; width: auto; border-radius: 10px; }
.brand-logo-fallback {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, #2dd4bf, #0f766e);
    box-shadow: 0 8px 20px rgba(15,118,110,.28);
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-hi {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
    font-family: "Noto Sans Devanagari", var(--font);
}
.brand-en { font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.system-name {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}
.header-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, #fff);
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}
.header-link:hover {
    text-decoration: none;
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--accent) 18%, #fff);
}

.breadcrumb {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2px 24px 14px;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb .sep { margin: 0 8px; opacity: 0.45; }

.main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.94rem;
    font-weight: 600;
}
.flash-error { background: #fff1f2; color: var(--danger); border: 1px solid #fecdd3; }
.flash-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.flash ul { margin: 0; padding-left: 18px; }

/* Home hero */
.hero-help {
    text-align: center;
    padding: 48px 12px 20px;
    animation: rise .55s ease both;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, #fff);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hero-help h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.04em;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.15;
}
.hero-sub {
    color: var(--muted);
    margin: 0 auto 40px;
    max-width: 520px;
    font-size: 1.05rem;
    line-height: 1.55;
    font-weight: 500;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 360px));
    gap: 20px;
    justify-content: center;
}
.action-card {
    background: var(--card);
    border: 1px solid rgba(226,232,240,.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 22px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    text-align: left;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: rise .6s ease both;
}
.action-card:nth-child(2) { animation-delay: .08s; }
.action-card:hover {
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 40%, #fff);
}
.action-body { display: flex; flex-direction: column; gap: 6px; }
.action-body strong {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}
.action-body span {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 500;
}
.action-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    color: var(--primary);
    font-weight: 700;
    transition: transform .18s ease, background .18s ease;
}
.action-card:hover .action-arrow {
    transform: translateX(3px);
    background: color-mix(in srgb, var(--accent) 22%, #fff);
}
.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--accent) 14%, #fff) no-repeat center / 26px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, #fff);
}
.action-icon-submit {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f766e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M12 4v16m8-8H4'/%3E%3C/svg%3E");
}
.action-icon-view {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f766e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E");
}

.page-block { max-width: 860px; margin: 0 auto; animation: rise .45s ease both; }
.page-title {
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 8px 0 28px;
    text-align: center;
}
.muted { color: var(--muted); }
.req { color: var(--danger); }

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px 18px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.category-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, #fff);
    box-shadow: var(--shadow-lg);
}
.cat-arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--accent) 14%, #fff);
    color: var(--primary);
    font-weight: 800;
}

/* Forms */
.form-wrap { max-width: 560px; }
.ticket-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}
.ticket-form .field { margin-bottom: 18px; }
.ticket-form label {
    display: block;
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 7px;
    font-weight: 700;
}
.ticket-form input[type=text],
.ticket-form input[type=email],
.ticket-form select,
.ticket-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d5dde8;
    border-radius: 12px;
    font: inherit;
    background: #f8fafc;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.form-divider { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.95rem; font-weight: 500; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

.captcha-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.captcha-row img {
    border-radius: 10px;
    display: block;
}
.captcha-row input { max-width: 160px; }
.btn-refresh-captcha {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary);
}
.field-error { color: var(--danger); font-size: 0.85rem; margin-top: 6px; font-weight: 600; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 30%, transparent);
}
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost {
    background: #fff;
    color: var(--muted);
    border-color: var(--border);
}

.track-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
    text-align: center;
    box-shadow: var(--shadow);
}
.track-box .label { color: var(--muted); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.track-box .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
    letter-spacing: 0.04em;
}
.success-block { text-align: center; }

/* Ticket show */
.ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}
.ticket-main .page-title { font-size: 1.5rem; text-align: left; }
.ticket-meta-inline {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 0.92rem;
    display: grid;
    gap: 6px;
    box-shadow: var(--shadow);
}
.ticket-message {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin: 16px 0;
    line-height: 1.55;
}
.ticket-message.is-staff { border-left: 4px solid var(--accent); }
.replies-heading { font-size: 1.1rem; color: var(--text); margin: 28px 0 8px; font-weight: 800; }
.reply-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.badge-staff {
    font-size: 0.7rem;
    background: var(--primary);
    color: #fff;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.side-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    font-size: 0.9rem;
    position: sticky;
    top: 96px;
}
.side-card a { display: inline-block; margin-bottom: 12px; font-weight: 700; }
.side-card dl { margin: 0; }
.side-card dt { color: var(--muted); font-size: 0.75rem; margin-top: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.side-card dd { margin: 4px 0 0; font-weight: 700; color: var(--text); }
.prio { display: inline-flex; align-items: center; gap: 6px; }
.prio::before {
    content: "";
    width: 10px; height: 10px; border-radius: 3px;
    background: #9ca3af;
}
.prio-low::before { background: #38bdf8; }
.prio-medium::before { background: #eab308; }
.prio-high::before { background: #f97316; }
.prio-critical::before { background: #e11d48; }

/* Footer */
.site-footer {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 24px;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 500;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.footer-links a { font-weight: 700; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .header-right { width: 100%; justify-content: space-between; }
    .system-name { white-space: normal; }
    .action-cards, .category-grid { grid-template-columns: 1fr; }
    .ticket-layout { grid-template-columns: 1fr; }
    .side-card { position: static; }
    .hero-help { padding-top: 28px; }
}
