/* =========================
   QISHUN DESIGN TOKENS
========================= */
:root {
  --qishun-gold: #d6ad38;
  --qishun-gold-soft: #efc184;
  --qishun-bg: #f8f3ea;
  --qishun-bg-light: #fffaf1;
  --qishun-text: #2f2a24;
  --qishun-muted: #6d6158;
  --qishun-card: #fffdf8;
  --qishun-border: #ead9af;
  --qishun-dark: #33312f;
  --qishun-shadow: 0 14px 34px rgba(80, 60, 25, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--qishun-bg);
  color: var(--qishun-text);
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

/* =========================
   SHELL
========================= */
.qishun-shell {
  width: 100%;
  background: var(--qishun-bg);
}

/* =========================
   HEADER
========================= */
.qishun-topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 32px;
}

.qishun-logo-wrap {
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  width: 100%;
}

.qishun-address,
.qishun-contact {
  font-size: 14px;
  color: var(--qishun-muted);
  line-height: 1.55;
}

.qishun-address {
  justify-self: start;
  text-align: left;
}

.qishun-contact {
  justify-self: end;
  text-align: right;
}

.qishun-logo-img {
  width: 105px;
  max-width: 105px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* =========================
   MENU
========================= */
.qishun-menu {
  width: 100%;
  background: var(--qishun-gold-soft);
  padding: 14px 10px;
  text-align: center;
}

.qishun-menu a {
  color: #fffdf8;
  text-decoration: none;
  font-weight: 700;
  margin: 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.qishun-menu a:hover {
  color: var(--qishun-text);
}

/* =========================
   HERO
========================= */
.qishun-hero {
  width: 100%;
  background: linear-gradient(135deg, #fff8e8, #f1dfb6);
  border-bottom: 1px solid var(--qishun-border);
  padding: 48px 20px;
  text-align: center;
}

.qishun-hero h1 {
  margin: 0;
  color: #9d7a22;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
}

.qishun-hero p {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--qishun-muted);
  font-size: 18px;
  line-height: 1.7;
}

/* =========================
   CONTENT
========================= */
.qishun-content {
  max-width: 1120px;
  margin: 40px auto 70px;
  padding: 0 20px;
}

.qishun-back {
  margin-bottom: 22px;
  text-align: center;
}

.qishun-back a {
  color: var(--qishun-muted);
  text-decoration: none;
  font-weight: 700;
}

.qishun-back a:hover {
  color: var(--qishun-gold);
}

.qishun-card-wrap,
.soft-card,
.card {
  background: var(--qishun-card);
  border: 1px solid var(--qishun-border);
  border-radius: 22px;
  box-shadow: var(--qishun-shadow);
  padding: 30px;
  margin-bottom: 22px;
}

.soft-card.accent,
.card.accent {
  border-left: 6px solid var(--qishun-gold);
}

.qishun-card-wrap h2,
.soft-card h2,
.card h2 {
  margin-top: 0;
  color: #4a3923;
}

.qishun-card-wrap p,
.soft-card p,
.card p {
  color: var(--qishun-muted);
  line-height: 1.7;
}

/* =========================
   NAV INSIDE SECURE APP
========================= */
.secure-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.secure-nav a {
  background: #fffdf8;
  color: var(--qishun-muted);
  border: 1px solid var(--qishun-border);
  border-radius: 999px;
  padding: 9px 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
}

.secure-nav a:hover {
  color: var(--qishun-gold);
}

/* =========================
   LAYOUT HELPERS
========================= */
.grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: start;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* =========================
   FORMS
========================= */
.qishun-form,
form {
  display: grid;
  gap: 18px;
}

.qishun-form label,
form label,
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #4a3923;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.qishun-form input,
.qishun-form select,
.qishun-form textarea,
form input,
form select,
form textarea,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--qishun-border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  background: #ffffff;
  color: var(--qishun-text);
  font-family: Arial, Helvetica, sans-serif;
}

.qishun-form textarea,
form textarea,
textarea {
  min-height: 120px;
  resize: vertical;
}

.qishun-form input:focus,
.qishun-form select:focus,
.qishun-form textarea:focus,
form input:focus,
form select:focus,
form textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--qishun-gold);
  box-shadow: 0 0 0 3px rgba(214, 173, 56, 0.18);
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 24px;
  margin-top: 4px;
}

.checks label {
  font-weight: normal;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  column-gap: 10px;
  margin: 0;
  line-height: 1.35;
  font-family: Arial, Helvetica, sans-serif;
}

.checks input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0 0;
  justify-self: start;
}

.checks-single {
  grid-template-columns: 1fr;
  background: var(--qishun-bg-light);
  border: 1px solid var(--qishun-border);
  border-radius: 18px;
  padding: 16px;
}

/* =========================
   BUTTONS
========================= */
.qishun-button,
button.qishun-button,
.button,
button.button {
  background: var(--qishun-gold);
  color: #1f1a12;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.qishun-button:hover,
button.qishun-button:hover,
.button:hover,
button.button:hover {
  background: #c79c2f;
  transform: translateY(-1px);
}

.button.light,
.button.secondary,
.button.soft-accent {
  background: #fffdf8;
  color: var(--qishun-muted);
  border: 1px solid var(--qishun-border);
}

.button.danger {
  background: #fff1e8;
  color: #9a3412;
  border: 1px solid #e6b99c;
}

/* =========================
   STATUS / BADGES
========================= */
.small {
  color: var(--qishun-muted);
  font-size: .93rem;
}

.notice {
  background: #f1fbf6;
  border: 1px solid #b7e4ca;
  color: #315d4d;
  padding: 13px 15px;
  border-radius: 14px;
}

.badge {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e7f0ec;
  color: #24483a;
  font-weight: bold;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .88rem;
}

.class1 {
  background: #eef2ff;
  color: #3730a3;
}

.class2 {
  background: #fff7ed;
  color: #9a3412;
}

.ok {
  background: #ecfdf5;
  color: #065f46;
}

.warn {
  background: #fff7ed;
  color: #9a3412;
}

.danger-badge {
  background: #fce7f3;
  color: #9f1239;
}

.status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: bold;
  font-size: .9rem;
  font-family: Arial, Helvetica, sans-serif;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}

/* =========================
   TABLES / ADMIN
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

th,
td {
  border-bottom: 1px solid var(--qishun-border);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

th {
  color: var(--qishun-muted);
  font-size: .92rem;
}

.filters {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr auto;
  gap: 10px;
  align-items: end;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
  color: var(--qishun-muted);
  line-height: 1.6;
}

/* =========================
   FOOTER
========================= */
.qishun-footer {
  width: 100%;
  background: var(--qishun-dark);
  color: #ffffff;
  padding: 36px 20px;
}

.qishun-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.qishun-footer h3 {
  color: var(--qishun-gold-soft);
  font-size: 16px;
}

.qishun-footer p {
  color: #f3eee9;
  font-size: 14px;
  line-height: 1.7;
}

/* =========================
   PRINT
========================= */
@media print {
  .qishun-topbar,
  .qishun-menu,
  .qishun-hero,
  .secure-nav,
  .top-actions,
  form,
  .button,
  .filters,
  .qishun-footer {
    display: none !important;
  }

  .qishun-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .card,
  .soft-card {
    border: 0;
    box-shadow: none;
  }

  body {
    background: #fff;
  }
}

/* =========================
   DASHBOARD
========================= */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: #7a5a00;
}

.stat-card span {
  color: var(--muted);
  font-size: .95rem;
}

.workflow-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
}

.workflow-column {
  background: #f8f6f2;
  border-radius: 16px;
  padding: 14px;
  min-height: 700px;
}

.workflow-column h3 {
  margin-top: 0;
}

.mini-card {
  background: #fff;
  border: 1px solid #e6d3b0;
  border-left: 4px solid #c77d2b;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.risk-card {
  border-left: 5px solid #c2410c;
}

.mini-card h3 {
  margin: 6px 0;
  font-size: 1.1rem;
}

.mini-card p {
  font-size: .94rem;
}

@media (max-width: 1200px) {
  .workflow-board {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .workflow-board,
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* =========================
   TABLET / MOBILE
========================= */
@media (max-width: 900px) {
  .qishun-logo-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .qishun-address,
  .qishun-contact {
    justify-self: center;
    text-align: center;
  }

  .qishun-footer-inner,
  .grid,
  .row,
  .filters,
  .checks,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .qishun-topbar {
    padding: 22px 16px 24px;
  }

  .qishun-logo-img {
    width: 85px;
  }

  .qishun-menu a {
    display: block;
    margin: 8px 0;
    font-size: 13px;
  }

  .qishun-hero {
    padding: 34px 16px;
  }

  .qishun-hero h1 {
    font-size: 28px;
  }

  .qishun-hero p {
    font-size: 16px;
  }

  .qishun-content {
    padding: 0 12px;
    margin: 26px auto 45px;
  }

  .qishun-card-wrap,
  .soft-card,
  .card {
    padding: 18px;
    border-radius: 18px;
  }
}
