/* ================================================================
   Deal Bridge — Main Stylesheet
   Color palette inspired by Wärtsilä: navy, white, orange accent
   ================================================================ */

:root {
  --navy:      #1A2B3C;
  --navy-dark: #0F1E2D;
  --navy-mid:  #2C4058;
  --blue:      #005B8E;
  --blue-lt:   #E8F3FA;
  --orange:    #E07B00;
  --orange-lt: #FFF3E0;
  --orange-dk: #B85F00;
  --gray-50:   #F7F8FA;
  --gray-100:  #EEF0F4;
  --gray-200:  #DDE1E8;
  --gray-400:  #9AA3AF;
  --gray-600:  #5F6875;
  --gray-800:  #2D3340;
  --white:     #FFFFFF;
  --green:     #2E7D32;
  --red:       #C62828;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 3px 10px rgba(0,0,0,.10);
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --header-h: 60px;
  --footer-h: 52px;
  --left-w:   220px;
  --right-w:  260px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ── */
h1 { font-size: 1.6rem; font-weight: 600; color: var(--navy); }
h2 { font-size: 1.25rem; font-weight: 600; color: var(--navy); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--navy); }
p  { line-height: 1.6; }

/* ── Buttons ── */
.btn-primary, .btn-outline, .btn-danger, .btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary  { background: var(--orange);  color: #fff;         border-color: var(--orange); }
.btn-primary:hover  { background: var(--orange-dk); border-color: var(--orange-dk); text-decoration: none; }
.btn-outline  { background: transparent; color: var(--navy);  border-color: var(--gray-200); }
.btn-outline:hover  { background: var(--gray-100); text-decoration: none; }
.btn-danger   { background: var(--red);    color: #fff;         border-color: var(--red); }
.btn-danger:hover   { background: #a32020; text-decoration: none; }
.btn-ghost    { background: transparent; color: var(--gray-600); border: none; padding: 6px 10px; }
.btn-ghost:hover    { background: var(--gray-100); text-decoration: none; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
button { font-family: inherit; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 5px; color: var(--gray-600); }

input[type=text], input[type=email], input[type=password], input[type=url],
textarea, select {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit;
  color: var(--gray-800); background: var(--white);
  transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,91,142,.12);
}
textarea { resize: vertical; min-height: 90px; }

.form-hint { font-size: .78rem; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: .82rem; color: var(--red); margin-top: 4px; }

.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 400; color: var(--gray-800); }

/* ── Avatar / chip ── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 600; flex-shrink: 0;
}
.avatar.lg { width: 40px; height: 40px; font-size: .85rem; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: .875rem; font-weight: 500; color: var(--navy); }

/* ── Tags / Badges ── */
.tag {
  display: inline-block; padding: 2px 9px;
  border-radius: 20px; font-size: .75rem; font-weight: 500;
  background: var(--blue-lt); color: var(--blue);
  border: 1px solid rgba(0,91,142,.18);
}
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius-sm); font-size: .75rem; font-weight: 600;
}
.badge-orange { background: var(--orange-lt); color: var(--orange-dk); }
.badge-green  { background: #E8F5E9; color: var(--green); }
.badge-red    { background: #FFEBEE; color: var(--red); }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(250, 247, 247, 0.25);
}
.header-inner {
  max-width: 1600px; margin: 0 auto;
  height: 100%; padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
}
.header-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-icon   { width: 32px; height: 32px; flex-shrink: 0; }
.brand-company{ font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-divider{ color: rgba(255,255,255,.3); font-size: 1.1rem; }
.brand-tool   { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: .01em; }
.header-nav   { display: flex; align-items: center; gap: 12px; }
.nav-link     { color: rgba(255,255,255,.8); font-size: .875rem; text-decoration: none; }
.nav-link:hover { color: #fff; text-decoration: none; }
.header-nav .btn-primary  { border-radius: 4px; }
.header-nav .btn-outline  { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.3); }
.header-nav .btn-outline:hover { background: rgba(255,255,255,.1); }
.header-nav .user-name { color: rgba(255,255,255,.9); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 6px; cursor: pointer; background: none; border: none; }
.burger span { width: 22px; height: 2px; background: #fff; display: block; border-radius: 2px; transition: all .2s; }

/* ════════════════════════════════════════
   MAIN SHELL (3-column layout)
   ════════════════════════════════════════ */
.shell {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow: hidden;
}

/* ── Left sidebar ── */
.sidebar-left {
  width: var(--left-w); flex-shrink: 0;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  position: sticky; top: var(--header-h);
  overflow-y: auto; overflow-x: hidden;
  background: var(--navy-dark);
  border-right: 1px solid rgba(255,255,255,.06);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar-left::-webkit-scrollbar { width: 4px; }
.sidebar-left::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 2px; }

.sidebar-nav { padding: 16px 0; }
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-label {
  padding: 10px 18px 4px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.35); text-transform: uppercase;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  color: rgba(255,255,255,.7); font-size: .875rem;
  text-decoration: none; transition: all .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.sidebar-link.active {
  color: #fff; background: rgba(224,123,0,.18);
  border-left-color: var(--orange);
}
.sidebar-icon { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; }
.sidebar-link.active .sidebar-icon { opacity: 1; }

/* ── Main content ── */
.main-content {
  flex: 1; min-width: 0;
  padding: 24px; overflow-y: auto;
  max-height: calc(100vh - var(--header-h) - var(--footer-h));
}

/* ── Right sidebar (leaderboard) ── */
.sidebar-right {
  width: var(--right-w); flex-shrink: 0;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  position: sticky; top: var(--header-h);
  overflow-y: auto;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  padding: 18px 14px;
  scrollbar-width: thin; scrollbar-color: var(--gray-200) transparent;
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.site-footer {
  height: var(--footer-h);
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.footer-inner {
  max-width: 1600px; margin: 0 auto;
  height: 100%; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-copy  { font-size: .78rem; color: rgba(255,255,255,.45); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-size: .78rem; color: rgba(255,255,255,.5); text-decoration: none; }
.footer-links a:hover { color: rgba(255,255,255,.85); }

/* ════════════════════════════════════════
   CARDS / ENTRY WIDGETS
   ════════════════════════════════════════ */
.entries-grid { display: flex; flex-direction: column; gap: 16px; }

.entry-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .15s;
}
.entry-card:hover { box-shadow: var(--shadow-md); }

.entry-card-header {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: flex-start; gap: 12px;
}
.entry-meta { flex: 1; min-width: 0; }
.entry-heading { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.entry-byline  { font-size: .78rem; color: var(--gray-400); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.entry-byline .avatar { width: 20px; height: 20px; font-size: .6rem; }
.entry-type-badge { flex-shrink: 0; }

.entry-body { padding: 14px 18px; }
.entry-body p { font-size: .9rem; line-height: 1.65; color: var(--gray-800); }

/* Image entry */
.entry-image { width: 100%; max-height: 260px; object-fit: cover; display: block; }

/* Link preview */
.link-preview {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  text-decoration: none; transition: background .15s;
}
.link-preview:hover { background: var(--blue-lt); text-decoration: none; }
.link-preview-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--gray-200); }
.link-preview-text { flex: 1; min-width: 0; }
.link-preview-title { font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-preview-desc  { font-size: .78rem; color: var(--gray-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-preview-url   { font-size: .72rem; color: var(--gray-400); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tags row */
.entry-tags { padding: 0 18px 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Actions bar */
.entry-actions {
  padding: 10px 18px;
  border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.vote-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px; font-size: .82rem; font-weight: 500;
  border: 1.5px solid var(--gray-200); background: var(--white); cursor: pointer;
  color: var(--gray-600); transition: all .15s;
}
.vote-btn:hover { border-color: var(--blue); color: var(--blue); }
.vote-btn.active-up   { background: #E8F5E9; border-color: #2E7D32; color: #2E7D32; }
.vote-btn.active-down { background: #FFEBEE; border-color: var(--red); color: var(--red); }

/* Star rating */
.star-rating { display: flex; align-items: center; gap: 2px; }
.star-rating .star {
  font-size: 1.1rem; cursor: pointer; color: var(--gray-200);
  transition: color .1s; line-height: 1;
}
.star-rating .star.filled   { color: #F9A825; }
.star-rating .star.hovered  { color: #FFD54F; }
.star-rating.readonly .star { cursor: default; }
.rating-avg { font-size: .8rem; color: var(--gray-600); margin-left: 4px; }

.toggle-comments-btn {
  margin-left: auto; color: var(--blue); font-size: .82rem; font-weight: 500;
  background: none; border: none; cursor: pointer; padding: 5px 0;
}
.toggle-comments-btn:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   COMMENTS
   ════════════════════════════════════════ */
.comments-section { padding: 0 18px 16px; }
.comment-thread { margin-top: 12px; }
.comment-item {
  display: flex; gap: 10px;
  margin-bottom: 12px;
}
.comment-depth-line { width: 2px; background: var(--gray-200); border-radius: 1px; flex-shrink: 0; margin-left: 11px; }
.comment-indent { flex-shrink: 0; display: flex; }
.comment-body-wrap { flex: 1; min-width: 0; }
.comment-bubble {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 10px 14px;
}
.comment-meta { font-size: .75rem; color: var(--gray-400); margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.comment-meta .avatar { width: 20px; height: 20px; font-size: .6rem; }
.comment-text { font-size: .875rem; line-height: 1.55; color: var(--gray-800); white-space: pre-wrap; }
.comment-actions { display: flex; gap: 8px; margin-top: 5px; }
.comment-reply-btn { font-size: .75rem; color: var(--blue); background: none; border: none; cursor: pointer; padding: 2px 0; }
.comment-reply-btn:hover { text-decoration: underline; }
.reply-form { margin-top: 8px; display: none; }
.reply-form.open { display: block; }
.reply-form textarea { font-size: .85rem; min-height: 60px; }
.reply-form .btn-row { display: flex; gap: 8px; margin-top: 6px; }

.new-comment-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.new-comment-form textarea { font-size: .875rem; }

/* ════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════ */
.filter-bar {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 16px 20px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.filter-bar h3 { font-size: .9rem; margin-bottom: 12px; color: var(--gray-600); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.filter-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ════════════════════════════════════════
   LEADERBOARD (right panel)
   ════════════════════════════════════════ */
.leaderboard-title {
  font-size: .8rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 12px;
}
.lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.lb-rank { width: 22px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--gray-400); flex-shrink: 0; }
.lb-rank.gold   { color: #F9A825; }
.lb-rank.silver { color: #90A4AE; }
.lb-rank.bronze { color: #A1887F; }
.lb-info { flex: 1; min-width: 0; }
.lb-name   { font-size: .82rem; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-detail { font-size: .72rem; color: var(--gray-400); }
.lb-pts    { font-size: .85rem; font-weight: 700; color: var(--orange); flex-shrink: 0; }

.lb-chart { margin-top: 20px; }
.lb-chart-title { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px; }
.lb-bar-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.lb-bar-label { font-size: .72rem; color: var(--gray-600); width: 60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.lb-bar-track { flex: 1; height: 10px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.lb-bar-fill  { height: 100%; background: var(--orange); border-radius: 5px; transition: width .4s ease; }
.lb-bar-val   { font-size: .72rem; color: var(--gray-600); width: 28px; text-align: right; flex-shrink: 0; }

/* ════════════════════════════════════════
   AUTH PAGES (login / register)
   ════════════════════════════════════════ */
.auth-wrapper {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,.3); padding: 36px;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .brand-tool { display: block; font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.auth-logo .brand-company { display: block; font-size: .85rem; color: var(--gray-400); margin-top: 2px; }
.auth-logo svg { margin: 0 auto 10px; }
.auth-divider { text-align: center; font-size: .8rem; color: var(--gray-400); margin: 16px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200); }
.auth-divider span { position: relative; background: var(--white); padding: 0 10px; }
.auth-footer-link { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--gray-600); }
.sso-btn {
  width: 100%; padding: 10px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); background: var(--white); cursor: pointer;
  font-size: .875rem; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--gray-800); transition: background .15s;
}
.sso-btn:hover { background: var(--gray-50); }

/* ════════════════════════════════════════
   FORMS / PUBLISH PAGE
   ════════════════════════════════════════ */
.page-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
  max-width: 760px; margin: 0 auto;
}
.page-title { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-100); }

.type-selector { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.type-btn {
  padding: 8px 18px; border-radius: var(--radius); border: 1.5px solid var(--gray-200);
  background: var(--white); cursor: pointer; font-size: .875rem; color: var(--gray-600);
  transition: all .15s;
}
.type-btn:hover    { border-color: var(--blue); color: var(--blue); }
.type-btn.selected { border-color: var(--orange); background: var(--orange-lt); color: var(--orange-dk); font-weight: 600; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.tag-pick-item { cursor: pointer; user-select: none; }
.tag-pick-item input { display: none; }
.tag-pick-item span {
  display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .8rem;
  border: 1.5px solid var(--gray-200); background: var(--white); color: var(--gray-600);
  transition: all .15s;
}
.tag-pick-item input:checked + span { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Word counter */
.word-counter { font-size: .78rem; color: var(--gray-400); text-align: right; margin-top: 3px; }
.word-counter.warn  { color: var(--orange); }
.word-counter.error { color: var(--red); font-weight: 600; }

/* ════════════════════════════════════════
   TAGS MANAGEMENT TABLE
   ════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th { text-align: left; padding: 10px 14px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray-400); border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: .875rem;
  border-left: 4px solid; margin-bottom: 16px;
}
.alert-success { background: #E8F5E9; border-color: var(--green); color: #1B5E20; }
.alert-error   { background: #FFEBEE; border-color: var(--red);   color: #7F0000; }
.alert-info    { background: var(--blue-lt); border-color: var(--blue); color: #003A5C; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --right-w: 220px; }
}

@media (max-width: 900px) {
  .sidebar-right { display: none; }
  .shell { overflow: visible; }
  .main-content { max-height: none; }
}

@media (max-width: 720px) {
  :root { --left-w: 0px; }
  .sidebar-left {
    position: fixed; left: -240px; top: var(--header-h);
    width: 240px; height: calc(100vh - var(--header-h));
    transition: left .25s ease; z-index: 200;
  }
  .sidebar-left.open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  .burger { display: flex; }
  .header-brand .brand-company { display: none; }
  .main-content { padding: 16px; max-height: none; }
  .auth-card { padding: 24px 20px; }
  .page-card { padding: 18px; }
}

@media (max-width: 500px) {
  .filter-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; height: auto; padding: 14px 20px; }
  .site-footer { height: auto; }
  .entry-actions { gap: 6px; }
}

/* ════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════ */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mb-16  { margin-bottom: 16px; }
.text-muted { color: var(--gray-400); }
.text-sm    { font-size: .85rem; }
.w-full     { width: 100%; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Link fetch loading */
.link-fetch-status { font-size: .8rem; color: var(--blue); margin-top: 5px; min-height: 18px; }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 480px; width: 100%; padding: 28px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; color: var(--navy); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
