/* ALL4NUTRI — Design System v2 */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ─── Reset & Variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1B5E46;
  --primary-d:    #0E3327;
  --primary-l:    #2D9B6F;
  --primary-bg:   #EDF7F2;
  --accent:       #2DCCAA;
  --danger:       #DC2626;
  --danger-bg:    #FEF2F2;
  --warning:      #D97706;
  --warning-bg:   #FFFBEB;
  --success:      #059669;
  --success-bg:   #ECFDF5;
  --info:         #2563EB;
  --info-bg:      #EFF6FF;

  --bg:           #F7F8FA;
  --surface:      #FFFFFF;
  --surface2:     #F3F4F6;
  --border:       #E5E7EB;
  --border-d:     #D1D5DB;
  --text:         #111827;
  --text-2:       #374151;
  --text-3:       #6B7280;
  --text-4:       #9CA3AF;

  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.14);
  --transition:   all 0.2s ease;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }

/* ─── Layout ─────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }
.main-wrap  { flex: 1; display: flex; flex-direction: column; margin-left: var(--sidebar-w); min-height: 100vh; }
.page-body  { flex: 1; padding: 28px; overflow-x: hidden; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary-d);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  box-shadow: 2px 0 16px rgba(0,0,0,.15);
}
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; background: linear-gradient(135deg,#2DCCAA,#1B9B7A); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #fff; line-height: 1.1; }
.brand-sub  { font-size: 9px; color: rgba(255,255,255,.45); font-weight: 500; letter-spacing: .4px; text-transform: uppercase; }

.nav-section { padding: 14px 16px 4px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.35); font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 20px; margin: 1px 8px;
  color: rgba(255,255,255,.60); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border-radius: 8px; border-left: 3px solid transparent;
  transition: var(--transition); user-select: none;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(45,204,170,.18); border-left-color: var(--accent); }
.nav-item .ni-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }

.sidebar-user { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: var(--transition); }
.user-pill:hover { background: rgba(255,255,255,.06); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-role { font-size: 11px; color: rgba(255,255,255,.45); white-space: nowrap; }
.btn-logout { display: block; width: 100%; margin-top: 6px; padding: 7px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); border-radius: 8px; color: rgba(255,255,255,.55); font-size: 12px; text-align: center; transition: var(--transition); }
.btn-logout:hover { background: rgba(220,38,38,.2); border-color: rgba(220,38,38,.4); color: #fca5a5; }

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; flex: 1; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius-sm); border: none; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; text-decoration: none; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-l); box-shadow: 0 2px 8px rgba(27,94,70,.3); }
.btn-secondary { background: var(--primary-bg); color: var(--primary); }
.btn-secondary:hover { background: #D1EAE0; }
.btn-ghost     { background: transparent; color: var(--text-3); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--border-d); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-outline   { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Cards ──────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-hover { transition: var(--transition); cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-d); }

.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; }
.stat-card.green::before { background: var(--success); }
.stat-card.blue::before  { background: var(--info); }
.stat-card.red::before   { background: var(--danger); }
.stat-card.yellow::before{ background: var(--warning); }
.stat-card.teal::before  { background: var(--accent); }
.stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; color: var(--text); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; margin-top: 6px; }
.stat-trend { font-size: 11.5px; color: var(--text-4); margin-top: 4px; }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.table-head h3 { font-size: 14px; font-weight: 700; flex: 1; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); background: var(--bg); border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; }
.form-control { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; color: var(--text); transition: var(--transition); width: 100%; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,94,70,.12); }
.form-control::placeholder { color: var(--text-4); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 11.5px; color: var(--text-4); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.col-full { grid-column: 1 / -1; }

/* ─── Badges & Chips ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-red    { background: var(--danger-bg);  color: var(--danger); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); }
.badge-blue   { background: var(--info-bg);    color: var(--info); }
.badge-gray   { background: var(--surface2);   color: var(--text-3); }
.badge-teal   { background: #CCFBF1; color: #0F766E; }
.badge-primary{ background: var(--primary-bg); color: var(--primary); }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border: 1px solid #A7F3D0; color: #065F46; }
.alert-error   { background: var(--danger-bg);  border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: var(--warning-bg); border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: var(--info-bg);    border: 1px solid #BFDBFE; color: #1E40AF; }

/* ─── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--surface2); padding: 4px; border-radius: 10px; width: fit-content; }
.tab { padding: 7px 16px; border-radius: 7px; border: none; background: transparent; color: var(--text-3); font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition); }
.tab.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ─── Modals ─────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-height: 90vh; overflow-y: auto; animation: modalIn .25s ease; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 800px; }
#modal-recipe .modal-body { max-height: 78vh; overflow-y: auto; padding: 20px 24px; }
.modal-hd { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-hd h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.modal-body { padding: 22px 24px; }
.modal-ft  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-3); cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: var(--transition); }
.modal-close:hover { background: var(--surface2); color: var(--text); }
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }

/* ─── Watermark (CSS, anti-inspect) ─────────────────────── */
.wm-overlay { position: relative; overflow: hidden; }
.wm-overlay::after {
  content: 'ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI  ·  ALL4NUTRI';
  position: absolute; top: 0; left: -50%; right: -50%; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: rgba(27,94,70,0.13); letter-spacing: 6px;
  transform: rotate(-30deg); pointer-events: none;
  white-space: pre-wrap; word-break: break-all;
  line-height: 2.8; text-align: center;
  z-index: 10;
  user-select: none;
}

/* ─── Document Sheets ────────────────────────────────────── */
.doc-sheet { width: 215.9mm; min-height: 279.4mm; background: #fff; margin: 0 auto; font-family: var(--font-body); position: relative; overflow: hidden; }
.preview-wrap { background: var(--surface2); border-radius: var(--radius); overflow: auto; max-height: 72vh; border: 1px solid var(--border); }
.sticky-download { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 30; }

/* ─── Color Picker ───────────────────────────────────────── */
.palette-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.pal-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: var(--transition); flex-shrink: 0; }
.pal-dot.sel { border-color: var(--text); transform: scale(1.2); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--text); }
.pal-dot:hover:not(.sel) { transform: scale(1.1); }

/* ─── Template Picker ────────────────────────────────────── */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tpl-card { border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); overflow: hidden; background: var(--surface); }
.tpl-card:hover { border-color: var(--primary-l); }
.tpl-card.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.tpl-thumb { height: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 22px; gap: 4px; }
.tpl-label { padding: 7px 10px; font-size: 11px; font-weight: 600; border-top: 1px solid var(--border); text-align: center; color: var(--text-2); line-height: 1.2; }

/* ─── Recipe Cards ───────────────────────────────────────── */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.recipe-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); cursor: pointer; }
.recipe-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.recipe-thumb { height: 170px; position: relative; background: var(--surface2); overflow: hidden; }
.recipe-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3.5rem; }
.recipe-cat-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 20px; backdrop-filter: blur(4px); }
.recipe-body { padding: 16px; }
.recipe-body h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); line-height: 1.3; }
.recipe-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-bottom: 10px; }
.recipe-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.recipe-tag { font-size: 10.5px; background: var(--primary-bg); color: var(--primary); padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.recipe-macros { display: flex; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--bg); }
.macro-box { flex: 1; text-align: center; }
.macro-val { font-size: 14px; font-weight: 700; color: var(--primary); }
.macro-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-4); }

/* ─── Food Grid ──────────────────────────────────────────── */
.food-grid-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.food-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--border); cursor: pointer; transition: var(--transition); position: relative; background: var(--surface2); }
.food-thumb img { width: 100%; height: 100%; object-fit: cover; }
.food-thumb:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: scale(1.03); }
.food-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; }

/* ─── IG Post ─────────────────────────────────────────────── */
.ig-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.ig-post-wrap { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.ig-post-label { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--border); gap: 8px; min-height: 44px; }

/* ─── License Grid ───────────────────────────────────────── */
.license-section { margin-bottom: 28px; }
.license-section h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.license-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }
.license-card { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.license-preview { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; text-align: center; padding: 8px; line-height: 1.4; font-weight: 600; }
.license-footer { padding: 8px 10px; }
.license-name { font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.license-date { font-size: 10.5px; color: var(--text-4); margin-bottom: 6px; }

/* ─── Key Cards ──────────────────────────────────────────── */
.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.key-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.key-code { font-family: 'Courier New', monospace; font-size: 15px; font-weight: 700; color: var(--primary); background: var(--primary-bg); padding: 10px 14px; border-radius: var(--radius-sm); margin: 10px 0; letter-spacing: 2px; word-break: break-all; cursor: pointer; border: 1px solid #C9E8D8; }
.key-code:hover { background: #D1EAE0; }
.key-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ─── Upload Zone ────────────────────────────────────────── */
.upload-zone { border: 2px dashed var(--border-d); border-radius: var(--radius-sm); padding: 24px; text-align: center; cursor: pointer; transition: var(--transition); }
.upload-zone:hover { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone input[type=file] { display: none; }
.upload-zone .uz-icon { font-size: 28px; margin-bottom: 8px; }
.upload-zone p { font-size: 13px; color: var(--text-3); }

/* ─── Spinner ────────────────────────────────────────────── */
.spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Misc ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty-state { text-align: center; padding: 52px 20px; color: var(--text-3); }
.empty-state .es-icon { font-size: 46px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 28px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
pre { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 12px; overflow-x: auto; line-height: 1.6; color: var(--primary); }

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; }
.auth-panel { width: 100%; max-width: 460px; margin: auto; padding: 40px 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.auth-brand .brand-mark { width: 44px; height: 44px; font-size: 22px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.auth-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-sub   { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }
.auth-footer{ margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ─── Landing ────────────────────────────────────────────── */
.landing-hero { background: linear-gradient(135deg, var(--primary-d) 0%, #1B5E46 60%, #2D9B6F 100%); color: #fff; padding: 80px 20px; text-align: center; }
.landing-hero h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.landing-hero p { font-size: 1.1rem; opacity: .85; max-width: 600px; margin: 0 auto 32px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; padding: 60px 20px; max-width: 1100px; margin: 0 auto; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.feature-icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .sticky-download, .btn, .tabs, .preview-wrap { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  .wm-overlay::after { display: none !important; }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .doc-sheet { width: 100%; min-height: auto; }
  .preview-wrap { max-height: none; }
}
@media (max-width: 640px) {
  .page-body { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
}
