/* ===== VSF TechHub India — Employee Blog (Red & White) ===== */

:root {
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --primary-deep: #7f1d1d;
  --primary-soft: #fef2f2;
  --primary-border: #fecaca;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #18181b;
  --text-muted: #71717a;
  --border: #e4e4e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24,24,27,.05), 0 6px 20px rgba(24,24,27,.05);
  --shadow-lg: 0 12px 40px rgba(24,24,27,.12);
  --sidebar-w: 264px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}
#app { display: flex; align-items: stretch; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 10px;
  font-weight: 600; font-size: .92rem;
  transition: all .18s ease; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(220,38,38,.28); }
.btn-ghost-dark { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost-dark:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn {
  background: none; border: none; font-size: 1.25rem; color: var(--text-muted);
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  transition: background .15s;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: margin-left .25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; font-weight: 900; font-size: 1.2rem;
  display: grid; place-items: center;
}
.brand-text strong { display: block; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.brand-text small { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px; }
.nav-section { margin-bottom: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 10px; border: none; background: none;
  font-size: .92rem; font-weight: 600; color: var(--text);
  transition: background .15s; text-align: left;
}
.nav-item:hover { background: var(--primary-soft); color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-item span { flex: 1; }
.nav-item .chev { font-size: .75rem; color: var(--text-muted); transition: transform .2s ease; }
.nav-section.open .nav-item .chev { transform: rotate(180deg); }

.nav-dropdown { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.nav-section.open .nav-dropdown { max-height: 320px; }
.nav-sub {
  display: block; padding: 8px 12px 8px 44px;
  font-size: .86rem; color: var(--text-muted); border-radius: 8px; transition: all .15s;
}
.nav-sub:hover { color: var(--primary); background: var(--bg); }
.nav-sub.active { color: var(--primary); font-weight: 600; background: var(--primary-soft); }

.nav-write {
  background: var(--primary); color: #fff; justify-content: center; margin-top: 8px;
}
.nav-write:hover { background: var(--primary-dark); color: #fff; }

.sidebar-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--border);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem;
}
.profile-meta { flex: 1; min-width: 0; }
.profile-meta strong { display: block; font-size: .88rem; }
.profile-meta small { font-size: .72rem; color: var(--text-muted); }
.profile-link { color: var(--text-muted); font-size: 1.05rem; }

/* ===== App / Topbar ===== */
.app { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.hamburger { display: none; }
.search-box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 14px; max-width: 640px;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-ico { color: var(--text-muted); }
.search-box input { border: none; background: none; outline: none; flex: 1; font-size: .92rem; color: var(--text); }

.view { flex: 1; padding: 32px 32px 48px; max-width: 1180px; width: 100%; margin: 0 auto; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 18px 24px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--text-muted); max-width: 1180px; margin: 0 auto; }
.footer-tag { letter-spacing: .06em; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; border-radius: 18px; padding: 56px 48px;
  position: relative; overflow: hidden; margin-bottom: 36px;
}
.hero::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); pointer-events: none;
}
.hero .eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 16px; }
.hero h1 .dot { color: #fff; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.88); max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #fef2f2; transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }

/* ===== Sections ===== */
.section { margin-bottom: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.section-head .view-all { font-size: .86rem; font-weight: 600; color: var(--primary); }
.section-head .view-all:hover { text-decoration: underline; }

/* ===== Cards ===== */
.story-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: all .2s ease;
}
.story-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--primary-border); }
.card-cover { display: grid; place-items: center; height: 140px; font-size: 3rem; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-body h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.32; }
.card-body p.excerpt { font-size: .88rem; color: var(--text-muted); flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text-muted); margin-top: auto; }
.card-meta .dot-sep { opacity: .5; }

/* ===== Chips & badges ===== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}
.chip-neutral { background: var(--bg); color: var(--text-muted); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
  padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700;
}

/* ===== Grids ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* ===== Featured stories ===== */
.featured-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 100%;
  transition: all .2s ease;
}
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.featured-card .card-cover { height: 120px; font-size: 2.6rem; }
.featured-card .card-body { padding: 18px; }

/* ===== Latest list ===== */
.story-row {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; transition: all .18s ease;
}
.story-row:hover { border-color: var(--primary-border); box-shadow: var(--shadow); }
.row-cover {
  width: 56px; height: 56px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 1.6rem;
}
.row-body { flex: 1; min-width: 0; }
.row-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.row-body p { font-size: .86rem; color: var(--text-muted); margin-bottom: 6px; }

/* ===== Category pills ===== */
.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .88rem; font-weight: 600; color: var(--text);
  transition: all .16s ease;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.cat-pill .count { font-size: .72rem; color: var(--text-muted); font-weight: 600; }

/* ===== Contributors ===== */
.contributor {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow); transition: all .18s ease;
}
.contributor:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.contributor .avatar { width: 64px; height: 64px; font-size: 1.4rem; margin: 0 auto 12px; }
.contributor h4 { font-size: 1rem; font-weight: 700; }
.contributor .role { font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; }
.contributor .stats { font-size: .78rem; color: var(--text-muted); }

/* ===== Reactions ===== */
.reactions { display: flex; gap: 6px; flex-wrap: wrap; }
.reaction {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 5px 12px; font-size: .8rem; font-weight: 600; color: var(--text-muted);
  transition: all .15s ease;
}
.reaction:hover { border-color: var(--primary); }
.reaction.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.reaction .n { font-weight: 700; color: var(--text); }
.reaction.on .n { color: var(--primary); }

/* ===== Article / story detail ===== */
.back-link { display: inline-block; font-size: .88rem; font-weight: 600; color: var(--text-muted); margin-bottom: 20px; }
.back-link:hover { color: var(--primary); }
.story-head { margin-bottom: 24px; }
.story-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.15; margin: 14px 0; }
.story-head .meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.author-inline { display: inline-flex; align-items: center; gap: 8px; }
.author-inline .avatar { width: 30px; height: 30px; font-size: .7rem; }
.article-body { font-size: 1.03rem; color: #27272a; max-width: 760px; }
.article-body h2 { font-size: 1.35rem; font-weight: 800; margin: 28px 0 10px; }
.article-body p { margin-bottom: 14px; }
.article-body ul { margin: 0 0 14px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  margin: 20px 0; padding: 16px 20px; border-left: 4px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 10px 10px 0; font-style: italic;
}
.project-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin: 16px 0;
}
.project-box .pb-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.project-box .pb-row:last-child { border-bottom: none; }
.project-box .pb-label { font-weight: 700; font-size: .85rem; color: var(--primary); }
.tech-tag {
  display: inline-block; background: var(--bg); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 6px; font-size: .76rem; font-weight: 600; margin: 0 6px 6px 0;
}

/* ===== Profile ===== */
.profile-hero {
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 28px; box-shadow: var(--shadow);
}
.profile-hero .avatar { width: 84px; height: 84px; font-size: 1.8rem; }
.profile-hero h1 { font-size: 1.6rem; font-weight: 800; }
.profile-hero .role { color: var(--text-muted); margin: 4px 0 8px; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.profile-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .num { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ===== Recognition / leaderboard ===== */
.leader-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px;
}
.rank { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; display: grid; place-items: center; flex: none; }
.rank.gold { background: #fef3c7; color: #b45309; }
.leader-row .avatar { width: 40px; height: 40px; }
.leader-row .lr-meta { flex: 1; }
.leader-row .lr-meta strong { display: block; }
.leader-row .lr-meta small { color: var(--text-muted); }
.leader-row .lr-score { font-weight: 800; color: var(--primary); }

/* ===== Search results ===== */
.search-hero { margin-bottom: 24px; }
.search-hero h1 { font-size: 1.5rem; font-weight: 800; }
.search-hero p { color: var(--text-muted); font-size: .92rem; }

/* ===== Empty ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty .big { font-size: 3rem; margin-bottom: 12px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(24,24,27,.5);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 1.2rem; font-weight: 800; }
.modal-body { padding: 24px; }
.modal-intro { color: var(--text-muted); margin-bottom: 16px; }
.story-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.story-type {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  transition: all .15s;
}
.story-type:hover { border-color: var(--primary); background: var(--primary-soft); }
.story-type .st-ico { font-size: 1.3rem; }
.story-type strong { display: block; font-size: .88rem; }
.story-type small { color: var(--text-muted); font-size: .74rem; }
.template h3 { margin-bottom: 12px; font-size: 1rem; }
.template-list { margin: 0 0 18px 20px; color: #3f3f46; font-size: .9rem; }
.template-list li { margin-bottom: 6px; }
.template-actions { display: flex; gap: 10px; margin-top: 18px; }
.editor label { display: block; font-size: .82rem; font-weight: 600; margin: 14px 0 6px; }
.editor label small { font-weight: 400; color: var(--text-muted); }
.editor input, .editor select, .editor textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: .92rem; outline: none; background: var(--surface);
}
.editor input:focus, .editor select:focus, .editor textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.editor textarea { resize: vertical; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #18181b; color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: .9rem; z-index: 200; box-shadow: var(--shadow-lg);
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .sidebar { position: fixed; z-index: 60; margin-left: calc(-1 * var(--sidebar-w)); }
  body.sidebar-open .sidebar { margin-left: 0; }
  body.sidebar-open::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .hamburger { display: grid; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .story-types { grid-template-columns: 1fr; }
  .view { padding: 20px 16px 40px; }
  .hero { padding: 36px 24px; }
  .write-btn span { display: none; }
  .project-box .pb-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== Full-stack additions: logo, login, admin, gallery ===== */

/* Logo in sidebar */
.sidebar-brand { justify-content: center; padding: 18px 16px; }
.brand-logo { height: 46px; width: auto; object-fit: contain; }

/* ===== Login screen ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 18px; padding: 40px 36px;
  width: 100%; max-width: 400px; box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.login-logo-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.login-logo { height: 58px; width: auto; }
.login-card h1 { font-size: 1.5rem; font-weight: 800; text-align: center; }
.login-sub { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; }
.login-card label { display: block; font-size: .82rem; font-weight: 600; margin: 14px 0 6px; }
.login-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: .95rem; outline: none; background: var(--surface);
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.login-btn { width: 100%; margin-top: 22px; padding: 13px; font-size: 1rem; }
.login-error {
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-border);
  padding: 10px 14px; border-radius: 10px; font-size: .85rem; margin-top: 14px;
}
.login-hint { text-align: center; color: var(--text-muted); font-size: .8rem; margin-top: 18px; }
.login-foot { margin-top: 20px; color: rgba(255,255,255,.8); font-size: .8rem; }

/* ===== Forms (user + photo modals) ===== */
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.form-field label small { font-weight: 400; color: var(--text-muted); }
.form-field input, .form-field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: .92rem; outline: none; background: var(--surface);
}
.form-field input:focus, .form-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-error {
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-border);
  padding: 10px 14px; border-radius: 10px; font-size: .85rem; margin: 6px 0 14px;
}

/* ===== Admin panel ===== */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.table-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.users-table th {
  text-align: left; padding: 14px 18px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border);
}
.users-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover td { background: #fafafa; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell strong { display: block; font-size: .92rem; }
.cell-sub { color: var(--text-muted); font-size: .82rem; }
.dep-chip { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.role-badge { display: inline-flex; padding: 3px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.role-admin { background: var(--primary-soft); color: var(--primary); }
.role-user { background: var(--bg); color: var(--text-muted); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .icon-btn { display: inline-grid; }
.td-load { text-align: center; color: var(--text-muted); padding: 28px; }

/* ===== Photo gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.photo-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: all .18s ease; margin: 0;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.photo-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg); overflow: hidden; }
.photo-img a { display: block; width: 100%; height: 100%; }
.photo-img img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(24,24,27,.6); color: #fff; border: none; cursor: pointer; font-size: .9rem;
  display: grid; place-items: center; transition: background .15s; z-index: 2;
}
.photo-del:hover { background: var(--primary); }
.photo-card figcaption { padding: 12px 14px; }
.photo-caption { font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.photo-meta { font-size: .76rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .login-card { padding: 32px 24px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
