:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe3ef;
    --brand: #0f766e;
    --brand-2: #2563eb;
    --bad: #b91c1c;
    --good: #15803d;
    --shadow: 0 16px 44px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.7; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 900;
    cursor: pointer;
    transition: .18s ease;
}
.btn-main { background: var(--brand); color: #fff; }
.btn-line { background: #fff; color: var(--brand); border: 1px solid rgba(15, 118, 110, .28); }
.btn-soft { background: #eef6f6; color: var(--brand); }
.btn-ghost { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.26); }
.btn:hover { transform: translateY(-1px); }
.mini { min-height: 32px; padding: 0 10px; font-size: 12px; }
.input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    outline: none;
    font: inherit;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus { border-color: rgba(15, 118, 110, .7); box-shadow: 0 0 0 3px rgba(15, 118, 110, .09); }
.form-stack { display: grid; gap: 12px; margin-top: 14px; }
.form-actions, .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.align-start { align-items: start; }

.hero {
    min-height: 430px;
    padding: 24px clamp(16px, 5vw, 72px) 54px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(37, 99, 235, .82)),
        url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1600&q=80") center/cover;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
}
.topbar strong { font-size: 24px; }
.hero-grid {
    max-width: 1180px;
    margin: 72px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 42px;
    align-items: end;
}
.eyebrow { font-weight: 1000; letter-spacing: 0; color: rgba(255,255,255,.82); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; margin-bottom: 16px; }
.hero p { max-width: 660px; color: rgba(255,255,255,.88); font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.status-card {
    padding: 22px;
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.status-card span { color: var(--muted); font-weight: 900; }
.status-card strong { display: block; margin: 8px 0; font-size: 42px; }
.status-card p { color: var(--muted); font-size: 14px; margin: 0; }

.shell { max-width: 1180px; margin: 0 auto; padding: 34px 16px 60px; }
.section { margin-top: 28px; }
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-head h2 { margin-bottom: 6px; font-size: 30px; }
.section-head p { margin: 0; color: var(--muted); }
.package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.package-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.package-top, .package-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}
.package-top span {
    color: var(--brand);
    background: #ecfdf5;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 1000;
}
.package-card h3 { margin: 0; font-size: 20px; }
.package-card p { color: var(--muted); line-height: 1.75; min-height: 60px; }
.timeline { display: grid; gap: 10px; }
.log-item {
    padding: 16px 18px;
    border-left: 4px solid var(--brand);
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.log-item strong { display: block; margin-bottom: 4px; }
.log-item span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.log-item p { margin: 0; color: #475569; line-height: 1.7; }
.contact-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
}
.contact-band p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.8; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact-list div {
    padding: 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}
.contact-list span { display: block; color: rgba(255,255,255,.62); font-size: 12px; margin-bottom: 4px; }
.contact-list strong { overflow-wrap: anywhere; }
.footer { text-align: center; color: var(--muted); padding: 24px; }
.empty { padding: 22px; color: var(--muted); box-shadow: none; }

.admin-body { background: #eef3f8; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-card { width: min(420px, 100%); padding: 26px; }
.login-card h1 { margin-bottom: 8px; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px;
    background: #0f172a;
    color: #fff;
}
.sidebar h1 { margin-bottom: 6px; }
.sidebar p { color: rgba(255,255,255,.62); margin-bottom: 18px; line-height: 1.6; }
.sidebar nav { display: grid; gap: 8px; }
.side-btn {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,.72);
    text-align: left;
    padding: 0 12px;
    font-weight: 900;
    cursor: pointer;
}
.side-btn.active, .side-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { min-width: 0; padding: 18px; }
.admin-top {
    position: sticky;
    top: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
}
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 18px; }
.panel h2 { margin-bottom: 8px; }
.wide { max-width: 920px; }
.narrow { max-width: 520px; }
.table-wrap { overflow-x: auto; padding: 0; }
.table-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}
.table-head span { color: var(--muted); font-size: 13px; font-weight: 900; }
.table { width: 100%; min-width: 780px; border-collapse: collapse; }
.table th, .table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
.table th { color: var(--muted); background: #f8fafc; font-size: 12px; }
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}
.pill.ok { background: #ecfdf5; color: var(--good); }
.pill.bad { background: #fef2f2; color: var(--bad); }
.copy-box { display: grid; gap: 6px; }
.copy-box span { color: var(--muted); font-size: 13px; font-weight: 900; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100;
    transform: translateX(-50%);
    padding: 12px 16px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    box-shadow: var(--shadow);
    font-weight: 900;
}
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 14px 34px rgba(15,23,42,.18);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
}
.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top span {
    font-size: 24px;
    line-height: 1;
    font-weight: 1000;
}

@media (max-width: 980px) {
    .hero-grid, .admin-layout, .admin-grid, .contact-band { grid-template-columns: 1fr; }
    .sidebar { position: sticky; z-index: 20; height: auto; padding: 12px; }
    .sidebar p { display: none; }
    .sidebar nav { display: flex; gap: 8px; overflow-x: auto; }
    .side-btn { white-space: nowrap; min-width: max-content; }
    .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .hero { min-height: 0; padding: 18px 14px 34px; }
    .topbar strong { font-size: 20px; }
    .hero-grid { margin-top: 48px; gap: 22px; }
    .hero h1 { font-size: 38px; }
    .hero p { font-size: 15px; }
    .hero-actions, .form-actions, .grid-2, .contact-list, .package-grid { grid-template-columns: 1fr; display: grid; }
    .shell { padding: 22px 12px 42px; }
    .section-head { display: block; }
    .section-head h2 { font-size: 25px; }
    .admin-main { padding: 12px; }
    .admin-top { display: block; top: 8px; }
    .admin-top .actions { justify-content: flex-start; margin-top: 10px; }
    .table { min-width: 680px; }
    .panel { padding: 14px; }
    .contact-band { padding: 18px; }
    .back-to-top { right: 14px; bottom: 16px; width: 42px; height: 42px; }
}
