/* ============================================================
   NDU E-LIBRARY — Design System
   Theme colors extracted directly from the NDU coat of arms:
     Sky Blue     #78c0e4  — shield background (dominant)
     Forest Green #00783c  — hills / grass
     Deep Navy    #00609c  — water / waves
     Amber        #e4903c  — banner ribbon
     Gold         #f0c300  — torch flame
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* ── Forest Green (hills/grass) ── */
  --ndu-green:       #00783c;
  --ndu-green-mid:   #006c30;
  --ndu-green-light: #009648;
  --ndu-green-dark:  #004d26;

  /* ── Deep Navy (water/waves) ── */
  --ndu-navy:        #00609c;
  --ndu-navy-dark:   #005490;
  --ndu-navy-light:  #0072b8;

  /* ── Sky Blue (shield background) ── */
  --ndu-sky:         #78c0e4;
  --ndu-sky-light:   #a8d8f0;
  --ndu-sky-pale:    #e4f4fb;

  /* ── Amber (banner ribbon) ── */
  --ndu-amber:       #e4903c;
  --ndu-amber-light: #f0a050;
  --ndu-amber-pale:  #fef3e6;

  /* ── Gold (torch flame) ── */
  --ndu-gold:        #f0c300;
  --ndu-gold-dark:   #c9a200;
  --ndu-gold-pale:   #fffbe6;

  /* ── Dark backgrounds ── */
  --ndu-dark:        #001a0d;
  --ndu-slate:       #0a2818;

  /* ── Page background: faint sky tint ── */
  --ndu-cream:       #f4fafd;

  /* ── Text ── */
  --text-primary:    #0d1e14;
  --text-secondary:  #2a4a38;
  --text-muted:      #5a7868;

  /* ── Borders & Surfaces ── */
  --border:          #c2d8e4;
  --border-light:    #e2f0f6;
  --surface:         #ffffff;
  --surface-alt:     #f0f8fc;

  /* ── Shadows (navy-tinted) ── */
  --shadow-sm:  0 1px 3px rgba(0,96,156,0.08),  0 1px 2px rgba(0,96,156,0.04);
  --shadow-md:  0 4px 16px rgba(0,96,156,0.12), 0 2px 6px rgba(0,96,156,0.06);
  --shadow-lg:  0 16px 48px rgba(0,96,156,0.15),0 4px 16px rgba(0,96,156,0.08);
  --shadow-xl:  0 32px 80px rgba(0,96,156,0.20);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================================
   BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--ndu-cream);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-mono { font-family: 'DM Mono', monospace; }

/* ================================================================
   LAYOUT
================================================================ */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1; }

/* ================================================================
   NAVBAR
   Gradient: deep navy → forest green (matches logo's water→hills)
   Bottom border: amber (matches the banner ribbon)
================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--ndu-navy-dark) 0%, var(--ndu-green-dark) 55%, var(--ndu-navy-dark) 100%);
  border-bottom: 3px solid var(--ndu-amber);
  box-shadow: 0 2px 24px rgba(0,0,0,0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.navbar-logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.navbar-logo img { height: 42px; width: auto; }
.navbar-brand-text { line-height: 1.2; }
.navbar-brand-name {
  font-size: 1.05rem; font-weight: 700; color: #fff;
  display: block; letter-spacing: -0.01em;
}
.navbar-brand-sub {
  font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--ndu-sky); display: block;
}

.navbar-links {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none; margin: 0; padding: 0;
}
.navbar-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none; font-size: 0.875rem; font-weight: 500;
  transition: color var(--transition); position: relative;
}
.navbar-links a::after {
  content: ''; position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px; background: var(--ndu-amber);
  transform: scaleX(0); transition: transform var(--transition); border-radius: 2px;
}
.navbar-links a:hover         { color: #fff; }
.navbar-links a:hover::after  { transform: scaleX(1); }
.navbar-links a.active        { color: var(--ndu-sky); }
.navbar-links a.active::after { transform: scaleX(1); background: var(--ndu-sky); }

.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-nav-login {
  padding: 0.45rem 1.2rem;
  border: 1.5px solid rgba(120,192,228,0.55);
  border-radius: 50px; color: var(--ndu-sky);
  font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: all var(--transition); white-space: nowrap;
}
.btn-nav-login:hover { background: var(--ndu-navy); border-color: var(--ndu-navy); color: #fff; }

.btn-nav-register {
  padding: 0.45rem 1.2rem;
  background: var(--ndu-amber); border: 1.5px solid var(--ndu-amber);
  border-radius: 50px; color: #fff;
  font-size: 0.8rem; font-weight: 700;
  text-decoration: none; transition: all var(--transition); white-space: nowrap;
}
.btn-nav-register:hover { background: var(--ndu-amber-light); transform: translateY(-1px); }

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.65rem 1.5rem;
  border-radius: 50px; font-size: 0.875rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  text-decoration: none; border: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap; user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--ndu-amber); outline-offset: 3px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* Green — forest */
.btn-primary { background: var(--ndu-green); color: #fff; border-color: var(--ndu-green); }
.btn-primary:hover { background: var(--ndu-green-light); border-color: var(--ndu-green-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Navy — water */
.btn-navy { background: var(--ndu-navy); color: #fff; border-color: var(--ndu-navy); }
.btn-navy:hover { background: var(--ndu-navy-light); transform: translateY(-1px); }

/* Amber — banner */
.btn-gold { background: var(--ndu-amber); color: #fff; border-color: var(--ndu-amber); }
.btn-gold:hover { background: var(--ndu-amber-light); transform: translateY(-1px); }

/* Gold — torch */
.btn-amber { background: var(--ndu-gold-dark); color: #fff; border-color: var(--ndu-gold-dark); }
.btn-amber:hover { background: var(--ndu-gold); border-color: var(--ndu-gold); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--ndu-green); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ndu-green); background: var(--surface-alt); }

.btn-outline-navy { background: transparent; color: var(--ndu-navy); border-color: var(--ndu-navy); }
.btn-outline-navy:hover { background: var(--ndu-sky-pale); }

.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

.btn-sm   { padding: 0.38rem 0.95rem; font-size: 0.78rem; }
.btn-lg   { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ================================================================
   CARDS
================================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-light); background: var(--surface-alt); }
.card-body   { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); background: var(--surface-alt); }

/* ================================================================
   FORMS
================================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 0.4rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.form-control {
  width: 100%; padding: 0.7rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: 'DM Sans', sans-serif;
  color: var(--text-primary); background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.form-control:focus {
  border-color: var(--ndu-navy);
  box-shadow: 0 0 0 3px rgba(0,96,156,0.12);
}
.form-control::placeholder { color: var(--text-muted); }

.input-group { position: relative; }
.input-icon {
  position: absolute; left: 0.85rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  font-size: 0.875rem; pointer-events: none;
}
.input-group .form-control { padding-left: 2.5rem; }
.input-suffix {
  position: absolute; right: 0.85rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  cursor: pointer; background: none; border: none; padding: 0; font-size: 0.85rem;
}
.input-suffix:hover { color: var(--text-primary); }

/* ================================================================
   BADGES
================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.65rem; border-radius: 50px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em;
}
.badge-green { background: #dcfce7; color: #14532d; }
.badge-blue  { background: var(--ndu-sky-pale); color: var(--ndu-navy); }
.badge-amber { background: var(--ndu-amber-pale); color: #92400e; }
.badge-gold  { background: var(--ndu-gold-pale); color: #7a4f00; }
.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-gray  { background: #f1f5f9; color: #475569; }

/* ================================================================
   TABLES
   Header: navy→green gradient (water→hills, like the logo)
================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-light); }
table { width: 100%; border-collapse: collapse; }
thead { background: linear-gradient(90deg, var(--ndu-navy) 0%, var(--ndu-green) 100%); }
thead th {
  padding: 0.85rem 1rem; text-align: left;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border-light); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }
tbody td { padding: 0.85rem 1rem; font-size: 0.875rem; color: var(--text-primary); vertical-align: middle; }

/* ================================================================
   HERO
   Background: deep navy → forest green, mimicking the logo shield
   Highlight text: sky blue from the shield background
================================================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: 580px; display: flex; align-items: center;
  background: linear-gradient(150deg, var(--ndu-navy-dark) 0%, var(--ndu-green-dark) 55%, var(--ndu-navy-dark) 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1507842217121-9e93c8aaf27c?q=80&w=1920&auto=format&fit=crop');
  background-size: cover; background-position: center; opacity: 0.15;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(0,84,144,0.90) 0%,
    rgba(0,77,38,0.88)  50%,
    rgba(0,26,13,0.92)  100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(228,144,60,0.18); border: 1px solid rgba(228,144,60,0.5);
  border-radius: 50px; padding: 0.35rem 1rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ndu-amber-light); margin-bottom: 1.25rem;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700;
  color: #fff; line-height: 1.15; margin-bottom: 1.25rem; letter-spacing: -0.02em;
}
/* Sky blue highlight — the dominant shield color */
.hero-title span { color: var(--ndu-sky); }
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,0.78); max-width: 540px; margin-bottom: 2.25rem; line-height: 1.7; }

.hero-search {
  background: rgba(255,255,255,0.10); backdrop-filter: blur(20px);
  border: 1px solid rgba(120,192,228,0.3); border-radius: 20px;
  padding: 1.25rem; max-width: 560px;
}
.hero-search form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-search .form-control {
  flex: 1; min-width: 200px;
  background: rgba(255,255,255,0.92); border-color: transparent;
}
.hero-search .form-control:focus {
  background: #fff; border-color: var(--ndu-amber);
  box-shadow: 0 0 0 3px rgba(228,144,60,0.22);
}
.hero-search-hint { font-size: 0.7rem; color: rgba(255,255,255,0.6); margin-top: 0.6rem; }

/* ================================================================
   STATS BAR
================================================================ */
.stats-bar { background: var(--surface); border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.stat-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.5rem; border-right: 1px solid var(--border-light);
}
.stat-item:last-child { border-right: none; }
.stat-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.stat-icon-green { background: linear-gradient(135deg, var(--ndu-green), var(--ndu-green-light)); color: #fff; }
.stat-icon-navy  { background: linear-gradient(135deg, var(--ndu-navy), var(--ndu-navy-light));  color: #fff; }
.stat-icon-amber { background: linear-gradient(135deg, var(--ndu-amber), var(--ndu-amber-light)); color: #fff; }
.stat-icon-gold  { background: linear-gradient(135deg, var(--ndu-gold-dark), var(--ndu-gold));   color: #fff; }
.stat-value { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* ================================================================
   BOOK CARDS
================================================================ */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.5rem; }

.book-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
  border-top: 3px solid var(--ndu-amber);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book-cover { position: relative; height: 180px; overflow: hidden; background: var(--surface-alt); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.book-card:hover .book-cover img { transform: scale(1.06); }
.book-cover-badge { position: absolute; top: 0.65rem; right: 0.65rem; }
.book-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; }
.book-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-author { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.book-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; margin-bottom: 1rem; }
.book-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }

/* ================================================================
   DASHBOARD
================================================================ */
.dashboard-layout { display: flex; min-height: calc(100vh - 70px); }
.dashboard-sidebar {
  width: 260px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--ndu-navy-dark) 0%, var(--ndu-green-dark) 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto;
}
.dashboard-main { flex: 1; padding: 2rem; background: var(--ndu-cream); overflow-y: auto; }

.sidebar-user { padding: 1.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ndu-amber), var(--ndu-green));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; color: #fff;
  margin-bottom: 0.75rem; flex-shrink: 0;
}
.sidebar-username { font-size: 0.9rem; font-weight: 600; color: #fff; }
.sidebar-role { font-size: 0.7rem; color: var(--ndu-sky); text-transform: uppercase; letter-spacing: 0.08em; }

.sidebar-nav { padding: 1rem 0; flex: 1; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.25rem; color: rgba(255,255,255,0.65);
  text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition); border-left: 3px solid transparent;
}
.sidebar-nav-item:hover { color: #fff; background: rgba(120,192,228,0.08); }
.sidebar-nav-item.active { color: var(--ndu-sky); background: rgba(120,192,228,0.12); border-left-color: var(--ndu-amber); }
.sidebar-nav-icon { width: 18px; text-align: center; font-size: 0.9rem; }
.sidebar-section-title { padding: 0.85rem 1.25rem 0.35rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.3); font-weight: 600; }

/* ================================================================
   DASHBOARD STAT CARDS
================================================================ */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 1rem;
}
.stat-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-card-icon-green { background: linear-gradient(135deg, var(--ndu-green), var(--ndu-green-light)); color: #fff; }
.stat-card-icon-blue  { background: linear-gradient(135deg, var(--ndu-navy), var(--ndu-navy-light));   color: #fff; }
.stat-card-icon-amber { background: linear-gradient(135deg, var(--ndu-amber), var(--ndu-amber-light)); color: #fff; }
.stat-card-icon-gold  { background: linear-gradient(135deg, var(--ndu-gold-dark), var(--ndu-gold));    color: #fff; }
.stat-card-icon-red   { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.stat-card-num   { font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-card-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ================================================================
   ALERTS
================================================================ */
.alert { padding: 0.85rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.84rem; display: flex; align-items: flex-start; gap: 0.65rem; border: 1px solid; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-error   { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.alert-warning { background: var(--ndu-amber-pale); color: #92400e; border-color: #fed7aa; }
.alert-info    { background: var(--ndu-sky-pale); color: var(--ndu-navy); border-color: var(--ndu-sky-light); }

/* ================================================================
   SECTION HEADERS
================================================================ */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ndu-amber); font-weight: 600; display: block; margin-bottom: 0.35rem; }
.section-title { font-family: 'Playfair Display',serif; font-size: clamp(1.5rem,3vw,2rem); font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.section-desc  { font-size: 0.875rem; color: var(--text-muted); max-width: 500px; margin-top: 0.35rem; }

/* ================================================================
   FOOTER
   Deep navy→forest green gradient, amber top border (banner)
================================================================ */
.footer {
  background: linear-gradient(150deg, var(--ndu-navy-dark) 0%, var(--ndu-green-dark) 100%);
  color: rgba(255,255,255,0.8); padding: 3.5rem 0 0;
  border-top: 3px solid var(--ndu-amber);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand-name { font-size: 1.05rem; font-weight: 700; color: #fff; }
.footer-brand-sub  { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ndu-sky); }
.footer-desc       { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.7; margin-top: 0.75rem; }
.footer-heading    { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ndu-amber); margin-bottom: 1rem; font-weight: 600; }
.footer-links      { list-style: none; padding: 0; margin: 0; }
.footer-links li   { margin-bottom: 0.5rem; }
.footer-links a    { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.84rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--ndu-sky); }
.footer-bottom { padding: 1.25rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-copyright { font-size: 0.78rem; color: rgba(255,255,255,0.4); }
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); font-size: 0.8rem;
  text-decoration: none; transition: all var(--transition);
}
.footer-social a:hover { background: var(--ndu-amber); color: #fff; }

/* ================================================================
   AUTH PAGES
================================================================ */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel-left {
  background: linear-gradient(160deg, var(--ndu-navy-dark) 0%, var(--ndu-green-dark) 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding: 3rem;
}
.auth-panel-left::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?q=80&w=1200&auto=format&fit=crop');
  background-size: cover; background-position: center; opacity: 0.1;
}
.auth-panel-right { background: var(--ndu-cream); display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; overflow-y: auto; }
.auth-form-box   { width: 100%; max-width: 440px; }
.auth-form-title { font-family: 'Playfair Display',serif; font-size: 1.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.35rem; }
.auth-form-desc  { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 2rem; }

/* ================================================================
   MODAL
================================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); max-width: 520px; width: 100%;
  overflow: hidden; transform: translateY(12px); transition: transform var(--transition);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-header {
  background: linear-gradient(90deg, var(--ndu-navy), var(--ndu-green));
  padding: 1.5rem; display: flex; align-items: center; justify-content: space-between;
}
.modal-close {
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; transition: background var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.22); }
.modal-body { padding: 1.5rem; }

/* ================================================================
   DIGITAL ID CARD
================================================================ */
.digital-id {
  background: linear-gradient(135deg, var(--ndu-navy) 0%, var(--ndu-green) 60%, var(--ndu-green-light) 100%);
  border-radius: var(--radius); padding: 1.5rem; color: #fff;
  position: relative; overflow: hidden;
  border: 2px solid rgba(228,144,60,0.45);
}
.digital-id::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.digital-id::after {
  content: ''; position: absolute; bottom: -40px; left: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(228,144,60,0.12);
}

/* ================================================================
   PAGE INTRO STRIP
   Navy→green gradient, amber bottom border
================================================================ */
.page-intro {
  background: linear-gradient(90deg, var(--ndu-navy) 0%, var(--ndu-green) 100%);
  padding: 2.5rem 0; color: #fff;
  border-bottom: 3px solid var(--ndu-amber);
}
.page-intro-title { font-family: 'Playfair Display',serif; font-size: 1.8rem; font-weight: 700; color: #fff; margin-bottom: 0.35rem; }
.page-intro-desc  { font-size: 0.875rem; color: rgba(255,255,255,0.78); }

/* ================================================================
   CATALOG SIDEBAR
================================================================ */
.catalog-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }
.catalog-sidebar {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem;
  position: sticky; top: 90px;
  border-top: 3px solid var(--ndu-green);
}
.filter-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; margin-bottom: 0.75rem; }
.filter-group { margin-bottom: 1.5rem; }
.filter-item  { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-secondary); padding: 0.25rem 0; cursor: pointer; }
.filter-item input[type="checkbox"] { accent-color: var(--ndu-green); width: 14px; height: 14px; }
.filter-item:hover { color: var(--ndu-green); }

/* ================================================================
   STEPS
================================================================ */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.step-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 2rem 1.5rem; position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  border-bottom: 3px solid var(--ndu-amber);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number { font-family: 'Playfair Display',serif; font-size: 3.5rem; font-weight: 700; color: rgba(0,96,156,0.07); position: absolute; top: 1rem; right: 1.25rem; line-height: 1; }
.step-icon  { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1.25rem; }
.step-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.step-desc  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* ================================================================
   PAGINATION
================================================================ */
.pagination { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-secondary); font-size: 0.82rem; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: all var(--transition);
}
.page-btn:hover { border-color: var(--ndu-navy); color: var(--ndu-navy); }
.page-btn.active { background: var(--ndu-navy); border-color: var(--ndu-navy); color: #fff; }

/* ================================================================
   BREADCRUMB
================================================================ */
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--ndu-navy); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }

/* ================================================================
   SPINNER
================================================================ */
.spinner { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }

.animate-in         { animation: fadeInUp 0.5s ease-out forwards; }
.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ================================================================
   UTILITIES
================================================================ */
.text-center  { text-align: center; }
.text-green   { color: var(--ndu-green); }
.text-navy    { color: var(--ndu-navy); }
.text-sky     { color: var(--ndu-sky); }
.text-amber   { color: var(--ndu-amber); }
.text-gold    { color: var(--ndu-gold-dark); }
.text-muted   { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }   .mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }   .mt-3 { margin-top: 1.5rem; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: 1.5rem 0; }

/* ================================================================
   MOBILE MENU
================================================================ */
.mobile-menu { display: none; background: var(--ndu-navy-dark); border-top: 1px solid rgba(255,255,255,0.08); }
.mobile-menu.open { display: block; }
.mobile-menu-inner { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a {
  display: block; padding: 0.7rem 0; color: rgba(255,255,255,0.75);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06); transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--ndu-sky); }
.mobile-menu-toggle { display: none; background: none; border: none; color: rgba(255,255,255,0.82); font-size: 1.25rem; cursor: pointer; padding: 0.25rem; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
  .footer-grid       { grid-template-columns: 1fr 1fr; }
  .auth-layout       { grid-template-columns: 1fr; }
  .auth-panel-left   { display: none; }
  .dashboard-sidebar { display: none; }
  .dashboard-layout  { flex-direction: column; }
  .dashboard-main    { padding: 1.5rem; }
}
@media (max-width: 900px) {
  .catalog-layout  { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
}
@media (max-width: 768px) {
  .navbar-links       { display: none; }
  .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .navbar-actions     { gap: 0.5rem; }
  .stats-grid         { grid-template-columns: 1fr; }
  .stat-item          { border-right: none; border-bottom: 1px solid var(--border-light); }
  .stat-item:last-child { border-bottom: none; }
  .hero               { min-height: 460px; }
  .books-grid         { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .footer-grid        { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-header     { flex-direction: column; align-items: flex-start; }
  .dashboard-stats    { grid-template-columns: repeat(2,1fr); }
  .steps-grid         { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .books-grid       { grid-template-columns: 1fr; }
  .btn-nav-login, .btn-nav-register { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
  .hero-search form { flex-direction: column; }
  .dashboard-stats  { grid-template-columns: 1fr; }
  .container, .container-sm { padding: 0 1rem; }
  .card-body        { padding: 1.25rem; }
  .hero-search      { padding: 1rem; }
}
