/* ==========================================================================
   warungserver — site styles
   Brand: #002C33 · Font: Nunito
   ========================================================================== */

:root {
  --brand: #002C33;
  --brand-800: #013842;
  --brand-700: #0A4652;
  --brand-900: #001A1F;
  --brand-50: #E8F1F2;
  --accent: #D4AF37;        /* metallic gold: buttons, highlights on dark */
  --accent-light: #E9CF6B;  /* hover highlight */
  --accent-deep: #B8942A;   /* borders, logo wordmark on white */
  --accent-600: #8A6A1C;    /* antique gold for text on white (AA contrast) */
  --accent-50: #FBF5E1;
  --accent-100: #F3E4B5;
  --amber: #D4AF37;
  --ink: #0B2A30;
  --muted: #5B6F73;
  --line: #DCE6E7;
  --bg: #F5F8F8;
  --surface: #FFFFFF;
  --gold-wash: linear-gradient(135deg, #FBF7E8 0%, #FEFCF6 45%, #FFFFFF 100%); /* very light gold → white page background */
  --danger: #C7453A;
  --danger-50: #FBECEA;
  --success: #1E8E5A;
  --success-50: #E6F5EC;
  --info-50: #E7F0F7;
  --warn-50: #FFF4DB;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 44, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 44, 51, 0.16);
  --container: 1180px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: #FFFFFF var(--gold-wash) no-repeat fixed; /* fixed so the wash covers the viewport on long pages */
}
img, svg { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--brand); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select, [contenteditable] { caret-color: var(--brand); }
::selection { background: var(--brand); color: #fff; }
::-moz-selection { background: var(--brand); color: #fff; }
/* On dark surfaces a brand-coloured highlight would vanish, so selection turns gold there */
.section-brand ::selection, .site-footer ::selection, .hero-slider ::selection, .portal-sidebar ::selection, .auth-side ::selection, .intro ::selection, .card-dark ::selection, .about-figure ::selection, .contact-card ::selection, .cta-band ::selection { background: var(--accent); color: var(--brand-900); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.icon { flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; line-height: 1.1; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-800); color: #fff; box-shadow: 0 8px 20px rgba(0, 44, 51, .25); }
.btn-accent { background: linear-gradient(135deg, #E6C85C 0%, #D4AF37 55%, #C09A2C 100%); color: var(--brand-900); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 14px rgba(212,175,55,.25); }
.btn-accent:hover { background: linear-gradient(135deg, #F0D877 0%, #DDB942 55%, #C9A431 100%); color: var(--brand-900); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px rgba(212,175,55,.4); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-light { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-light:hover { background: #fff; color: var(--brand); }
.btn-sm { padding: .6rem 1.1rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--brand-50); color: var(--brand); }
.btn-ghost:hover { background: #d6e4e6; color: var(--brand); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- Flash messages ---------- */
.flash-stack { margin-top: 1rem; display: grid; gap: .5rem; }
.flash {
  position: relative; padding: .85rem 2.75rem .85rem 1.1rem; border-radius: var(--radius-sm); font-weight: 600;
  border: 1px solid transparent;
}
.flash-success { background: var(--success-50); color: #16603d; border-color: #b9e3c9; }
.flash-error { background: var(--danger-50); color: #8f2f27; border-color: #efc5c0; }
.flash-info { background: var(--info-50); color: var(--brand); border-color: #c4d8e8; }
.flash-close { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: inherit; opacity: .6; padding: .2rem .5rem; }
.flash-close:hover { opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: rgba(212, 175, 55, .04); }
.section-brand { background: var(--brand); color: #fff; }
.section-brand h2, .section-brand h3 { color: #fff; }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600); margin-bottom: .6rem; }
.section-brand .kicker { color: var(--accent); }
.lead { font-size: 1.12rem; color: var(--muted); }
.section-brand .lead { color: rgba(255,255,255,.78); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(212,175,55,.28), transparent 60%),
              radial-gradient(800px 500px at -10% 110%, rgba(212,175,55,.22), transparent 60%),
              linear-gradient(160deg, var(--brand-900), var(--brand) 55%, var(--brand-800));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 90%);
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }


.stats-strip { position: relative; background: #fff; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.75rem 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-size: 2.4rem; font-weight: 900; color: var(--brand); line-height: 1; }
.stat span { color: var(--muted); font-weight: 600; font-size: .95rem; }
.stat-card { text-align: center; }
.stat-number { display: block; font-size: 2.4rem; font-weight: 900; color: var(--brand); line-height: 1; }
.panel-title { font-size: 1.1rem; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
  transition: transform .2s, box-shadow .2s, border-color .2s; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfdde0; }
.card .icon-wrap {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--brand-50); color: var(--brand);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-weight: 800; color: var(--brand); }
.card .card-link:hover { color: var(--accent-600); }
.card-link .icon { transition: transform .2s; }
.card-link:hover .icon { transform: translateX(3px); }
a.card { color: inherit; display: block; }

.card-number { position: absolute; top: 1.25rem; right: 1.5rem; font-size: 2rem; font-weight: 900; color: var(--brand-50); line-height: 1; }

/* ---------- About / timeline ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-figure { background: linear-gradient(160deg, var(--brand), var(--brand-700)); border-radius: 24px; padding: 2rem; color: #fff; }
.about-figure blockquote { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
.about-figure cite { display: block; margin-top: 1rem; font-style: normal; color: var(--accent); font-weight: 700; }
.check-list { display: grid; gap: .65rem; margin-top: 1.25rem; }
.check-list li { display: flex; align-items: flex-start; gap: .6rem; font-weight: 600; }
.check-list .icon { color: var(--accent-600); margin-top: .2rem; }
.section-brand .check-list .icon, .auth-side .check-list .icon { color: var(--accent); }

.timeline { position: relative; display: grid; gap: 1.5rem; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -2rem; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-50); }
.timeline .year { font-weight: 900; color: var(--accent-600); font-size: .9rem; letter-spacing: .08em; }
.timeline h3 { margin: .15rem 0 .25rem; }
.timeline p { color: var(--muted); margin: 0; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }
.value { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 1.5rem; }
.value .icon { color: var(--accent); margin-bottom: .75rem; }
.value p { color: rgba(255,255,255,.75); margin: 0; }

/* ---------- Solutions ---------- */
.solution-group { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 1rem); }
.solution-group:first-of-type { border-top: 0; }
.solution-head { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: start; margin-bottom: 2rem; }
@media (max-width: 800px) { .solution-head { grid-template-columns: 1fr; } }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tabs a, .tabs button { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--brand); cursor: pointer; }
.tabs a:hover, .tabs button:hover { border-color: var(--brand); }
.tabs .is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Products ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: clamp(3rem, 6vw, 5rem) 0; scroll-margin-top: calc(var(--header-h) + 1rem); }
.product + .product { border-top: 1px solid var(--line); }
.product:nth-child(even) .product-visual { order: -1; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } .product:nth-child(even) .product-visual { order: 0; } }
.product-visual { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: 2.5rem; display: grid; place-items: center; min-height: 280px; }
.product-visual img { max-height: 120px; width: auto; }
.feature-list { display: grid; gap: .9rem; margin-top: 1.25rem; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.feature-list .icon-wrap { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; }
.feature-list strong { display: block; color: var(--brand); }
.feature-list span { color: var(--muted); font-size: .95rem; }

/* ---------- Logos ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
@media (max-width: 1000px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
.logo-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; display: grid; place-items: center; min-height: 92px; transition: box-shadow .2s, transform .2s; }
.logo-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.logo-tile img { max-height: 56px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.logo-tile:hover img { filter: none; opacity: 1; }
.logo-grid.partners { grid-template-columns: repeat(3, 1fr); max-width: 760px; margin-inline: auto; }
.logo-grid.partners .logo-tile { min-height: 120px; }
.logo-grid.partners img { max-height: 70px; filter: none; opacity: 1; }

/* ---------- Portfolio ---------- */
.project-card { display: flex; flex-direction: column; }
.project-card .tag { align-self: flex-start; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; background: var(--accent-50); color: var(--accent-600); margin-bottom: 1rem; }
.project-card .tag[data-cat="Hardware"] { background: var(--brand-50); color: var(--brand); }
.project-card .tag[data-cat="Integrated"] { background: var(--info-50); color: var(--brand-700); }
.project-card .client { margin-top: auto; padding-top: 1rem; font-size: .9rem; color: var(--muted); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; border-radius: 24px; padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.78); }
.cta-band .actions { display: flex; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: .92rem; color: var(--brand); }
.field .hint { font-size: .85rem; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212,175,55,.22); }
.field textarea { min-height: 150px; resize: vertical; }
.field-password { position: relative; }
.field-password input { padding-right: 4.5rem; }
.field-password button { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; font-weight: 800; color: var(--accent-600); cursor: pointer; font-size: .85rem; padding: .25rem .5rem; }
.honeypot { position: absolute; left: -9999px; }

.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--brand); color: #fff; border-radius: 24px; padding: 2rem; }
.contact-card h3 { color: #fff; }
.contact-card ul { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.contact-card li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; }
.contact-card .icon { color: var(--accent); margin-top: .15rem; }
.contact-card a { color: #fff; font-weight: 700; }
.contact-card a:hover { color: var(--accent); }
.contact-card small { display: block; color: rgba(255,255,255,.6); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.map-note { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.75); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255,255,255,.8); padding-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin-top: 1.25rem; font-size: .95rem; }
.site-footer h4 { color: #fff; margin-bottom: 1rem; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: .55rem; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact .icon { color: var(--accent); margin-top: .2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }

/* ---------- Reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 6rem 0; }
.error-page .code { font-size: 6rem; font-weight: 900; color: var(--brand-50); line-height: 1; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.page-auth { background: #FFFFFF var(--gold-wash) no-repeat fixed; }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side {
  background: radial-gradient(900px 500px at 90% -10%, rgba(212,175,55,.28), transparent 60%), linear-gradient(160deg, var(--brand-900), var(--brand) 60%, var(--brand-800));
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side-copy { max-width: 480px; }
.auth-side h1 { color: #fff; font-size: 2.2rem; margin-bottom: 1rem; }
.auth-side p { color: rgba(255,255,255,.78); }
.auth-side-foot { font-size: .85rem; color: rgba(255,255,255,.5); margin: 0; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3rem 1.25rem; gap: 1rem; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2.25rem; box-shadow: var(--shadow); }
.auth-card .brand { display: none; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .auth-card .brand { display: block; } }
.auth-card h2 { margin-bottom: .25rem; }
.auth-card .lead { font-size: 1rem; margin-bottom: 1.5rem; }
.auth-card form { display: grid; gap: 1.1rem; }
.auth-foot { margin-top: 1.5rem; font-size: .92rem; color: var(--muted); text-align: center; }
.auth-main .flash { width: 100%; max-width: 440px; margin: 0; }
.demo-note { margin-top: 1.25rem; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--info-50); font-size: .9rem; color: var(--brand); }

/* ==========================================================================
   Client portal
   ========================================================================== */
.page-portal { background: #FFFFFF var(--gold-wash) no-repeat fixed; }
.portal { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.portal-sidebar { background: var(--brand); color: #fff; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 0; height: 100vh; }
.portal-sidebar .brand { padding: 0 .5rem; }
.portal-sidebar nav ul { display: grid; gap: .25rem; }
.portal-sidebar nav a, .portal-sidebar-foot a, .portal-sidebar-foot button {
  display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 10px; color: rgba(255,255,255,.78); font-weight: 700; width: 100%;
}
.portal-sidebar nav a:hover, .portal-sidebar-foot a:hover, .portal-sidebar-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.portal-sidebar nav a[aria-current="page"] { background: var(--accent); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
.portal-sidebar-foot { margin-top: auto; display: grid; gap: .25rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; }
.portal-body { display: flex; flex-direction: column; min-width: 0; }
.portal-topbar { display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.portal-topbar .nav-toggle { display: none; }
.portal-title { font-size: 1.35rem; margin: 0; flex: 1; }
.portal-user { display: flex; align-items: center; gap: .75rem; }
.portal-user-text { display: grid; line-height: 1.2; }
.portal-user-text small { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--brand-900); display: grid; place-items: center; font-weight: 900; }
.portal-content { padding: 2rem; display: grid; gap: 1.5rem; align-content: start; }
.portal-body .flash { margin: 1rem 2rem 0; }
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .portal-sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .portal-sidebar.is-open { transform: none; }
  .portal-topbar .nav-toggle { display: inline-flex; }
  .portal-topbar { padding: .75rem 1rem; }
  .portal-content { padding: 1rem; }
  .portal-body .flash { margin: 1rem 1rem 0; }
  .portal-user-text { display: none; }
}

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; min-width: 0; }
.portal-content > *, .two-col > *, .summary > * { min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.15rem; margin: 0; }
.panel-head a { font-weight: 800; font-size: .92rem; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }

.summary-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.summary-card .icon-wrap { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.summary-card strong { display: block; font-size: 1.5rem; font-weight: 900; color: var(--brand); line-height: 1.1; overflow-wrap: anywhere; }
.summary-card span { color: var(--muted); font-size: .92rem; font-weight: 600; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .8rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table a { font-weight: 700; }

.badge { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-info { background: var(--info-50); color: var(--brand-700); }
.badge-warn { background: var(--warn-50); color: #8a5a00; }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-muted { background: #EEF2F2; color: var(--muted); }

.progress { height: 8px; background: #E6EEEF; border-radius: 6px; overflow: hidden; min-width: 100px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.progress-label { font-size: .8rem; color: var(--muted); font-weight: 700; margin-top: .25rem; display: block; }

.project-list { display: grid; gap: 1rem; }
.project-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; }
@media (max-width: 700px) { .project-item { grid-template-columns: 1fr; } }
.project-item h3 { margin-bottom: .25rem; }
.project-item .meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .88rem; color: var(--muted); font-weight: 600; margin: .5rem 0; }
.project-item p { color: var(--muted); margin: 0; }
.project-item .progress-col { min-width: 180px; }

.thread { display: grid; gap: 1rem; }
.msg { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.msg .avatar { width: 36px; height: 36px; font-size: .9rem; }
.msg.from-support .avatar { background: var(--brand); color: #fff; }
.msg-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.15rem; }
.msg.from-support .msg-body { background: var(--brand-50); border-color: #cfe0e2; }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.msg-head strong { color: var(--brand); }
.msg-body p { margin: 0; white-space: pre-line; }

.ticket-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .9rem; color: var(--muted); font-weight: 600; align-items: center; }
.inline-form { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .icon { color: var(--line); margin-bottom: .5rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 1200px) { .two-col { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; margin: 0; font-size: .95rem; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; font-weight: 600; }
