/* ================================================================
   Syaahi — Additional Components CSS
   ================================================================ */

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-brand-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
}

.header-brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}

.header-search {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 0 10px;
  gap: 8px;
  transition: all .2s;
}

.header-search:focus-within {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
}

.search-icon { color: rgba(255,255,255,.4); flex-shrink: 0; }

.search-input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
  padding: 8px 0;
}

.search-input::placeholder { color: rgba(255,255,255,.35); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.83rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all .2s;
  font-weight: 500;
}

.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: rgba(255,255,255,.7);
  font-size: 0.85rem;
  transition: all .2s;
  line-height: 1;
}

.theme-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }

[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* User menu */
.user-menu { position: relative; }

.user-avatar-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all .2s;
}

.user-avatar-btn:hover { background: rgba(255,255,255,.18); }

.user-avatar-placeholder {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.user-menu.open .user-dropdown { display: block; }

.user-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-dropdown-item {
  display: block;
  padding: 9px 16px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}

.user-dropdown-item:hover { background: var(--bg-secondary); }
.user-dropdown-item--danger { color: #c0392b; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,.7);
  border-radius: 1px;
}

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { max-width: 720px; margin: 0 auto; position: relative; }

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section Header ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.section-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.section-link:hover { color: var(--text); }

/* ── Layout Sidebar ──────────────────────────────────────── */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* ── Featured Article ────────────────────────────────────── */
.featured-article {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow .2s;
}

.featured-article:hover { box-shadow: var(--shadow); }

.featured-article-body { padding: 28px; }

.featured-article-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  margin: 10px 0 12px;
}

.featured-article-title a {
  color: var(--text);
  text-decoration: none;
}

.featured-article-title a:hover { color: var(--text-secondary); }

.featured-article-abstract {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Article Grid ────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .2s;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.article-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  flex: 1;
}

.article-card-title a { color: var(--text); text-decoration: none; }
.article-card-title a:hover { color: var(--text-secondary); }

.article-card-abstract {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-journal   { background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); }
.badge-oa        { background: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32; }
.badge-published { background: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32; }
.badge-accepted  { background: #e3f2fd; border: 1px solid #bbdefb; color: #1565c0; }
.badge-review    { background: #fff8e1; border: 1px solid #ffecb3; color: #e65100; }
.badge-submitted { background: #f3e5f5; border: 1px solid #e1bee7; color: #6a1b9a; }
.badge-revision  { background: #fff3e0; border: 1px solid #ffe0b2; color: #e65100; }
.badge-rejected  { background: #fce4ec; border: 1px solid #f8bbd0; color: #c62828; }
.badge-upcoming  { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-secondary); }
.badge-default   { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); }

[data-theme="dark"] .badge-oa        { background: rgba(46,125,50,.2);  border-color: rgba(46,125,50,.4);  color: #81c784; }
[data-theme="dark"] .badge-published { background: rgba(46,125,50,.2);  border-color: rgba(46,125,50,.4);  color: #81c784; }
[data-theme="dark"] .badge-accepted  { background: rgba(21,101,192,.2); border-color: rgba(21,101,192,.4); color: #64b5f6; }
[data-theme="dark"] .badge-review    { background: rgba(230,81,0,.2);   border-color: rgba(230,81,0,.4);   color: #ffcc02; }
[data-theme="dark"] .badge-revision  { background: rgba(230,81,0,.15);  border-color: rgba(230,81,0,.35);  color: #ffcc02; }
[data-theme="dark"] .badge-rejected  { background: rgba(198,40,40,.2);  border-color: rgba(198,40,40,.4);  color: #ef9a9a; }
[data-theme="dark"] .badge-submitted { background: rgba(106,27,154,.2); border-color: rgba(106,27,154,.4); color: #ce93d8; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .18s;
  cursor: pointer;
  line-height: 1;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  background: var(--text-secondary);
  border-color: var(--text-secondary);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--header-text, var(--text));
  border-color: rgba(255,255,255,.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.5);
}

/* Inside white bg areas */
.main-area .btn-outline,
.sidebar-cta .btn-outline {
  border-color: var(--border);
  color: var(--text);
}
.main-area .btn-outline:hover,
.sidebar-cta .btn-outline:hover {
  background: var(--bg-secondary);
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; }

/* ── Journal List ────────────────────────────────────────── */
.journal-list { display: flex; flex-direction: column; gap: 1px; }

.journal-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: all .18s;
  background: var(--surface);
}

.journal-list-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.journal-list-icon {
  width: 42px; height: 42px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.journal-list-body { flex: 1; min-width: 0; }

.journal-list-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journal-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  align-items: center;
}

.journal-list-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform .18s;
}

.journal-list-item:hover .journal-list-arrow { transform: translateX(4px); }

/* ── Sidebar Widgets ─────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-cta {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.sidebar-cta h3 {
  font-family: var(--font-serif);
  color: var(--bg);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.sidebar-cta p {
  font-size: 0.83rem;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
  margin-bottom: 14px;
}

.sidebar-cta .btn-primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.sidebar-cta .btn-primary:hover { background: #e0e0e0; border-color: #e0e0e0; }

.sidebar-widget-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* CFP items */
.cfp-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cfp-item:last-of-type { border-bottom: none; }
.cfp-title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.cfp-journal { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0; }
.cfp-deadline { font-size: 0.75rem; color: var(--text-secondary); }

/* Conference items */
.conf-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.conf-item:last-of-type { border-bottom: none; }
.conf-name { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 4px; }
.conf-date { font-size: 0.75rem; }

/* News items */
.news-item { padding: 9px 0; border-bottom: 1px solid var(--border); }
.news-item:last-of-type { border-bottom: none; }
.news-item-title { font-size: 0.85rem; color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.3; }
.news-item-title:hover { color: var(--text-secondary); }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}

.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.page-header-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ── Filter Bar ──────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.filter-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color .18s;
}

.filter-select:focus { outline: none; border-color: var(--border-strong); }

/* ── Card Grid (books, etc.) ─────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.resource-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}

.resource-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.resource-card-cover {
  height: 180px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
}

.resource-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }

.resource-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  text-decoration: none;
}

.resource-card-title:hover { color: var(--text-secondary); }

.resource-card-meta { font-size: 0.78rem; color: var(--text-muted); }

.resource-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Dashboard / Admin panels ────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.dash-card-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text);
  line-height: 1;
}

.dash-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

/* ── Data Table ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }

/* ── Submission form ─────────────────────────────────────── */
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.form-section-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .submit-layout  { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--header-bg);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    z-index: 99;
  }
  .mobile-menu-btn { display: flex; }
  .header-search { display: none; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .container { padding: 0 16px; }
}
