    :root {
      --bg: #eef2f7;
      --surface: #ffffff;
      --ink: #0e2235;
      --body: #3a4a5c;
      --muted: #6c7d8e;
      --line: #e4eaf1;
      --primary: #11643f;
      --primary-700: #0c4b30;
      --primary-050: #e7f4ee;
      --accent: #16a06a;
      --accent-700: #0f7a50;
      --amber: #d98324;
      --r: 18px;
      --r-sm: 11px;
      --shadow-1: 0 1px 2px rgba(13, 41, 70, .05), 0 6px 18px rgba(13, 41, 70, .07);
      --shadow-2: 0 10px 34px rgba(13, 41, 70, .14);
      --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
      --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
      --maxw: 1280px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: var(--font-body);
      color: var(--body);
      background: var(--bg);
      -webkit-font-smoothing: antialiased;
      line-height: 1.55;
    }

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

    a {
      color: inherit;
      text-decoration: none;
    }

    :focus-visible {
      outline: 3px solid var(--accent);
      outline-offset: 2px;
      border-radius: 4px;
    }

    .wrap {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 0 22px;
    }

    /* ===== HEADER (ringkas: 1 jalur brand sahaja) ===== */
    .topbar-accent {
      height: 3px;
      background: linear-gradient(90deg, var(--accent) 0%, #11b58f 45%, var(--primary) 100%);
    }

    .brandbar {
      background: var(--surface);
      background-image: radial-gradient(120% 160% at 100% 0%, rgba(22, 160, 106, .07), transparent 58%);
      border-bottom: 1px solid var(--line);
    }

    .brandbar-inner {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 14px 22px;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .brand-logo {
      width: 56px;
      height: 56px;
      object-fit: contain;
      flex: none;
    }

    .brand-text {
      display: flex;
      flex-direction: column;
      line-height: 1.18;
      min-width: 0;
    }

    .brand-text strong {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: 19px;
      color: var(--ink);
      letter-spacing: -.2px;
    }

    .brand-text small {
      font-size: 12.5px;
      color: var(--muted);
      letter-spacing: .3px;
      margin-top: 3px;
    }

    .brand-actions {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 18px;
      flex: none;
    }

    .brand-actions .bl {
      font-size: 13px;
      font-weight: 600;
      color: var(--body);
      transition: color .18s;
      white-space: nowrap;
    }

    .brand-actions .bl:hover {
      color: var(--accent);
    }

    .brand-actions .btn-login {
      background: var(--accent);
      color: #fff;
      padding: 9px 20px;
      border-radius: 9px;
      font-weight: 700;
      font-size: 13px;
      transition: background .2s, transform .15s;
    }

    .brand-actions .btn-login:hover {
      background: var(--accent-700);
      transform: translateY(-1px);
    }

    /* ===== NAVBAR ===== */
    .navbar {
      position: sticky;
      top: 0;
      z-index: 50;
      background: var(--primary);
      background: linear-gradient(180deg, var(--primary) 0%, var(--primary-700) 100%);
      box-shadow: 0 2px 14px rgba(10, 44, 77, .28);
    }

    .navbar-inner {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 0 22px;
      display: flex;
      align-items: center;
      gap: 18px;
      min-height: 58px;
    }

    .menu-toggle {
      display: none;
      color: #fff;
      font-weight: 600;
      cursor: pointer;
      padding: 8px 10px;
      border-radius: 8px;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 2px;
    }

    .dropdown {
      position: relative;
    }

    .dropdown>a {
      display: block;
      color: #dfe9f4;
      font-size: 13.5px;
      font-weight: 600;
      letter-spacing: .4px;
      padding: 19px 15px;
      transition: color .2s, background .2s;
    }

    .dropdown:hover>a,
    .dropdown>a:focus-visible {
      color: #fff;
      background: rgba(255, 255, 255, .08);
    }

    .dropdown-content {
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 232px;
      background: #fff;
      border-radius: 12px;
      box-shadow: var(--shadow-2);
      padding: 8px;
      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition: all .22s ease;
      border: 1px solid var(--line);
    }

    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown-content a {
      display: block;
      color: var(--body);
      font-size: 13.5px;
      padding: 9px 12px;
      border-radius: 8px;
      transition: background .15s, color .15s;
    }

    .dropdown-content a:hover {
      background: var(--primary-050);
      color: var(--primary);
    }

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

    .nav-search input {
      width: 270px;
      max-width: 40vw;
      padding: 9px 14px;
      border: 1px solid transparent;
      border-radius: 9px;
      font-size: 13.5px;
      font-family: inherit;
      background: rgba(255, 255, 255, .14);
      color: #fff;
    }

    .nav-search input::placeholder {
      color: #c7d6e6;
    }

    .nav-search input:focus {
      outline: none;
      background: #fff;
      color: var(--ink);
      border-color: var(--accent);
    }

    .nav-search button {
      padding: 9px 18px;
      border: none;
      border-radius: 9px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      font-size: 13.5px;
      cursor: pointer;
      transition: background .2s, transform .15s;
    }

    .nav-search button:hover {
      background: var(--accent-700);
      transform: translateY(-1px);
    }

    .carian-terperinci {
      color: #cfe0f0;
      font-size: 12.5px;
      font-weight: 600;
      white-space: nowrap;
      border-bottom: 1px dotted #7fa3c6;
      padding-bottom: 1px;
    }

    .carian-terperinci:hover {
      color: #fff;
    }

    /* ===== HERO SLIDER (penuh lebar / full-bleed) ===== */
    .hero {
      max-width: none;
      margin: 0;
      padding: 0;
    }

    .hero-slider {
      position: relative;
      border-radius: 0;
      overflow: hidden;
      box-shadow: 0 6px 22px rgba(13, 41, 70, .12);
      background: linear-gradient(135deg, var(--primary), #08311f);
    }

    .hero-track {
      display: flex;
      transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    }

    .hero-track.no-anim {
      transition: none;
    }

    .hero-slide {
      min-width: 100%;
      background: linear-gradient(135deg, var(--primary), #08311f);
    }

    .hero-slide img {
      width: 100%;
      height: clamp(200px, 30vw, 380px);
      object-fit: cover;
    }

    .hero-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 50%;
      background: rgba(255, 255, 255, .82);
      color: var(--primary);
      font-size: 20px;
      cursor: pointer;
      display: grid;
      place-items: center;
      box-shadow: var(--shadow-1);
      transition: background .2s, transform .2s;
      z-index: 3;
    }

    .hero-arrow:hover {
      background: #fff;
      transform: translateY(-50%) scale(1.06);
    }

    .hero-arrow.prev {
      left: 16px;
    }

    .hero-arrow.next {
      right: 16px;
    }

    .hero-dots {
      position: absolute;
      bottom: 16px;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      gap: 9px;
      z-index: 3;
    }

    .hero-dots button {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: none;
      background: rgba(255, 255, 255, .55);
      cursor: pointer;
      padding: 0;
      transition: all .25s;
    }

    .hero-dots button.active {
      background: #fff;
      width: 26px;
      border-radius: 6px;
    }

    /* ===== SHARED SECTION HEADINGS ===== */
    main {
      max-width: var(--maxw);
      margin: 0 auto;
      padding: 0 22px;
    }

    .section {
      margin-top: 54px;
    }

    .sec-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 22px;
    }

    .sec-eyebrow {
      display: block;
      font-size: 12px;
      letter-spacing: 3px;
      font-weight: 600;
      color: var(--accent);
      margin-bottom: 6px;
    }

    .sec-title {
      font-family: var(--font-display);
      font-weight: 800;
      font-size: clamp(22px, 3vw, 30px);
      color: var(--ink);
      margin: 0;
      letter-spacing: -.3px;
    }

    .sec-line {
      flex: 1;
      height: 1px;
      background: var(--line);
      margin-bottom: 10px;
    }

    /* ===== ROW 1 — KATALOG BUKU ===== */
    .katalog-search {
      display: flex;
      gap: 10px;
      margin-bottom: 26px;
    }

    .katalog-search input {
      flex: 1;
      padding: 14px 18px;
      border: 1px solid var(--line);
      border-radius: var(--r-sm);
      background: var(--surface);
      font-size: 14.5px;
      font-family: inherit;
      color: var(--ink);
      box-shadow: var(--shadow-1);
    }

    .katalog-search input:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(17, 100, 63, .15);
    }

    .katalog-search button {
      padding: 0 34px;
      border: none;
      border-radius: var(--r-sm);
      background: var(--primary);
      color: #fff;
      font-weight: 700;
      font-size: 14.5px;
      cursor: pointer;
      transition: background .2s, transform .15s;
    }

    .katalog-search button:hover {
      background: var(--primary-700);
      transform: translateY(-1px);
    }

    .book-rail-wrap {
      position: relative;
    }

    .book-viewport {
      overflow: hidden;
      padding: 6px 2px 8px;
    }

    .book-track {
      display: flex;
      gap: 20px;
      transition: transform .45s cubic-bezier(.4, 0, .2, 1);
      will-change: transform;
    }

    .book-card {
      flex: 0 0 auto;
      width: 162px;
    }

    .book-cover {
      width: 162px;
      height: 232px;
      border-radius: 12px;
      box-shadow: var(--shadow-1);
      transition: transform .25s, box-shadow .25s;
      background: #dde6ef;
    }

    .book-card:hover .book-cover {
      transform: translateY(-6px);
      box-shadow: var(--shadow-2);
    }

    .book-title {
      display: block;
      margin-top: 12px;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
      line-height: 1.4;
    }

    .rail-arrow {
      position: absolute;
      top: 96px;
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      border-radius: 50%;
      background: #fff;
      color: var(--primary);
      font-size: 18px;
      cursor: pointer;
      display: grid;
      place-items: center;
      box-shadow: var(--shadow-2);
      z-index: 4;
      transition: transform .18s, background .18s, opacity .2s;
    }

    .rail-arrow:hover {
      background: var(--primary-050);
      transform: scale(1.07);
    }

    .rail-arrow.is-hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .rail-arrow.prev {
      left: -14px;
    }

    .rail-arrow.next {
      right: -14px;
    }

    /* ===== ROW 2 — 3 ROTATING CATEGORY CARDS ===== */
    .koleksi-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }

    .cat-card {
      --c: var(--primary);
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--r);
      box-shadow: var(--shadow-1);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform .25s, box-shadow .25s;
    }

    .cat-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-2);
    }

    .cat-card[data-cat="terkini"] {
      --c: var(--primary);
    }

    .cat-card[data-cat="eia"] {
      --c: var(--accent);
    }

    .cat-card[data-cat="akhbar"] {
      --c: var(--amber);
    }

    .cat-head {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 18px 12px;
    }

    .cat-badge {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.2px;
      color: #fff;
      background: var(--c);
      padding: 5px 11px;
      border-radius: 7px;
    }

    .cat-name {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 15px;
      color: var(--ink);
    }

    .cat-stage {
      position: relative;
      aspect-ratio: 4 / 3;
      background: #f3f6fa;
    }

    .cat-slide {
      position: absolute;
      inset: 0;
      opacity: 0;
      transition: opacity .55s ease;
      display: block;
    }

    .cat-slide.is-active {
      opacity: 1;
    }

    .cat-slide img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .cat-cap {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 30px 16px 14px;
      background: linear-gradient(180deg, transparent, rgba(8, 22, 38, .9));
      color: #fff;
    }

    .cat-cap h4 {
      margin: 0;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .cat-cap p {
      margin: 5px 0 0;
      font-size: 11.5px;
      color: #cfe0f0;
      letter-spacing: .3px;
    }

    .cat-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 13px 18px;
    }

    .cat-dots {
      display: flex;
      gap: 7px;
    }

    .cat-dots button {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      border: none;
      background: #d4deea;
      cursor: pointer;
      padding: 0;
      transition: all .25s;
    }

    .cat-dots button.active {
      background: var(--c);
      width: 22px;
      border-radius: 5px;
    }

    .cat-count {
      font-size: 11.5px;
      font-weight: 600;
      color: var(--muted);
    }

    .cat-progress {
      height: 3px;
      background: var(--line);
    }

    .cat-progress span {
      display: block;
      height: 100%;
      width: 0;
      background: var(--c);
    }

    .cat-progress span.run {
      animation: catFill 3s linear forwards;
    }

    @keyframes catFill {
      from {
        width: 0
      }

      to {
        width: 100%
      }
    }

    /* ===== ROW 3 — DIREKTORI (ICONS ONLY) ===== */
    .dir-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 26px;
    }

    .tab-btn {
      padding: 11px 22px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface);
      color: var(--body);
      font-weight: 600;
      font-size: 13px;
      letter-spacing: .4px;
      cursor: pointer;
      transition: all .2s;
    }

    .tab-btn:hover {
      border-color: var(--primary);
      color: var(--primary);
    }

    .tab-btn.active {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      box-shadow: var(--shadow-1);
    }

    .dir-panel {
      display: none;
    }

    .dir-panel.active {
      display: block;
      animation: fadeUp .4s ease;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(8px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    .dir-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
      gap: 20px;
    }

    .dir-item {
      display: grid;
      place-items: center;
    }

    .dir-item a {
      display: grid;
      place-items: center;
      width: 108px;
      height: 108px;
      border-radius: 50%;
      background: var(--surface);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-1);
      transition: transform .22s, box-shadow .22s, border-color .22s;
    }

    .dir-item a:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-2);
      border-color: var(--accent);
    }

    .dir-item img {
      width: 70px;
      height: 70px;
      object-fit: contain;
      border-radius: 50%;
    }

    /* ===== FOOTER (hijau korporat JAS) ===== */
    .site-footer {
      margin-top: 70px;
      background: linear-gradient(180deg, #11643f 0%, #0a3f29 100%);
      color: #cbe8d8;
      position: relative;
    }

    .site-footer::before {
      content: "";
      display: block;
      height: 4px;
      background: linear-gradient(90deg, #6ee7a8, var(--accent), #0f7a50);
    }

    .footer-main {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1.05fr;
      gap: 40px;
      padding: 56px 22px 44px;
    }

    .f-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 15px;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #7af0b8;
      margin: 0 0 22px;
      position: relative;
      padding-bottom: 12px;
    }

    .f-title::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 38px;
      height: 3px;
      border-radius: 2px;
      background: #6ee7a8;
    }

    .f-contact {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .f-contact li {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
      font-size: 14px;
      line-height: 1.65;
      color: #cbe8d8;
    }

    .f-contact li svg {
      width: 17px;
      height: 17px;
      fill: #6ee7a8;
      flex: none;
      margin-top: 4px;
    }

    .f-contact a {
      color: #e6f7ee;
      transition: color .18s;
    }

    .f-contact a:hover {
      color: #ffffff;
    }

    .f-hours {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .f-hours li {
      margin-bottom: 16px;
    }

    .f-hours .day {
      display: block;
      font-weight: 600;
      color: #eafaf1;
      font-size: 14px;
      margin-bottom: 3px;
    }

    .f-hours .time {
      font-size: 13.5px;
      color: #9fc7b0;
      line-height: 1.55;
    }

    .f-hours .closed {
      color: #ffc09b;
      font-weight: 600;
    }

    .f-social-col {
      text-align: center;
    }

    .f-social-col .f-title::after {
      left: 50%;
      transform: translateX(-50%);
    }

    .f-social {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-bottom: 26px;
    }

    .f-social a {
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: rgba(255, 255, 255, .12);
      border: 1px solid rgba(255, 255, 255, .16);
      display: grid;
      place-items: center;
      transition: transform .2s, background .2s, box-shadow .2s;
    }

    .f-social a:hover {
      background: rgba(255, 255, 255, .24);
      transform: translateY(-3px);
      box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
    }

    .f-social svg {
      width: 18px;
      height: 18px;
      fill: #fff;
    }

    .f-visitor {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      padding: 10px 20px;
      border: 1px solid rgba(255, 255, 255, .25);
      border-radius: 10px;
      font-size: 13.5px;
      font-weight: 600;
      color: #d8f3e4;
      background: rgba(255, 255, 255, .05);
    }

    .f-visitor svg {
      width: 16px;
      height: 16px;
      fill: #6ee7a8;
    }

    .f-visitor strong {
      color: #fff;
      font-family: var(--font-display);
      letter-spacing: 1px;
    }

    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, .12);
    }

    .footer-bottom-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 22px;
      font-size: 12.5px;
      color: #93b7a3;
    }

    .f-bottom-links {
      display: flex;
      gap: 22px;
    }

    .f-bottom-links a {
      color: #cbe8d8;
      transition: color .18s;
    }

    .f-bottom-links a:hover {
      color: #7af0b8;
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 960px) {
      .koleksi-row {
        grid-template-columns: 1fr;
        max-width: 460px;
        margin: 0 auto;
      }

      .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 32px 28px;
      }

      .f-social-col {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 820px) {
      .menu-toggle {
        display: block;
      }

      .nav-links {
        display: none;
        position: absolute;
        top: 58px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--primary-700);
        padding: 8px;
      }

      .nav-links.open {
        display: flex;
      }

      .dropdown>a {
        padding: 13px 14px;
      }

      .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, .06);
        border: none;
        margin: 4px 0 6px;
      }

      .dropdown-content a {
        color: #dfe9f4;
      }

      .dropdown-content a:hover {
        background: rgba(255, 255, 255, .12);
        color: #fff;
      }

      .nav-search {
        width: 100%;
        margin: 6px 0 4px;
      }

      .nav-search input {
        flex: 1;
        max-width: none;
      }

      .navbar-inner {
        flex-wrap: wrap;
        position: relative;
      }
    }

    @media (max-width: 640px) {
      .footer-main {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 44px 22px 36px;
      }

      .brand-actions .bl {
        display: none;
      }

      .brand-text strong {
        font-size: 16px;
      }

      .brand-logo {
        width: 46px;
        height: 46px;
      }

      .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
    }

    @media (max-width: 520px) {
      .katalog-search {
        flex-direction: column;
      }

      .katalog-search button {
        padding: 13px;
      }

      .carian-terperinci {
        display: none;
      }
    }

    @media (prefers-reduced-motion: reduce) {

      *,
      .hero-track {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
      }
    }

/* ============================================================
   INNER PAGES — content components (login, about, profile, …)
   Loaded on top of the shared design tokens + chrome.
   ============================================================ */
.inner-main { max-width: var(--maxw); margin: 0 auto; padding: 34px 22px 64px; min-height: 52vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--font-display); font-size: 27px; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.3px; }
.page-head .lead { color: var(--muted); margin: 7px 0 0; font-size: 15px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); margin-bottom: 22px; overflow: hidden; }
.panel-pad { padding: 24px 26px; }
.panel-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 18px; }

.prose { color: var(--body); line-height: 1.75; }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--ink); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .col-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--body); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 160, 106, .15);
}
.field input:disabled { background: #f3f6fa; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
.input-suffix { display: flex; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix .suffix { padding: 11px 13px; border: 1.5px solid var(--line); border-left: 0;
  border-radius: 0 10px 10px 0; background: #f3f6fa; color: var(--muted); font-size: 13px; white-space: nowrap; display: flex; align-items: center; }

.btn2 { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px; cursor: pointer; border: 1.5px solid transparent;
  transition: background .18s, transform .12s, color .15s, border-color .15s; text-decoration: none; }
.btn2.primary { background: var(--accent); color: #fff; }
.btn2.primary:hover { background: var(--accent-700); transform: translateY(-1px); }
.btn2.ghost { background: #fff; color: var(--body); border-color: var(--line); }
.btn2.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn2.block { width: 100%; justify-content: center; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

/* ---- Auth card ---- */
.auth-wrap { display: flex; justify-content: center; padding: 42px 22px 72px; min-height: 52vh; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2); overflow: hidden; align-self: flex-start; }
.auth-card.wide { max-width: 580px; }
.auth-head { background: linear-gradient(180deg, var(--primary), var(--primary-700)); color: #fff;
  padding: 20px 26px; font-family: var(--font-display); font-weight: 700; font-size: 18px; text-align: center; }
.auth-body { padding: 26px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--accent); font-weight: 600; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 6px; background: #eef2f7; padding: 5px; border-radius: 12px; margin-bottom: 20px; }
.tabs button { flex: 1; padding: 9px; border: 0; background: transparent; border-radius: 9px;
  font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-1); }
.tab-pane2 { display: none; }
.tab-pane2.active { display: block; }
.check-row { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 14px; color: var(--body); }

/* ---- Alerts / chips ---- */
.alert2 { padding: 11px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert2.err { background: #fdecec; color: #a12626; border: 1px solid #f4c9c9; }
.alert2.ok { background: var(--primary-050); color: var(--primary); border: 1px solid #bfe3d2; }
.chip { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--primary-050);
  color: var(--primary); font-size: 12px; font-weight: 600; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--body); }
.data-table tr:last-child td { border-bottom: 0; }

/* ---- List items (loans, announcements) ---- */
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.list-item .li-title:hover { color: var(--accent); }
.list-item .li-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.sub-head { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  font-weight: 700; margin: 24px 0 10px; }

/* ---- Link cards (resources / databases) ---- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.link-card { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; min-height: 160px; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-1);
  transition: transform .15s, box-shadow .15s; }
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.link-card img { max-height: 74px; width: auto; object-fit: contain; }
.link-card span { font-size: 13px; color: var(--muted); }

/* ---- Dashboard key/value ---- */
.kv-list { list-style: none; margin: 0 0 18px; padding: 0; }
.kv-list li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--body); flex-wrap: wrap; }
.kv-list li:last-child { border-bottom: 0; }
.kv-list .k { font-weight: 700; color: var(--ink); min-width: 130px; }

/* ---- Viewer ---- */
.viewer-stage { text-align: center; }
.viewer-stage img, .viewer-stage video { max-width: 100%; max-height: 80vh; border-radius: 12px; }
.viewer-stage iframe { width: 100%; height: 82vh; border: 0; border-radius: 12px; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.viewer-bar h1 { font-size: 18px; margin: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
