@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a0a;
  --panel: #151515;
  --panel2: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --muted: #9a9a9a;
  --accent: #00a86b;
  --danger: #ff4d4f;
  --border: rgba(255, 255, 255, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: #9adbc3; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px;
}

/* Fullscreen portal pages (logged-in) */
.wrap.fullscreen {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap.minimal {
  max-width: 520px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

@media (max-width: 520px) {
  .wrap.minimal {
    max-width: 100%;
    padding: 14px;
  }

  .authCard {
    max-width: none;
    width: 100%;
    padding: 24px;
  }
}

.shell {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
  background: var(--panel);
}

.shell.fullscreen {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  flex: 1;
}

.shell.minimal {
  overflow: visible;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.authHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.authTitle { font-weight: 900; font-size: 14px; line-height: 1.1; }
.authSub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.authBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.authBrand .brand-logo { height: 38px; }

.authBrandText { text-align: left; }

.authCard {
  max-width: 480px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 16px;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
}

.authLogo {
  height: 45px;
  display: block;
  margin: 0 auto 14px;
}

.device-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.35));
}

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

.authTitleBlock h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.authTitleBlock p {
  color: #888;
  font-size: 0.95rem;
  margin: 10px 0 0;
  line-height: 1.4;
}

.inputWrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.inputWrap input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 14px 0;
}

.inputWrap:focus-within {
  border-color: var(--border);
  box-shadow: none;
}

.inputIcon {
  color: #8b8b8b;
  display: inline-flex;
  align-items: center;
}

.inputIcon svg { width: 18px; height: 18px; }

.btn-auth {
  width: 100%;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-auth:hover:not(:disabled) {
  transform: translateY(-2px);
}

.authLinks {
  margin-top: 12px;
  text-align: left;
}

.authLinks a { font-size: 12px; }

.btnIcon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
}

/* Fullscreen pages: slightly tighter chrome */
.wrap.fullscreen .topbar {
  padding: 12px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo { height: 34px; width: auto; display: block; }

.brand-title { line-height: 1.1; }
.brand-title .h { font-weight: 800; font-size: 14px; margin: 0; }
.brand-title .p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.navToggle {
  display: none;
  width: 44px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 10px;
}

.navToggle span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
}

.navToggle span + span { margin-top: 6px; }

.portalMenu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  z-index: 1000;
}

.portalMenu.open { display: flex; }

.portalMenuPanel {
  width: min(420px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #151515;
  box-shadow: 0 16px 60px rgba(0,0,0,0.45);
}

.portalMenuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.portalMenuTitle { font-weight: 900; font-size: 14px; }

.portalMenuClose {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.portalMenuLinks {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.portalMenuLinks a {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 12px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--text);
}

.portalMenuLinks a.active {
  border-color: rgba(0, 168, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15);
}

.portalMenuFooter {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 860px) {
  .nav { display: none; }
  .navToggle { display: inline-block; }
}

.nav a {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text);
}

.nav a.active {
  border-color: rgba(0, 168, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.15);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.btn-primary { background: #fff; color: #0a0a0a; }
.btn-danger { background: rgba(255,77,79,0.18); border: 1px solid rgba(255,77,79,0.35); }

.main { padding: 16px; }

/* Fullscreen pages: reduce whitespace on all sides */
.wrap.fullscreen .main { padding: 12px; }
@media (max-width: 520px) { .wrap.fullscreen .main { padding: 10px; } }

.panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
}

.grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

input, .inputWrap input {
  caret-color: var(--text);
}

/* Keep auth fields dark on browser autofill (prevents light/white blocks) */
.inputWrap input:-webkit-autofill,
.inputWrap input:-webkit-autofill:hover,
.inputWrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(21, 21, 21, 1) inset !important;
  box-shadow: 0 0 0px 1000px rgba(21, 21, 21, 1) inset !important;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

.inputWrap input:autofill {
  color: var(--text);
  box-shadow: 0 0 0px 1000px rgba(21, 21, 21, 1) inset;
}

input:focus { border-color: rgba(0,168,107,0.75); box-shadow: 0 0 0 3px rgba(0,168,107,0.15); }

/* Auth pages: no green focus glow */
.authCard input:focus {
  border-color: var(--border);
  box-shadow: none;
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.msg { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 18px; }
.msg.error { color: #ffd2d2; }

.muted { color: var(--muted); font-size: 13px; }

/* Billing: invoices */

.billing-page { display: flex; flex-direction: column; gap: 20px; }

.billing-header { padding: 8px 0; }
.billing-title { font-size: 28px; font-weight: 800; }
.billing-subtitle { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.5; }

.billing-cards { display: grid; gap: 14px; }

.billing-card {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.billing-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0,168,107,0.10);
  border: 1px solid rgba(0,168,107,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.billing-card-body { flex: 1; min-width: 200px; }
.billing-card-title { font-weight: 800; font-size: 16px; }
.billing-card-desc { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.55; }
.billing-card-desc strong { color: #d0d0d0; }

.billing-card-status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #d0d0d0;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: inline-block;
}

.billing-card-actions {
  display: flex;
  align-items: center;
  padding-top: 4px;
}

.billing-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.billing-section-title { font-weight: 800; font-size: 18px; }
.billing-section-desc { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.billing-section-count {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}

.invoiceList { display: grid; gap: 10px; }

.invoiceRow {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.invoiceMeta { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.invoiceTop { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.invoiceNo { font-weight: 800; font-size: 13px; }
.invoiceDate { color: var(--muted); font-size: 12px; }
.invoiceSub { color: var(--muted); font-size: 12px; }

.invoiceBadges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #eaeaea;
}
.badge.paid { border-color: rgba(0,168,107,0.35); background: rgba(0,168,107,0.12); }
.badge.unpaid { border-color: rgba(255,77,79,0.35); background: rgba(255,77,79,0.12); }

.invoiceAmount { font-weight: 900; font-size: 13px; }

.invoiceActions { display: flex; gap: 8px; flex-wrap: wrap; }

a.btn.btn-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Home page */
.hero {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  min-height: calc(100vh - 150px);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,168,107,0.06) 0%, transparent 50%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 14px;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
}

@media (max-width: 980px) {
  .hero-left { padding: 24px 16px; }
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
}

.hero-right::before {
  content: '';
  position: absolute;
  inset: 20%;
  background: radial-gradient(circle, rgba(0,168,107,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

@media (max-width: 980px) {
  .hero-right { padding: 16px; }
  .hero-right::before { display: none; }
}

.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  margin-top: 8px;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle {
  color: var(--muted);
  font-size: clamp(14px, 1.3vw, 18px);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 480px;
}

@media (max-width: 980px) {
  .title { font-size: 28px; -webkit-text-fill-color: var(--text); background: none; }
  .subtitle { font-size: 14px; }
}

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: #d0d0d0;
  backdrop-filter: blur(4px);
}
.pill strong { color: #fff; }

.device-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #101010;
  display: flex;
  flex-direction: column;
}

.device-card .device-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 14px 14px 8px;
  background: transparent;
}

.deviceStandalone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.deviceStandalone .device-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

@media (min-width: 981px) {
  .deviceStandalone .device-img { max-width: 380px; }
}

.deviceStatus {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,168,107,0.25);
  background: rgba(0,168,107,0.08);
  transition: transform 180ms ease, opacity 180ms ease;
}

.deviceStatus.swap {
  transform: translateY(-2px) scale(0.98);
  opacity: 0.75;
}
.device-frame { aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); padding: 10px; }
.device-footer { display: flex; align-items: center; justify-content: center; padding: 12px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(0,168,107,0.18); }

.stats .bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); overflow: hidden; margin-top: 8px; }
.stats .bar-fill { height: 100%; background: linear-gradient(135deg, #00a86b, #00d084); }
.stat { border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04); border-radius: 14px; padding: 12px; }
.stat-k { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-v { font-size: 22px; font-weight: 800; margin-top: 6px; }
.statRow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.stat.mini .stat-v { font-size: 16px; }

.actions { display: grid; gap: 10px; }
.action {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
}
.action:hover { border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); }
.action-title { font-weight: 800; font-size: 13px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.badge-ok {
  border-color: rgba(0,168,107,0.45);
  background: rgba(0,168,107,0.14);
  color: #bff3df;
}
.badge-warn {
  border-color: rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.12);
  color: #ffe6b7;
}

.fileRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
}

/* Documents page */
.docs-page { display: flex; flex-direction: column; gap: 20px; }

.docs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.docs-title { font-size: 28px; font-weight: 800; }
.docs-subtitle { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.5; max-width: 520px; }

.docs-progress {
  min-width: 160px;
  text-align: right;
}

.docs-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.docs-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.docs-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #00a86b, #00d084);
  transition: width 0.4s ease;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.doc-card {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc-card-done {
  border-color: rgba(0,168,107,0.20);
  background: linear-gradient(135deg, rgba(0,168,107,0.04) 0%, rgba(255,255,255,0.02) 100%);
}

.doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0,168,107,0.10);
  border: 1px solid rgba(0,168,107,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.doc-card-info { flex: 1; min-width: 0; }
.doc-card-title { font-weight: 800; font-size: 15px; }
.doc-card-hint { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }

.doc-upload-zone {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s;
}

.doc-upload-zone:hover {
  border-color: rgba(0,168,107,0.35);
  background: rgba(0,168,107,0.04);
}

.doc-upload-text {
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text);
}

.doc-upload-hint {
  font-size: 12px;
  margin-top: 4px;
}

.doc-complete-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7ddcac;
  font-size: 13px;
  font-weight: 600;
}

.doc-history {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
}

.doc-history-title {
  font-weight: 800;
  font-size: 16px;
  padding: 16px 18px 12px;
}

.doc-history-list {
  display: flex;
  flex-direction: column;
}

.doc-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.doc-history-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

.doc-history-type { font-weight: 700; font-size: 13px; }
.doc-history-meta { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-history-size { color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 520px) {
  .docs-grid { grid-template-columns: 1fr; }
  .docs-header { flex-direction: column; }
  .docs-progress { text-align: left; min-width: auto; }
}

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.kv:last-child { border-bottom: 0; }
.k { color: var(--muted); font-size: 13px; font-weight: 500; }
.v { font-size: 14px; word-break: break-word; font-weight: 600; }

/* Profile page */
.profile-page { display: flex; flex-direction: column; gap: 20px; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #00d084);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #062115;
  flex-shrink: 0;
}

.profile-name { font-size: 24px; font-weight: 800; }
.profile-email { color: var(--muted); font-size: 14px; margin-top: 2px; }

.profile-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.profile-card {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  overflow: hidden;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}

.profile-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,168,107,0.10);
  border: 1px solid rgba(0,168,107,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.profile-card-title { font-weight: 800; font-size: 15px; }

.profile-card-body { padding: 6px 18px 12px; }

@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .profile-sections { grid-template-columns: 1fr; }
}

.footer {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(232,238,252,0.55);
  text-align: center;
}

.wrap.fullscreen .footer {
  margin-top: 0;
  padding: 0 12px 12px;
}
