/* =====================================================
   KARABAKH UNIVERSITY — STUDENT INK PLATFORM
   style.css  |  Unified Design System
   ===================================================== */

/* ─── CSS VARIABLES ──────────────────────────────── */
:root {
  /* Primary palette */
  --c-primary:      #1a3d2e;
  --c-primary-mid:  #245c42;
  --c-primary-lt:   #2f7a57;
  --c-primary-dim:  rgba(26,61,46,.08);

  /* Accent */
  --c-accent:       #c8a84b;
  --c-accent-lt:    #e2c870;
  --c-accent-dim:   rgba(200,168,75,.12);

  /* Neutrals */
  --c-bg:           #f7f8f6;
  --c-surface:      #ffffff;
  --c-surface-2:    #f0f4f1;
  --c-border:       #dce5de;
  --c-border-lt:    #eaf0eb;

  /* Text */
  --c-text:         #141f18;
  --c-text-mid:     #3d5047;
  --c-text-muted:   #7a9384;

  /* Semantic */
  --c-danger:       #c0392b;
  --c-danger-dim:   rgba(192,57,43,.08);
  --c-success:      #27ae60;
  --c-warning:      #e67e22;

  /* Typography */
  --f-display:      'Playfair Display', Georgia, serif;
  --f-body:         'DM Sans', system-ui, sans-serif;

  /* Radii */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 100px;

  /* Shadows */
  --s-xs:  0 1px 3px rgba(26,61,46,.06);
  --s-sm:  0 2px 8px rgba(26,61,46,.09);
  --s-md:  0 6px 20px rgba(26,61,46,.11);
  --s-lg:  0 16px 40px rgba(26,61,46,.13);
  --s-xl:  0 24px 60px rgba(26,61,46,.17);

  /* Layout */
  --header-h:   68px;
  --sidebar-w:  248px;
  --container:  1220px;

  /* Transitions */
  --t:      200ms cubic-bezier(.4,0,.2,1);
  --t-slow: 360ms cubic-bezier(.4,0,.2,1);
}

/* ─── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--f-body); color: var(--c-text); background: var(--c-bg);
       line-height: 1.6; -webkit-font-smoothing: antialiased; }
img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0;
           margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ─── LAYOUT ─────────────────────────────────────── */
.container  { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.page-wrap  { min-height: 100vh; display: flex; flex-direction: column; }
main        { flex: 1; }

/* ─── HEADER ─────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 200;
  background: var(--c-primary);
  height: var(--header-h);
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.header__inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}
.header__brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header__logo  { width: 40px; height: 40px; border-radius: 8px; object-fit: contain;
                  background: rgba(255,255,255,.1); padding: 4px; }
.header__brand-text { display: flex; flex-direction: column; }
.header__brand-name { font-family: var(--f-display); font-size: .95rem; font-weight: 700;
                       color: #fff; letter-spacing: .01em; line-height: 1.2; }
.header__brand-sub  { font-size: .65rem; font-weight: 400; color: rgba(255,255,255,.5);
                       text-transform: uppercase; letter-spacing: .06em; margin-top: 1px; }

/* Desktop nav */
.header__nav         { display: flex; align-items: center; }
.header__nav-list    { display: flex; align-items: center; gap: 2px; }
.header__nav-link    { font-size: .8125rem; font-weight: 500; color: rgba(255,255,255,.75);
                        padding: 6px 12px; border-radius: var(--r-sm);
                        transition: color var(--t), background var(--t); white-space: nowrap; }
.header__nav-link:hover, .header__nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.header__nav-link--ext { display: flex; align-items: center; gap: 5px; color: var(--c-accent);
                          border: 1px solid rgba(200,168,75,.3); }
.header__nav-link--ext:hover { color: var(--c-accent-lt); background: rgba(200,168,75,.1);
                                border-color: rgba(200,168,75,.5); }

/* Mobile toggle */
.header__toggle { display: none; flex-direction: column; gap: 5px; width: 34px; height: 34px;
                   padding: 6px; border-radius: var(--r-sm); transition: background var(--t); }
.header__toggle:hover { background: rgba(255,255,255,.1); }
.header__toggle span  { display: block; width: 100%; height: 2px; background: #fff;
                         border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  position: relative; background: var(--c-primary);
  padding: 68px 0 60px; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 70% at 80% 40%, rgba(47,122,87,.18) 0%, transparent 65%),
              radial-gradient(ellipse 35% 50% at 5% 90%, rgba(200,168,75,.07) 0%, transparent 55%);
}
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 30px 30px;
}
.hero__inner  { position: relative; z-index: 1; max-width: 760px; }
.hero__label  {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-accent); background: rgba(200,168,75,.1);
  border: 1px solid rgba(200,168,75,.25); border-radius: var(--r-pill);
  padding: 5px 14px; margin-bottom: 20px;
}
.hero__title {
  font-family: var(--f-display); font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 700; color: #fff; line-height: 1.18; letter-spacing: -.015em; margin-bottom: 14px;
}
.hero__title em { font-style: normal; color: var(--c-accent); }
.hero__desc { font-size: .9375rem; color: rgba(255,255,255,.6); max-width: 500px;
               margin-bottom: 32px; line-height: 1.7; font-weight: 300; }

/* Search bar */
.search-bar { position: relative; max-width: 500px; }
.search-bar__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
                    color: rgba(255,255,255,.4); pointer-events: none; }
.search-bar__input {
  width: 100%; padding: 13px 18px 13px 46px;
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.14);
  border-radius: var(--r-md); font-size: .9375rem; color: #fff; outline: none;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.search-bar__input::placeholder { color: rgba(255,255,255,.38); }
.search-bar__input:focus { background: rgba(255,255,255,.11);
  border-color: rgba(200,168,75,.55); box-shadow: 0 0 0 3px rgba(200,168,75,.1); }

/* Hero stats */
.hero__stats { display: flex; align-items: center; margin-top: 40px; }
.hero__stat  { display: flex; flex-direction: column; gap: 2px; padding: 0 28px; }
.hero__stat:first-child { padding-left: 0; }
.hero__stat-n { font-family: var(--f-display); font-size: 1.45rem; font-weight: 700; color: #fff; }
.hero__stat-l { font-size: .7rem; color: rgba(255,255,255,.48); text-transform: uppercase;
                 letter-spacing: .04em; font-weight: 500; }
.hero__stat-div { width: 1px; height: 34px; background: rgba(255,255,255,.14); flex-shrink: 0; }

/* ─── SECTION CHROME ─────────────────────────────── */
.section { padding: 64px 0; }
.section--alt { background: var(--c-surface-2); }

.section-hd { display: flex; align-items: flex-end; justify-content: space-between;
               gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-hd__left {}
.section-hd__title { font-family: var(--f-display); font-size: 1.75rem; font-weight: 700;
                      color: var(--c-primary); letter-spacing: -.01em; line-height: 1.2; margin-bottom: 4px; }
.section-hd__sub   { font-size: .875rem; color: var(--c-text-muted); }

/* View all link */
.link-more { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 600;
             color: var(--c-primary-lt); transition: gap var(--t), color var(--t); }
.link-more:hover { color: var(--c-primary); gap: 8px; }

/* ─── FILTER TABS ────────────────────────────────── */
.filter-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-tab  {
  font-size: .8rem; font-weight: 500; color: var(--c-text-mid);
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill); padding: 6px 16px;
  transition: all var(--t); white-space: nowrap;
}
.filter-tab:hover  { border-color: var(--c-primary-lt); color: var(--c-primary); background: var(--c-surface-2); }
.filter-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ─── CONTENT GRID ───────────────────────────────── */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 24px; }

/* ─── CONTENT CARD ───────────────────────────────── */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border-lt); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--s-sm); transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t);
  animation: fadeUp .38s ease both;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--s-lg); border-color: var(--c-border); }

.card__cover-wrap { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--c-surface-2); flex-shrink: 0; }
.card__cover      { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__cover { transform: scale(1.045); }

.card__badge {
  position: absolute; top: 10px; left: 10px;
  font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--c-primary); background: rgba(255,255,255,.93);
  border: 1px solid rgba(26,61,46,.13); border-radius: var(--r-pill);
  padding: 3px 10px; backdrop-filter: blur(4px);
}
/* Type badge color accents */
.card__badge--magazine  { color: #6d3e0f; background: rgba(255,235,200,.95); border-color: rgba(109,62,15,.15); }
.card__badge--story     { color: #2d1f5e; background: rgba(220,215,255,.95); border-color: rgba(45,31,94,.15); }
.card__badge--review    { color: #1a3d6e; background: rgba(210,228,255,.95); border-color: rgba(26,61,110,.15); }
.card__badge--art-photo { color: #4a1a2c; background: rgba(255,215,225,.95); border-color: rgba(74,26,44,.15); }
.card__badge--essay     { color: #1e4a2e; background: rgba(200,240,215,.95); border-color: rgba(30,74,46,.15); }
.card__badge--article   { color: #1a3d4e; background: rgba(205,235,248,.95); border-color: rgba(26,61,78,.15); }

.card__body    { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 3px; }
.card__title   { font-family: var(--f-display); font-size: .9375rem; font-weight: 600;
                  color: var(--c-primary); line-height: 1.35; letter-spacing: -.005em;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__author  { font-size: .78rem; color: var(--c-text-muted); font-weight: 400;
                  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__divider { width: 28px; height: 1.5px; background: var(--c-border); border-radius: 2px; margin: 10px 0; }

/* Card actions */
.card__actions { display: flex; gap: 8px; margin-top: auto; }
.btn           { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
                  font-size: .8rem; font-weight: 600; border-radius: var(--r-sm);
                  padding: 8px 14px; transition: all var(--t); white-space: nowrap; letter-spacing: .01em; }
.btn--primary  { background: var(--c-primary); color: #fff; flex: 1; }
.btn--primary:hover { background: var(--c-primary-lt); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,61,46,.24); }
.btn--outline  { background: transparent; color: var(--c-text-mid); border: 1.5px solid var(--c-border); }
.btn--outline:hover { border-color: var(--c-primary-lt); color: var(--c-primary); background: var(--c-primary-dim); }
.btn--danger   { background: var(--c-danger); color: #fff; }
.btn--danger:hover { background: #a93226; transform: translateY(-1px); }
.btn--sm       { font-size: .75rem; padding: 6px 11px; }
.btn--icon     { padding: 7px; border-radius: var(--r-sm); }
.btn:active    { transform: translateY(0) !important; box-shadow: none !important; }
.btn:disabled  { opacity: .45; pointer-events: none; }

.btn--unavailable { background: var(--c-surface-2); color: var(--c-text-muted);
                    border: 1.5px solid var(--c-border); flex: 1; pointer-events: none; cursor: not-allowed; }

/* ─── FEATURED STRIP ─────────────────────────────── */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }

/* ─── TYPE NAV CHIPS ─────────────────────────────── */
.type-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.type-chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 20px; background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r-md); min-width: 90px; text-align: center;
  transition: all var(--t); color: var(--c-text-mid); font-size: .8rem; font-weight: 500;
}
.type-chip:hover, .type-chip.active { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-dim); }
.type-chip__icon { font-size: 1.4rem; }

/* ─── EMPTY STATE ────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center;
          padding: 72px 24px; gap: 10px; }
.empty__icon  { font-size: 2.5rem; opacity: .4; margin-bottom: 6px; }
.empty__title { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; color: var(--c-text-mid); }
.empty__desc  { font-size: .875rem; color: var(--c-text-muted); max-width: 320px; line-height: 1.6; }

/* ─── FOOTER ─────────────────────────────────────── */
.footer { background: var(--c-primary); margin-top: auto; }
.footer__top  { padding: 48px 0 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 48px; }
.footer__brand-name { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: #fff; display: block; }
.footer__brand-sub  { font-size: .7rem; color: var(--c-accent); letter-spacing: .07em; text-transform: uppercase;
                       font-weight: 500; display: block; margin: 4px 0 14px; }
.footer__brand-desc { font-size: .85rem; color: rgba(255,255,255,.46); line-height: 1.7; font-weight: 300; max-width: 300px; }
.footer__col-title  { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
                       color: rgba(255,255,255,.38); margin-bottom: 16px; }
.footer__list li + li { margin-top: 10px; }
.footer__list a { font-size: .85rem; color: rgba(255,255,255,.6); transition: color var(--t); }
.footer__list a:hover { color: #fff; }
.footer__bottom { padding: 18px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__copy, .footer__note { font-size: .8rem; color: rgba(255,255,255,.3); }

/* ─── ADMIN LAYOUT ───────────────────────────────── */
.admin-wrap   { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--c-primary);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0;
  overflow-y: auto; z-index: 100;
}
.sidebar__brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__brand-name { font-family: var(--f-display); font-size: .95rem; font-weight: 700; color: #fff; display: block; }
.sidebar__brand-sub  { font-size: .65rem; color: var(--c-accent); text-transform: uppercase;
                        letter-spacing: .06em; font-weight: 500; display: block; margin-top: 3px; }
.sidebar__nav   { padding: 16px 12px; flex: 1; }
.sidebar__label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
                   color: rgba(255,255,255,.3); padding: 12px 8px 6px; display: block; }
.sidebar__link  {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: .8375rem; font-weight: 500; color: rgba(255,255,255,.7);
  transition: all var(--t); margin-bottom: 2px; white-space: nowrap;
}
.sidebar__link:hover, .sidebar__link.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar__link.active { color: var(--c-accent); }
.sidebar__link__icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar__footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__logout { display: flex; align-items: center; gap: 10px; width: 100%;
                   padding: 9px 12px; border-radius: var(--r-sm); font-size: .8375rem;
                   font-weight: 500; color: rgba(255,255,255,.55); transition: all var(--t); }
.sidebar__logout:hover { background: rgba(192,57,43,.2); color: #ff8a80; }

.admin-main   { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  background: var(--c-surface); border-bottom: 1px solid var(--c-border-lt);
  padding: 0 32px; height: 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--s-xs);
}
.admin-topbar__title { font-family: var(--f-display); font-size: 1.2rem; font-weight: 700; color: var(--c-primary); }
.admin-topbar__actions { display: flex; align-items: center; gap: 10px; }

.admin-content { padding: 32px; flex: 1; }

/* Stats row */
.stats-row  { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card  { background: var(--c-surface); border: 1px solid var(--c-border-lt); border-radius: var(--r-md);
               padding: 20px 22px; box-shadow: var(--s-xs); }
.stat-card__n { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; color: var(--c-primary); line-height: 1; }
.stat-card__l { font-size: .78rem; color: var(--c-text-muted); font-weight: 500; margin-top: 4px; text-transform: capitalize; }

/* Content table */
.content-table-wrap { background: var(--c-surface); border: 1px solid var(--c-border-lt);
                       border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--s-xs); }
.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px;
                 border-bottom: 1px solid var(--c-border-lt); flex-wrap: wrap; }
.table-toolbar__search { position: relative; flex: 1; min-width: 200px; }
.table-toolbar__search input {
  width: 100%; padding: 8px 12px 8px 36px; border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm); font-size: .8375rem; background: var(--c-bg);
  transition: border-color var(--t); outline: none;
}
.table-toolbar__search input:focus { border-color: var(--c-primary-lt); }
.table-toolbar__search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); }
.table-toolbar__filter select {
  padding: 8px 32px 8px 10px; border: 1.5px solid var(--c-border); border-radius: var(--r-sm);
  font-size: .8375rem; background: var(--c-bg); outline: none;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%237a9384' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; cursor: pointer;
  transition: border-color var(--t);
}
.table-toolbar__filter select:focus { border-color: var(--c-primary-lt); }

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--c-text-muted); padding: 10px 16px;
  background: var(--c-surface-2); border-bottom: 1px solid var(--c-border-lt);
}
tbody tr { border-bottom: 1px solid var(--c-border-lt); transition: background var(--t); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--c-surface-2); }
tbody td { padding: 12px 16px; font-size: .8375rem; color: var(--c-text); vertical-align: middle; }
.td-cover { width: 40px; height: 52px; object-fit: cover; border-radius: var(--r-sm); }
.td-cover-wrap { width: 50px; }
.td-title  { font-weight: 600; color: var(--c-primary); max-width: 220px; }
.td-title span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.td-author { color: var(--c-text-muted); }
.td-type-badge {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--c-primary); background: var(--c-primary-dim);
  border-radius: var(--r-pill); padding: 3px 9px;
}
.td-actions { display: flex; gap: 6px; }

/* ─── ADMIN LOGIN ────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
               background: var(--c-primary); padding: 24px; }
.login-card { background: var(--c-surface); border-radius: var(--r-xl); padding: 48px 44px;
               width: 100%; max-width: 420px; box-shadow: var(--s-xl); }
.login-card__logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-card__logo-icon { width: 44px; height: 44px; background: var(--c-primary); border-radius: 10px;
                          display: flex; align-items: center; justify-content: center; }
.login-card__logo-icon svg { color: var(--c-accent); }
.login-card__logo-text-name { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--c-primary); display: block; }
.login-card__logo-text-sub  { font-size: .7rem; color: var(--c-text-muted); display: block; }
.login-card__title { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700;
                      color: var(--c-primary); margin-bottom: 6px; }
.login-card__sub   { font-size: .875rem; color: var(--c-text-muted); margin-bottom: 30px; }
.login-error { display: none; font-size: .8375rem; color: var(--c-danger);
               background: var(--c-danger-dim); border: 1px solid rgba(192,57,43,.2);
               border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 18px; }
.login-error.visible { display: block; }

/* ─── FORM SYSTEM ────────────────────────────────── */
.form-page { padding: 32px; }
.form-card  { background: var(--c-surface); border: 1px solid var(--c-border-lt);
               border-radius: var(--r-lg); padding: 32px; max-width: 780px;
               box-shadow: var(--s-xs); }
.form-title { font-family: var(--f-display); font-size: 1.3rem; font-weight: 700;
               color: var(--c-primary); margin-bottom: 4px; }
.form-sub   { font-size: .875rem; color: var(--c-text-muted); margin-bottom: 28px; }
.form-divider { height: 1px; background: var(--c-border-lt); margin: 24px 0; }
.form-section-title { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
                       color: var(--c-text-muted); margin-bottom: 16px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group:last-of-type { margin-bottom: 0; }
.form-label { font-size: .8125rem; font-weight: 600; color: var(--c-text-mid); }
.form-label span { color: var(--c-danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm); font-size: .875rem; background: var(--c-bg);
  color: var(--c-text); outline: none; transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-primary-lt); background: #fff;
  box-shadow: 0 0 0 3px rgba(26,61,46,.06);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select   { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%237a9384' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
                  background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.form-file-wrap { position: relative; }
.form-file      { width: 100%; padding: 10px 14px; border: 1.5px dashed var(--c-border);
                   border-radius: var(--r-sm); font-size: .875rem; background: var(--c-bg);
                   cursor: pointer; transition: border-color var(--t); }
.form-file:hover { border-color: var(--c-primary-lt); }
.form-hint      { font-size: .76rem; color: var(--c-text-muted); }
.dynamic-fields { display: none; }
.dynamic-fields.visible { display: block; }
.form-actions   { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 24px;
                   border-top: 1px solid var(--c-border-lt); }

/* ─── UPLOAD ZONE ────────────────────────────────── */
.upload-zone {
  position: relative;
  border: 2px dashed var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-bg);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-zone:hover,
.upload-zone--drag {
  border-color: var(--c-primary-lt);
  background: var(--c-primary-dim);
}
.upload-zone--drag { border-style: solid; }

/* The invisible native input covers the entire zone */
.upload-zone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

/* Default body (icon + text) */
.upload-zone__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.upload-zone__icon { color: var(--c-text-muted); opacity: .6; }
.upload-zone__icon--pdf { color: var(--c-primary-lt); opacity: .8; }
.upload-zone__text {
  font-size: .8375rem;
  font-weight: 600;
  color: var(--c-text-mid);
  margin-top: 4px;
}
.upload-zone__hint {
  font-size: .75rem;
  color: var(--c-text-muted);
}

/* Preview state — image */
.upload-zone__preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.upload-zone__preview img {
  max-height: 180px;
  max-width: 100%;
  border-radius: var(--r-sm);
  object-fit: contain;
  box-shadow: var(--s-sm);
}

/* Preview state — PDF */
.upload-zone__preview--pdf {
  flex-direction: row;
  justify-content: space-between;
  padding: 16px 18px;
}
.pdf-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-primary);
}
.pdf-info__name {
  font-size: .8375rem;
  font-weight: 600;
  color: var(--c-primary);
  word-break: break-all;
  max-width: 200px;
}
.pdf-info__size {
  font-size: .75rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* Remove button */
.upload-zone__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t);
  flex-shrink: 0;
}
.upload-zone__preview--pdf .upload-zone__remove {
  position: static;
  background: var(--c-danger-dim);
  color: var(--c-danger);
}
.upload-zone__remove:hover { background: var(--c-danger); color: #fff; }


.text-muted  { color: var(--c-text-muted); font-size: .8375rem; }
.mt-4  { margin-top: 16px; }
.mb-4  { margin-bottom: 16px; }
.gap-2 { gap: 8px; }

/* Notification toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--c-primary); color: #fff; border-radius: var(--r-md);
  padding: 14px 20px; font-size: .875rem; font-weight: 500;
  box-shadow: var(--s-lg); display: flex; align-items: center; gap: 10px;
  transform: translateY(80px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  max-width: 340px;
}
.toast.show   { transform: translateY(0); opacity: 1; }
.toast--error { background: var(--c-danger); }

/* ─── ANIMATIONS ─────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1080px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform var(--t-slow); }
  .admin-sidebar.open { transform: none; box-shadow: var(--s-xl); }
  .admin-main { margin-left: 0; }
  .admin-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99; }
}
@media (max-width: 900px) {
  .footer__grid   { grid-template-columns: 1fr 1fr; }
  .form-row       { grid-template-columns: 1fr; }
  .content-grid   { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 720px) {
  :root { --header-h: 62px; }
  .header__toggle { display: flex; }
  .header__nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--c-primary); border-top: 1px solid rgba(255,255,255,.1);
    padding: 10px 0 14px; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  }
  .header__nav.open { display: block; }
  .header__nav-list { flex-direction: column; align-items: stretch; padding: 0 14px; gap: 2px; }
  .header__nav-link { display: block; padding: 10px 12px; }
  .hero { padding: 48px 0 44px; }
  .admin-content  { padding: 20px; }
  .admin-topbar   { padding: 0 20px; }
  .login-card     { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__stats  { flex-direction: column; gap: 14px; }
  .hero__stat-div { display: none; }
  .hero__stat   { padding: 0; }
  table { font-size: .78rem; }
  .td-cover-wrap, .td-author { display: none; }
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/usaqlar.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 31, 24, 0.80);
}
/* ═══════════════════════════════════════════════════════════════
   COMMENT SYSTEM — Student Ink Platform üçün xüsusi dizayn
   ═══════════════════════════════════════════════════════════════ */

/* ─── Comments Section ───────────────────────────────────────── */
.comments-section {
  border-top: 1px solid var(--c-border);
  margin-top: 16px;
  padding-top: 12px;
}

/* Toggle button - minimal lakin görünən */
.comments-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-mid);
  cursor: pointer;
  transition: all var(--t);
  text-align: left;
  font-family: inherit;
}

.comments-toggle:hover {
  background: var(--c-primary-dim);
  border-color: var(--c-primary-lt);
  color: var(--c-primary);
}

.comments-toggle__count {
  font-size: 0.7rem;
  background: var(--c-border);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-left: auto;
  color: var(--c-text-muted);
}

.comments-toggle:hover .comments-toggle__count {
  background: var(--c-primary-lt);
  color: #fff;
}

/* Comments body - açılan hissə */
.comments-body {
  padding: 18px 0 8px;
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  margin-top: 12px;
  padding: 18px;
}

/* Comments list */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  max-height: 380px;
  overflow-y: auto;
}

.comments-loading,
.comments-empty {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  padding: 24px;
  text-align: center;
  background: var(--c-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border-lt);
}

/* Hər bir yorum kartı */
.comment-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border-lt);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: all var(--t);
}

.comment-item:hover {
  border-color: var(--c-border);
  box-shadow: var(--s-xs);
}

.comment-item__header {
  display: flex;
-align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.comment-item__author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-primary);
  background: var(--c-primary-dim);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  display: inline-block;
}

.comment-item__date {
  font-size: 0.7rem;
  color: var(--c-text-muted);
}

.comment-item__body {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 4px;
}

/* Yorum formu */
.comment-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border-lt);
}

.comment-form__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 12px;
  background: var(--c-primary-dim);
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--r-pill);
}

.comment-form__input,
.comment-form__textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 0.85rem;
  color: var(--c-text);
  font-family: inherit;
  outline: none;
  transition: all var(--t);
  margin-bottom: 12px;
  resize: vertical;
}

.comment-form__input:focus,
.comment-form__textarea:focus {
  border-color: var(--c-primary-lt);
  box-shadow: 0 0 0 3px var(--c-primary-dim);
}

.comment-form__input::placeholder,
.comment-form__textarea::placeholder {
  color: var(--c-text-muted);
  opacity: 0.6;
}

.comment-form__footer {
  display: flex;
-align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-form__note {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  margin: 0;
  background: var(--c-surface-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

.comment-form__success {
  font-size: 0.8rem;
  color: var(--c-success);
  margin: 10px 0 0;
  font-weight: 600;
  background: rgba(39, 174, 96, 0.1);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-align: center;
}

.comment-form__error {
  font-size: 0.8rem;
  color: var(--c-danger);
  margin: 10px 0 0;
  font-weight: 600;
  background: var(--c-danger-dim);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-align: center;
}

/* Göndər düyməsi */
.comment-form button[type="submit"] {
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
}

.comment-form button[type="submit"]:hover {
  background: var(--c-primary-lt);
  transform: translateY(-1px);
}

.comment-form button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── ADMIN COMMENTS PAGE (style-ə uyğun) ───────────────────── */

/* Filter düymələri */
.comments-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text-mid);
  cursor: pointer;
  border-radius: var(--r-pill);
  transition: all var(--t);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--c-primary-lt);
  color: var(--c-primary);
  background: var(--c-primary-dim);
}

.filter-btn.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* Comments cədvəli */
#commentsTableBody tr {
  transition: background var(--t);
}

#commentsTableBody tr:hover {
  background: var(--c-surface-2);
}

#commentsTableBody td {
  padding: 14px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--c-border-lt);
}

/* Status badge-lər */
.td-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 600;
}

/* Action düymələri */
.td-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn--approve {
  background: var(--c-primary-dim);
  color: var(--c-primary);
  border: 1px solid var(--c-border);
}

.btn--approve:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.btn--danger {
  background: var(--c-danger-dim);
  color: var(--c-danger);
  border: 1px solid var(--c-border);
}

.btn--danger:hover {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
}

/* Comment stat kartları (admin dashboard üçün) */
.stats-row .stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-lt);
  border-radius: var(--r-md);
  padding: 20px 22px;
}

.stats-row .stat-card__n {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
}

.stats-row .stat-card__l {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Responsive düzəlişlər */
@media (max-width: 640px) {
  .comment-form__footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .comments-filter {
    justify-content: center;
  }
  
  .filter-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
  
  .comment-item__header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .comments-body {
    padding: 12px;
  }
}