:root {
  color-scheme: dark;
  --background: #090a0b;
  --surface: #101112;
  --surface-raised: #151617;
  --border: #26282a;
  --text: #f4f4f4;
  --muted: #b9b9b9;
  --yellow: #f5ad00;
  --red: #ff604f;
  --sidebar-width: 274px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 78% 16%, rgba(52, 43, 24, .14), transparent 36%), var(--background);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.portal-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 36px;
  max-width: 1920px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 27px 30px 30px;
}
.sidebar { display: flex; min-height: calc(100vh - 57px); flex-direction: column; }
.brand { display: flex; min-height: 74px; align-items: center; margin: 0 0 31px 5px; }
.brand img { display: block; width: min(100%, 255px); height: auto; }
.nav-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 15px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #e8e8e8;
  font-size: 15px;
  transition: background .16s ease, color .16s ease;
}
.nav-link:hover { background: #141516; }
.nav-link.active {
  border-color: rgba(245, 173, 0, .12);
  background: linear-gradient(100deg, rgba(245, 173, 0, .15), rgba(245, 173, 0, .05));
  color: var(--yellow);
}
.nav-link img { flex: 0 0 29px; width: 29px; height: 29px; object-fit: contain; }
.support-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: auto;
  padding: 19px 16px;
  border: 1px solid rgba(245, 173, 0, .58);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(245, 173, 0, .04), transparent 75%);
}
.support-card img { width: 31px; height: 31px; object-fit: contain; }
.support-card strong { display: block; margin: 2px 0 6px; font-size: 14px; }
.support-card span { color: var(--muted); font-size: 12px; line-height: 1.5; }

.main-column { min-width: 0; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.welcome strong { display: block; margin-bottom: 4px; font-size: 17px; }
.welcome span { color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.role-badge { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; }
.logout-form { margin: 0; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; }
.text-button span { margin-left: 7px; color: var(--yellow); font-size: 20px; vertical-align: -1px; }
.danger-text { color: #ff8377; font-size: 12px; }
.page-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.alert { margin: 0 0 17px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 8px; }
.alert-success { border-color: rgba(86, 186, 112, .45); background: rgba(46, 117, 62, .13); color: #a8e0b1; }
.alert-error { border-color: rgba(255, 96, 79, .45); background: rgba(130, 42, 33, .16); color: #ffb1a8; }
.alert-info { color: var(--muted); }

.hero-card {
  position: relative;
  display: flex;
  min-height: 360px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #303234;
  border-radius: 12px;
  background: #101112;
  isolation: isolate;
}
.hero-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #0c0d0e 0%, rgba(12, 13, 14, .98) 28%, rgba(12, 13, 14, .85) 44%, rgba(12, 13, 14, .08) 76%);
  content: "";
}
.hero-card > img { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 68%; height: 100%; object-fit: cover; object-position: center 43%; }
.hero-copy { width: min(55%, 590px); padding: 35px 32px; }
.hero-copy h2 { max-width: 500px; margin: 0; font-size: clamp(29px, 3vw, 42px); line-height: 1.2; letter-spacing: -.025em; }
.hero-copy h2 span, .login-panel h1 span { color: var(--yellow); }
.accent-line { width: 48px; height: 3px; margin: 19px 0 17px; background: var(--yellow); }
.hero-copy p { max-width: 450px; margin: 0; color: #dedede; font-size: 15px; line-height: 1.8; }
.hero-copy em { display: block; margin-top: 19px; color: var(--yellow); font-size: 16px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.shortcut-card {
  display: flex;
  min-height: 232px;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, #111213, #0d0e0f);
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.shortcut-card:hover { transform: translateY(-2px); border-color: rgba(245, 173, 0, .52); }
.shortcut-card > img { width: 46px; height: 46px; margin-bottom: 11px; object-fit: contain; }
.shortcut-card h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.shortcut-card p { max-width: 230px; margin: 10px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.shortcut-card > span { margin-top: auto; color: var(--yellow); font: 27px/1 Arial, sans-serif; }
.mission-card { display: flex; min-height: 105px; align-items: center; gap: 22px; margin-top: 14px; padding: 18px 23px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(100deg, #111213, #0e0f10); }
.mission-card > img { flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; }
.mission-card h2 { margin: 0 0 5px; color: var(--yellow); font-size: 17px; }
.mission-card p { max-width: 800px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.content-section { margin-top: 22px; }
.content-section > h2, .form-panel > h2 { margin: 0 0 15px; font-size: 20px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; font-size: 20px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.announcement-list { display: grid; gap: 12px; }
.announcement-card, .guide-card, .situation-card, .admin-order {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(140deg, #121314, #0e0f10);
}
.announcement-meta { margin-bottom: 8px; color: var(--yellow); font-size: 11px; }
.announcement-card h3 { margin: 0 0 9px; font-size: 17px; }
.announcement-card p { margin: 0; color: #d1d1d1; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.announcement-card .inline-form { margin-top: 12px; }
.empty-state { padding: 25px; border: 1px dashed #3b3d3f; border-radius: 10px; color: var(--muted); text-align: center; line-height: 1.7; }
.empty-state h2 { margin: 0 0 7px; color: var(--text); font-size: 18px; }
.empty-state p { margin: 0 0 15px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 12px; padding: 10px 17px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; transition: filter .15s, background .15s, color .15s; }
.button:hover { filter: brightness(1.08); }
.button-primary { background: var(--yellow); color: #101010; }
.button-outline { border-color: rgba(245, 173, 0, .65); background: transparent; color: var(--yellow); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.form-panel { padding: 21px; border: 1px solid var(--border); border-radius: 10px; background: #111213; }
.form-stack { display: grid; gap: 10px; }
.form-stack label, .field-label { margin-top: 6px; color: #e8e8e8; font-size: 13px; font-weight: 500; }
input, textarea, select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #343638;
  border-radius: 6px;
  background: #151617;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
.form-stack .button { justify-self: start; margin-top: 10px; }
.inline-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.inline-form select { min-width: 132px; width: auto; min-height: 35px; padding: 6px 8px; font-size: 12px; }
.product-form { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); align-items: end; gap: 12px; }
.product-form label, .product-row label { display: grid; gap: 7px; color: #dedede; font-size: 12px; }
.product-form .button { grid-column: 1 / -1; justify-self: start; }
.product-list { display: grid; gap: 9px; }
.product-row { display: grid; grid-template-columns: minmax(170px, 1.5fr) minmax(100px, .6fr) minmax(110px, .6fr) minmax(180px, 1fr); align-items: end; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #111213; }
.product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.product-actions .status { margin-right: auto; }
.account-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-form .button { grid-column: 1 / -1; }

.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; }
.data-table { width: 100%; border-collapse: collapse; background: #111213; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { color: #e7e7e7; background: #171819; font-size: 11px; font-weight: 600; white-space: nowrap; }
.data-table td { color: #d2d2d2; }
.data-table tr:last-child td { border-bottom: 0; }
.quantity-input { width: 112px; min-height: 36px; padding: 5px 8px; }
.order-table td:not(:first-child), .order-table th:not(:first-child) { white-space: nowrap; }
.order-table td:nth-child(3), .order-table th:nth-child(3) { text-align: center; }
.order-table + label { display: block; margin: 17px 0 8px; }
.order-table ~ .button { margin-top: 14px; }
.status { display: inline-block; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 10px; white-space: nowrap; }
.status-pending { border-color: rgba(245, 173, 0, .5); color: #ffd475; }
.status-processing { border-color: rgba(72, 159, 218, .5); color: #8ccfff; }
.status-completed { border-color: rgba(86, 186, 112, .45); color: #a8e0b1; }
.status-cancelled { border-color: rgba(255, 96, 79, .45); color: #ffaaa0; }
.order-list { display: grid; gap: 12px; }
.admin-order { padding: 17px; }
.order-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.order-heading h3 { margin: 0 0 5px; font-size: 16px; }
.order-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.order-items { display: grid; gap: 5px; margin: 16px 0 0; padding: 0; list-style: none; }
.order-items li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--border); color: #d9d9d9; font-size: 12px; }
.order-items strong { color: var(--yellow); }
.order-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.6; }

.compact-hero { min-height: 300px; }
.compact-hero .hero-copy { width: min(62%, 650px); }
.compact-hero > img { width: 58%; }
.notice-box { display: flex; align-items: center; gap: 12px; max-width: 560px; margin-top: 18px; padding: 12px; border: 1px solid rgba(245, 173, 0, .25); border-radius: 8px; background: rgba(245, 173, 0, .06); }
.notice-box img { flex: 0 0 30px; width: 30px; height: 30px; object-fit: contain; }
.notice-box p { font-size: 12px; line-height: 1.6; }
.notice-box strong { margin-right: 4px; color: var(--yellow); }
.guide-hero { min-height: 360px; }
.guide-points { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.guide-points a { display: grid; justify-items: center; gap: 7px; color: #ececec; font-size: 11px; text-align: center; }
.guide-points a:hover { color: var(--yellow); }
.guide-points img { width: 38px; height: 38px; object-fit: contain; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.guide-card { position: relative; min-height: 210px; transition: border-color .15s, transform .15s; }
.guide-card:hover { transform: translateY(-2px); border-color: rgba(245, 173, 0, .52); }
.guide-card > img { width: 43px; height: 43px; margin-bottom: 9px; object-fit: contain; }
.guide-card h2 { margin: 0 0 8px; font-size: 16px; }
.guide-card p, .situation-card li { color: var(--muted); font-size: 12px; line-height: 1.7; }
.guide-card p { margin: 0; }
.guide-card > span { position: absolute; right: 18px; bottom: 13px; color: var(--yellow); font: 25px/1 Arial, sans-serif; }
.guide-back-link { margin-top: 20px; }
.guide-detail-section { padding: 21px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(140deg, #121314, #0e0f10); }
.guide-detail-section > h2 { margin: 0 0 14px; font-size: 20px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.guide-step { display: flex; gap: 15px; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(140deg, #121314, #0e0f10); }
.guide-step > span { color: var(--yellow); font-size: 22px; font-weight: 600; }
.guide-step h3 { margin: 2px 0 6px; font-size: 14px; }
.guide-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.guide-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.guide-section-heading h2 { margin: 0 0 5px; font-size: 20px; }
.guide-section-heading p { margin: 0; }
.guide-tip-count { padding: 7px 11px; border: 1px solid rgba(245, 173, 0, .35); border-radius: 999px; color: var(--yellow); font-size: 11px; white-space: nowrap; }
.guide-tip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-tip-card { min-width: 0; padding: 16px; border: 1px solid rgba(245, 173, 0, .2); border-radius: 9px; background: linear-gradient(145deg, #121314, #0d0e0f); }
.guide-tip-heading { display: flex; min-height: 50px; align-items: center; gap: 11px; margin-bottom: 11px; }
.guide-tip-heading img { flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; }
.guide-tip-heading h3 { margin: 0; color: var(--yellow); font-size: 13px; line-height: 1.5; }
.guide-tip-card > p { display: flex; align-items: flex-start; gap: 8px; margin: 9px 0 0; color: #d3d3d3; font-size: 11px; line-height: 1.65; }
.guide-tip-card > p span { flex: 0 0 16px; font-size: 16px; font-weight: 700; line-height: 1.1; }
.guide-tip-good > span { color: #74c64b; }
.guide-tip-avoid > span { color: var(--red); }
.guide-reminder { margin-top: 14px; }
.guide-mistakes { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.guide-mistakes h2 { margin: 0 0 10px; font-size: 17px; }
.guide-mistakes ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 24px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.situation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.situation-card h3 { margin: 0 0 7px; color: var(--yellow); font-size: 14px; }
.situation-card ul { margin: 0; padding-left: 18px; }

.login-body, .setup-body { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-layout { display: grid; width: min(100%, 1440px); min-height: min(90vh, 900px); grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #303234; border-radius: 14px; background: #0d0e0f; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 76px); }
.login-brand { display: block; width: min(100%, 300px); margin-bottom: 54px; }
.login-brand img { display: block; width: 100%; height: auto; }
.login-panel h1 { margin: 0; font-size: clamp(30px, 4vw, 47px); line-height: 1.2; }
.login-intro { max-width: 470px; margin: 8px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-panel .form-stack { max-width: 520px; }
.login-panel .form-stack label { margin-top: 7px; }
.login-panel .form-stack .button { width: 100%; min-height: 52px; justify-content: space-between; margin-top: 14px; padding-inline: 18px; font-size: 14px; }
.login-security { display: flex; align-items: center; gap: 14px; max-width: 520px; margin-top: 35px; padding-top: 20px; border-top: 1px solid var(--border); }
.login-security img { flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; }
.login-security p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.dev-login-link { display: inline-block; margin-top: 8px; color: var(--yellow); font-size: 11px; }
.dev-login-link:hover, .back-link:hover { text-decoration: underline; }
.dev-badge { align-self: flex-start; margin: 0 0 11px; color: var(--yellow); font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.dev-warning { margin: 20px 0 0; padding: 11px 12px; border: 1px solid rgba(245, 173, 0, .35); border-radius: 7px; color: #e7c576; font-size: 11px; line-height: 1.6; }
.back-link { align-self: flex-start; margin-top: 18px; color: var(--muted); font-size: 12px; }
.login-image { min-height: 560px; background: linear-gradient(0deg, rgba(7, 8, 9, .08), rgba(7, 8, 9, .08)), url("/media/services/6.jpg") center / cover no-repeat; }
.setup-panel { width: min(100%, 560px); padding: clamp(24px, 5vw, 48px); border: 1px solid var(--border); border-radius: 12px; background: #111213; }
.setup-panel .login-brand { width: min(100%, 250px); margin-bottom: 28px; }
.setup-panel h1 { margin: 0 0 8px; font-size: 25px; }
.setup-panel > p { margin: 0 0 20px; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 235px; }
  .portal-shell { gap: 23px; padding-inline: 20px; }
  .shortcut-grid, .guide-grid, .guide-tip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-steps { grid-template-columns: 1fr; }
  .shortcut-card { min-height: 205px; }
  .guide-card { min-height: 190px; }
}
@media (max-width: 760px) {
  .portal-shell { display: block; padding: 16px 15px 24px; }
  .sidebar { min-height: 0; }
  .brand { min-height: 50px; margin: 0 0 13px; }
  .brand img { width: 210px; }
  .nav-list { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 7px; }
  .nav-list li { flex: 0 0 auto; }
  .nav-link { min-height: 43px; gap: 7px; padding: 7px 10px; font-size: 11px; white-space: nowrap; }
  .nav-link img { flex-basis: 22px; width: 22px; height: 22px; }
  .support-card { display: none; }
  .topbar { min-height: 54px; margin-bottom: 14px; }
  .welcome strong { font-size: 14px; }
  .welcome span { font-size: 11px; }
  .top-actions { gap: 9px; }
  .role-badge { padding: 5px 7px; font-size: 9px; }
  .text-button { font-size: 12px; }
  .page-heading { position: static; width: auto; height: auto; overflow: visible; clip-path: none; margin: 8px 0 14px; white-space: normal; }
  .page-heading h1 { margin: 0; font-size: 24px; }
  .hero-card { min-height: 400px; align-items: flex-end; }
  .hero-card > img { width: 100%; object-position: 64% center; }
  .hero-card::before { background: linear-gradient(0deg, rgba(8, 9, 10, .98), rgba(8, 9, 10, .85) 44%, rgba(8, 9, 10, .08)); }
  .hero-copy, .compact-hero .hero-copy { width: 100%; padding: 26px 20px; }
  .hero-copy h2 { font-size: clamp(28px, 8vw, 38px); }
  .hero-copy p { font-size: 13px; line-height: 1.7; }
  .shortcut-grid { gap: 9px; margin-top: 12px; }
  .shortcut-card { min-height: 195px; padding: 16px 10px 13px; }
  .shortcut-card > img { width: 38px; height: 38px; }
  .shortcut-card h2 { font-size: 13px; }
  .shortcut-card p { font-size: 10px; }
  .mission-card { gap: 13px; padding: 15px; }
  .mission-card > img { flex-basis: 36px; width: 36px; height: 36px; }
  .mission-card h2 { font-size: 14px; }
  .mission-card p { font-size: 11px; }
  .content-section { margin-top: 17px; }
  .content-section > h2, .section-title-row h2 { font-size: 17px; }
  .form-panel { padding: 15px; }
  .product-form { grid-template-columns: 1fr 1fr; }
  .product-form label:first-of-type { grid-column: 1 / -1; }
  .product-row { grid-template-columns: 1fr 1fr; }
  .product-row label:first-of-type { grid-column: 1 / -1; }
  .product-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .login-layout { grid-template-columns: 1fr; min-height: auto; }
  .login-panel { padding: 30px 24px; }
  .login-brand { width: 235px; margin-bottom: 35px; }
  .login-image { min-height: 280px; }
}
@media (max-width: 460px) {
  .top-actions { gap: 6px; }
  .role-badge { display: none; }
  .shortcut-grid, .guide-grid, .guide-steps, .situation-grid { grid-template-columns: 1fr; }
  .guide-mistakes ul { grid-template-columns: 1fr; }
  .shortcut-card { min-height: 170px; }
  .guide-card { min-height: 0; }
  .product-form, .account-form { grid-template-columns: 1fr; }
  .product-form label:first-of-type, .account-form .button { grid-column: auto; }
  .product-row { grid-template-columns: 1fr; }
  .product-row label:first-of-type { grid-column: auto; }
  .product-actions { flex-wrap: wrap; }
  .order-heading { align-items: flex-start; flex-direction: column; }
  .inline-form { flex-wrap: wrap; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .guide-section-heading { align-items: flex-start; flex-direction: column; }
}
