/* 文件：assets/css/main.css
 * 说明：伊雷娜SaaS 设计系统 —— Bento Box Grid
 *   纯色块填充 / 零渐变 / 零阴影 / 3px 实线黑边 / 零圆角 / 8 色调色板 / 4-2-1 栅格
 */

:root {
    --ink: #1C1C1E;
    --yellow: #FFD600;
    --blue: #0057FF;
    --red: #FF3B30;
    --green: #34C759;
    --purple: #AF52DE;
    --orange: #FF9500;
    --pink: #FF2D92;
    --paper: #FFFFFF;
    --bg: #F5F5F7;
    --muted: #4A4A4F;
    --line: 3px solid #1C1C1E;
    --thin: 2px solid #1C1C1E;
    --gap: 1.25rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl { margin: 0; }
a { color: var(--ink); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 20;
    background: var(--yellow);
    border: var(--line);
    padding: .6rem 1rem;
    font-weight: 800;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------------------------------------------------------------- 顶部导航 */
.topnav {
    background: var(--paper);
    border-bottom: var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.2rem;
    flex-wrap: wrap;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    font-weight: 800;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--yellow);
    border: var(--line);
    font-weight: 900;
}
.brand-name { font-size: 1.05rem; letter-spacing: .02em; }
.navlinks {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}
.navlinks a {
    text-decoration: none;
    font-weight: 700;
    font-size: .92rem;
    padding: .35rem .7rem;
    border: 3px solid transparent;
}
.navlinks a:hover { border-color: var(--ink); background: var(--yellow); }
.navlinks a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topnav-actions { display: flex; gap: .5rem; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .62rem 1.1rem;
    border: var(--line);
    background: var(--paper);
    color: var(--ink);
    font-weight: 800;
    font-size: .94rem;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0;
    transition: transform .12s ease-out, background .12s linear;
}
.btn:hover { transform: translate(-2px, -2px); background: var(--yellow); }
.btn:active { transform: translate(1px, 1px); }
.btn-primary { background: var(--blue); color: var(--paper); }
.btn-primary:hover { background: var(--blue); color: var(--paper); transform: translate(-2px, -2px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink); color: var(--paper); }
.btn-danger { background: var(--red); color: var(--paper); }
.btn-danger:hover { background: var(--red); color: var(--paper); }
.btn-green { background: var(--green); color: var(--paper); }
.btn-green:hover { background: var(--green); color: var(--paper); }
.btn-sm { padding: .38rem .7rem; font-size: .84rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------------- 提示 */
.alert {
    border: var(--line);
    padding: .75rem 1rem;
    font-weight: 700;
    background: var(--paper);
}
.alert-success { background: var(--green); }
.alert-error { background: var(--red); color: var(--paper); }
.alert-info { background: var(--yellow); }

/* ---------------------------------------------------------------- 页面区块 */
.main-area {
    padding: 2rem 1rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-head h2 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: .95rem; max-width: 46rem; }
.eyebrow {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    font-size: .76rem;
    font-weight: 800;
    padding: .2rem .55rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* 首页横幅（后台可控） */
.hero {
    border: var(--line);
    padding: 2.4rem 1.6rem 2.2rem;
    display: grid;
    gap: var(--gap);
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
}
.hero-solo { grid-template-columns: 1fr; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.hero-sub { font-size: 1.02rem; max-width: 40rem; margin-top: .8rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-art { display: grid; gap: .75rem; }
.hero-block { border: var(--line); background: var(--paper); padding: 1rem; font-weight: 800; }

/* 栅格：桌面 4 列 / 平板 2 列 / 手机 1 列 */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-row-2 { grid-row: span 2; }

.card {
    background: var(--paper);
    border: var(--line);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.card-flat { border: var(--thin); }
.card-title { font-size: 1.06rem; font-weight: 800; }
.card-text { color: var(--muted); font-size: .92rem; }
.card-cta { margin-top: auto; }

/* 模板卡：直接内嵌真实站点示例 */
.template-card { overflow: hidden; padding: 0; }
.template-preview {
    height: 14rem;
    border-bottom: var(--line);
    background: var(--paper);
    overflow: hidden;
    position: relative;
}
.template-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--paper);
}
.template-thumb {
    height: 8.5rem;
    border-bottom: var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--ink);
}
.template-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.template-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.template-actions { display: flex; gap: .5rem; margin-top: auto; flex-wrap: wrap; }

/* 站点卡 */
.site-card { gap: .5rem; }
.site-domain { font-family: Consolas, ui-monospace, monospace; font-size: .86rem; word-break: break-all; }

/* 统计块 */
.stat { border: var(--line); background: var(--paper); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.stat-value { font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.stat-yellow { background: var(--yellow); }
.stat-blue { background: var(--blue); color: var(--paper); }
.stat-green { background: var(--green); }
.stat-purple { background: var(--purple); color: var(--paper); }

/* 表格 */
.table-wrap { border: var(--line); background: var(--paper); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
    background: var(--yellow);
    border-bottom: var(--line);
    text-align: left;
    padding: .6rem .7rem;
    font-weight: 900;
    white-space: nowrap;
}
tbody td { border-bottom: var(--thin); padding: .6rem .7rem; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
.mono { font-family: Consolas, ui-monospace, monospace; font-size: .86rem; }

/* 徽标 */
.badge {
    display: inline-block;
    border: var(--thin);
    padding: .1rem .45rem;
    font-size: .76rem;
    font-weight: 900;
    background: var(--paper);
    white-space: nowrap;
}
.badge-ink { background: var(--ink); color: var(--paper); }
.badge-green { background: var(--green); }
.badge-red { background: var(--red); color: var(--paper); }
.badge-blue { background: var(--blue); color: var(--paper); }
.badge-yellow { background: var(--yellow); }
.badge-purple { background: var(--purple); color: var(--paper); }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .86rem; font-weight: 800; }
.field input,
.field select,
.field textarea {
    border: var(--line);
    background: var(--paper);
    padding: .55rem .65rem;
    border-radius: 0;
}
.field textarea { min-height: 5rem; resize: vertical; }
.field .hint { font-size: .78rem; color: var(--muted); }
.field-row { display: flex; gap: .5rem; align-items: center; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.color-input { width: 3rem; height: 2.4rem; padding: .15rem; border: var(--thin); background: var(--paper); }

/* 定价卡 */
.plan-card { display: flex; flex-direction: column; gap: .8rem; }
.plan-price { font-size: 2rem; font-weight: 900; }
.plan-price small { font-size: .8rem; font-weight: 700; color: var(--muted); }
.plan-features { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.plan-features li { display: flex; gap: .5rem; font-size: .9rem; }
.plan-features li::before { content: "▍"; font-weight: 900; }
.plan-popular { background: var(--yellow); }

/* 支付按钮组（支付宝 / 微信） */
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pay-form { flex: 1; }
@media (max-width: 480px) { .pay-row { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 控制台 */
.app-body { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    border-right: var(--line);
    background: var(--paper);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.brand-block { padding-bottom: .8rem; border-bottom: var(--thin); }
.sidenav { display: flex; flex-direction: column; gap: .35rem; }
.sidenav a {
    text-decoration: none;
    font-weight: 800;
    font-size: .92rem;
    padding: .5rem .6rem;
    border: 3px solid transparent;
}
.sidenav a:hover { border-color: var(--ink); background: var(--yellow); }
.sidenav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .5rem; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.25rem;
    background: var(--paper);
    border-bottom: var(--line);
    flex-wrap: wrap;
}
.app-title { font-size: 1.15rem; font-weight: 900; }
.app-user { display: flex; align-items: center; gap: .6rem; font-size: .86rem; flex-wrap: wrap; }
.app-content {
    padding: 1.5rem 1.25rem 3rem;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* 页脚 */
.sitefoot { border-top: var(--line); background: var(--paper); margin-top: 2rem; }
.sitefoot-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: var(--muted);
}
.footlinks { display: flex; gap: .9rem; flex-wrap: wrap; }
.footlinks a { text-decoration: none; font-weight: 700; }
.footlinks a:hover { background: var(--yellow); }

/* 空状态 */
.empty {
    border: var(--line);
    background: var(--paper);
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    align-items: center;
}
.empty h3 { font-size: 1.2rem; font-weight: 900; }
.empty p { color: var(--muted); max-width: 34rem; }

/* 步骤条（部署向导） */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.step { border: var(--line); background: var(--paper); padding: .7rem .8rem; font-weight: 800; font-size: .86rem; }
.step.is-current { background: var(--ink); color: var(--paper); }

/* 响应式：平板 2 列，手机 1 列 */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-4, .span-3 { grid-column: span 2; }
    .hero { grid-template-columns: 1fr; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { border-right: none; border-bottom: var(--line); }
    .sidenav { flex-direction: row; flex-wrap: wrap; }
    .sidebar-foot { flex-direction: row; }
}

@media (max-width: 720px) {
    .grid, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .span-2, .span-3, .span-4, .span-row-2 { grid-column: auto; grid-row: auto; }
    .steps { grid-template-columns: 1fr; }
    .hero { padding: 1.6rem 1rem; }
    .navlinks { order: 3; width: 100%; }
    .main-area { padding: 1.2rem 1rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .btn:hover, .btn:active { transform: none; }
}

/* 顶部广告条（第三方投放，独立标识） */
.adstrip { background: var(--yellow); border-bottom: 3px solid var(--ink); }
.adstrip-link { display: flex; align-items: center; gap: 10px; max-width: 1180px; margin: 0 auto;
  padding: 9px 16px; color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.4; }
.adstrip-tag { flex: 0 0 auto; border: 2px solid var(--ink); padding: 1px 6px; font-size: 11px;
  font-weight: 700; letter-spacing: .08em; }
.adstrip-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adstrip-arrow { flex: 0 0 auto; font-weight: 700; }
.adstrip-link:hover .adstrip-text { text-decoration: underline; }
@media (max-width: 640px) {
  .adstrip-link { font-size: 12px; padding: 10px 14px; }
  .adstrip-text { white-space: normal; }
}


/* 顶部广告条：加强版（深底黄字，整条可点） */
.adstrip { background: var(--ink); border-bottom: 3px solid var(--ink); }
.adstrip-link { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto;
  padding: 13px 16px; color: var(--yellow); text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.35; }
.adstrip-tag { flex: 0 0 auto; background: var(--yellow); color: var(--ink); padding: 2px 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.adstrip-text { flex: 1 1 auto; min-width: 0; }
.adstrip-arrow { flex: 0 0 auto; font-weight: 900; }
.adstrip-link:hover { background: #26262b; }
.adstrip-link:hover .adstrip-text { text-decoration: underline; }

/* 首页大版位广告 */
.adband { display: grid; grid-template-columns: 1fr auto; gap: var(--gap); align-items: center;
  background: var(--yellow); border: 3px solid var(--ink); padding: 26px 26px; margin: 0 0 var(--gap); }
.adband-kicker { display: inline-block; background: var(--ink); color: var(--yellow);
  padding: 3px 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.adband-title { font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 900; line-height: 1.2;
  letter-spacing: -.02em; margin: 10px 0 6px; color: var(--ink); }
.adband-sub { font-size: .98rem; line-height: 1.6; color: var(--ink); max-width: 44rem; }
.adband-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--yellow);
  text-decoration: none; font-weight: 800; font-size: 16px; padding: 16px 24px; border: 3px solid var(--ink); }
.adband-cta:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 800px) {
  .adband { grid-template-columns: minmax(0, 1fr); }
  .adband-cta { justify-content: center; width: 100%; }
  .adstrip-link { font-size: 13px; }
}


/* 广告关闭按钮 */
.adstrip { position: relative; }
.adstrip-link { padding-right: 46px; }
.adstrip-close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 2px solid var(--yellow); color: var(--yellow);
  font: 700 15px/1 system-ui, sans-serif; padding: 0; }
.adstrip-close:hover { background: var(--yellow); color: var(--ink); }
.adband { position: relative; }
.adband-close { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px;
  display: grid; place-items: center; cursor: pointer; background: var(--ink); color: var(--yellow);
  border: 2px solid var(--ink); font: 700 15px/1 system-ui, sans-serif; padding: 0; }
.adband-close:hover { background: var(--paper); color: var(--ink); }
.adband .adband-main { padding-right: 34px; }
[data-ad-dismissed="1"] .adstrip, [data-ad-dismissed="1"] .adband { display: none !important; }

