@import "tailwindcss";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap");
:root {
  --navy: #0b2447;
  --blue: #164e88;
  --sky: #1f86d5;
  --ice: #eef7ff;
  --line: #dfe8f1;
  --text: #142033;
  --muted: #6a788b;
  --green: #17855b;
  --red: #c63b43;
  --shadow: 0 18px 50px rgba(15, 45, 78, 0.09);
  --sidebar-start: #0a2546;
  --page-bg: #f4f7fa;
  --site-font: "Google Sans Thai", "Google Sans", "Google Sans Text", "Noto Sans Thai", system-ui, Tahoma, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  font-family: var(--site-font);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:not(:disabled),a.btn,.section-head button,.admin-link{transition:transform .16s ease,box-shadow .2s ease,filter .2s ease,background-color .2s ease,border-color .2s ease,color .2s ease}
button:not(:disabled):hover,a.btn:hover,.section-head button:hover,.admin-link:hover{transform:translateY(-2px);filter:brightness(1.035)}
button:not(:disabled):active,a.btn:active,.section-head button:active,.admin-link:active{transform:translateY(0) scale(.975);filter:brightness(.97)}
button:focus-visible,a:focus-visible{outline:3px solid #55b9ff88;outline-offset:3px}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(175deg, var(--sidebar-start), var(--blue));
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px 25px;
  border-bottom: 1px solid #ffffff20;
}
.brand strong,
.brand span {
  display: block;
}
.brand strong {
  font-size: 15px;
}
.brand span {
  font-size: 12px;
  color: #b9d5ed;
  margin-top: 2px;
}
.seal {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: linear-gradient(145deg, #4bb3ff, #0f71bd);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 20px #00152e70;
}
.admin-seal {
  background: linear-gradient(145deg, #ffc45b, #df7b1d);
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 22px;
}
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #caddf0;
  text-align: left;
  padding: 11px 13px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.nav-item span {
  width: 22px;
  text-align: center;
  font-size: 17px;
}
.nav-item:hover,
.nav-item.active {
  background: #ffffff13;
  color: #fff;
}
.nav-item:not(:disabled):hover{transform:translateX(4px);box-shadow:0 8px 20px #001b3940}
.nav-item:disabled{cursor:wait;opacity:.72}
.nav-item.active {
  box-shadow: inset 3px 0 #50b7ff;
}
.sidebar-foot {
  margin-top: auto;
  padding: 18px 7px 0;
  border-top: 1px solid #ffffff18;
}
.sidebar-foot small {
  display: block;
  color: #88a8c5;
  font-size: 10px;
  margin-top: 13px;
}
.admin-link {
  color: #ddecf9;
  background: transparent;
  border: 0;
  padding: 0;
}
.main {
  min-width: 0;
}
.topbar {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar b,
.topbar span {
  display: block;
}
.topbar span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.ghost {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--navy);
}
.hero {
  min-height: 460px;
  background: linear-gradient(125deg, #082747 0%, #0e4a7c 63%, #187bb7);
  color: white;
  padding: 65px clamp(35px, 7vw, 100px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  overflow: hidden;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #39a3ea;
}
.hero .eyebrow {
  color: #83d3ff;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.26;
  margin: 13px 0 20px;
  letter-spacing: -0.02em;
}
.hero p {
  color: #d1e6f5;
  line-height: 1.9;
  max-width: 680px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.btn {
  border: 0;
  border-radius: 11px;
  padding: 11px 18px;
  font-weight: 650;
}
.btn.primary {
  background: var(--sky);
  color: white;
  box-shadow: 0 8px 20px #005b9d4d;
}
.btn.light {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.hero-art {
  position: relative;
  height: 300px;
}
.orb {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    #ffffff40,
    #52b5e922 45%,
    #ffffff08
  );
  border: 1px solid #ffffff30;
  display: grid;
  place-items: center;
  font-size: 58px;
  position: absolute;
  right: 55px;
  top: 10px;
  box-shadow: 0 0 80px #45baff33;
}
.art-card {
  position: absolute;
  right: 120px;
  bottom: 44px;
  background: #fff;
  color: var(--navy);
  padding: 15px 18px;
  border-radius: 14px;
  box-shadow: 0 18px 45px #001b36aa;
  width: 220px;
}
.art-card b,
.art-card span {
  display: block;
}
.art-card span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.art-card.second {
  right: -20px;
  bottom: 112px;
}
.section,
.page-wrap,
.admin-page {
  padding: 38px clamp(24px, 4vw, 54px);
}
.section:nth-child(even) {
  background: #fff;
}
.section-head,
.module-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
}
.section-head h2,
.module-head h1 {
  margin: 0;
  font-size: 25px;
}
.section-head p,
.module-head p,
.page-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}
.section-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
}
.announcement-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.announcement {
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--sky);
  border-radius: 14px;
  padding: 18px;
}
.announcement span,
.product-card small,
.doc-card small {
  font-size: 11px;
  color: var(--sky);
  font-weight: 700;
}
.announcement h3 {
  margin: 8px 0;
}
.announcement p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.project-list {
  display: grid;
  gap: 16px;
}
.project-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(22, 58, 90, 0.04);
}
.project-image {
  min-height: 260px;
  aspect-ratio: auto;
  background: linear-gradient(145deg, #dbeefa, #b8d9ec);
  position: relative;
  display: grid;
  place-items: center;
  font-size: 42px;
  color: #2c78a6;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-image em {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #0a315dd9;
  color: white;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-style: normal;
}
.project-body {
  padding: 22px 24px;
}
.chips {
  display: flex;
  gap: 7px;
  margin-bottom: 7px;
}
.chips span,
.pill {
  background: var(--ice);
  color: var(--blue);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.chips .done,
.pill.green {
  background: #e8f7f0;
  color: var(--green);
}
.chips .progress,
.pill.blue {
  background: #fff3dd;
  color: #a5630b;
}
.project-body small {
  color: var(--muted);
}
.project-body h3 {
  font-size: 20px;
  margin: 8px 0 14px;
  line-height: 1.45;
}
.meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.project-body > button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 14px 0 0;
  font-weight: 700;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 270px));
  justify-content: start;
  gap: 17px;
}
.product-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px;
}
.product-card > div {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #e5f1f7;
  display: grid;
  place-items: center;
  font-size: 40px;
  color: #5996b7;
  overflow: hidden;
  margin-bottom: 14px;
}
.product-cover { position:relative; }
.product-cover > small { position:absolute; left:10px; bottom:10px; padding:4px 8px; border-radius:999px; color:white; background:#073b66d9; font-size:10px; font-weight:700; }
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card h3 {
  margin: 6px 0;
  font-size: 16px;
}
.product-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-project { display:block; margin:8px 0; color:#365b78; line-height:1.5; }
.product-card > button { margin-top:11px; border:0; border-radius:9px; padding:9px 12px; background:var(--blue); color:white; font-weight:700; cursor:pointer; }
.page-heading {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 18px;
}
.page-heading h1 {
  margin: 6px 0 0;
}
.filterbar {
  display: flex;
  gap: 9px;
  background: white;
  border: 1px solid var(--line);
  padding: 13px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.filterbar label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f8fb;
  border: 1px solid var(--line);
  padding: 0 13px;
  border-radius: 10px;
}
.filterbar input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  padding: 10px 0;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.doc-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  display: flex;
  gap: 15px;
}
.doc-icon {
  width: 50px;
  height: 58px;
  border-radius: 10px;
  background: #eaf5ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
.doc-card h3 {
  margin: 4px 0;
}
.doc-card p {
  color: var(--muted);
  font-size: 12px;
}
.doc-card a,
.danger-text {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.empty {
  text-align: center;
  padding: 70px 20px;
  background: white;
  border: 1px dashed #c9d6e1;
  border-radius: 16px;
  color: var(--muted);
}
.empty div {
  font-size: 35px;
}
.empty h3 {
  color: var(--text);
  margin-bottom: 4px;
}
.loading {
  height: 380px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #dce8f1;
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto;
}
.route-progress{position:fixed;right:26px;bottom:26px;z-index:120;min-width:235px;display:grid;grid-template-columns:34px 1fr;column-gap:11px;align-items:center;padding:14px 17px;border:1px solid #c6def0;border-radius:15px;background:#fffffff2;color:var(--navy);box-shadow:0 18px 45px #092f5750;backdrop-filter:blur(10px);animation:progress-in .2s ease-out}.route-progress .mini-spinner{grid-row:1 / 3;width:30px;height:30px;border:3px solid #dce8f1;border-top-color:var(--sky);border-radius:50%;animation:spin .7s linear infinite}.route-progress b,.route-progress small{display:block}.route-progress small{color:var(--muted)}
@keyframes progress-in{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media (max-width:760px){.route-progress{left:16px;right:16px;bottom:16px;min-width:0}}
.appearance-hero{background:linear-gradient(120deg,var(--blue),#6d55df)}
.appearance-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr);gap:22px;margin-top:20px;align-items:start}
.appearance-controls,.appearance-preview{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px;box-shadow:var(--shadow)}
.appearance-controls h2{margin:0 0 14px;color:var(--navy);font-size:18px}.appearance-controls h2:not(:first-child){margin-top:25px}
.appearance-controls>label{display:grid;gap:7px;margin-top:15px;font-weight:650}.appearance-controls input,.appearance-controls select{width:100%;border:1px solid #cad8e6;border-radius:11px;padding:11px 13px;background:#fff}
.color-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.color-grid label{display:grid;gap:7px;font-weight:650}.color-grid label div{display:grid;grid-template-columns:48px 1fr;gap:8px}.color-grid input[type=color]{height:45px;padding:4px;cursor:pointer}
.field-help{color:var(--muted);margin:-7px 0 10px}.appearance-controls>.btn{width:100%;margin-top:20px}
.appearance-preview{position:sticky;top:22px}.appearance-preview>small{display:block;margin-top:12px;color:var(--muted);text-align:center}
.browser-mock{overflow:hidden;border:1px solid #ccd9e4;border-radius:16px;background:#eef3f7}.browser-tab{height:54px;background:#e5ebf0;display:flex;align-items:center;gap:9px;padding:9px 14px;max-width:92%;border-radius:0 0 13px 0}.browser-tab img,.browser-tab span{width:30px;height:30px;border-radius:8px;object-fit:cover;display:grid;place-items:center;background:#fff;color:var(--blue);font-size:11px}.browser-tab b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preview-shell{display:grid;grid-template-columns:145px 1fr;min-height:330px}.preview-shell aside{padding:24px 14px;color:#fff;display:flex;flex-direction:column;gap:9px}.preview-shell aside strong{font-size:13px;margin-bottom:12px}.preview-shell aside i{font-style:normal;font-size:11px;padding:8px;border-radius:8px}.preview-shell main{padding:32px 24px}.preview-shell main h2{line-height:1.3;margin:11px 0;font-size:24px}.preview-shell main p{color:#667487;font-size:13px}.preview-shell main button{border:0;color:#fff;padding:10px 14px;border-radius:9px;margin-top:12px}
@media(max-width:1050px){.appearance-layout{grid-template-columns:1fr}.appearance-preview{position:static}}
@media(max-width:620px){.color-grid{grid-template-columns:1fr}.preview-shell{grid-template-columns:110px 1fr}.preview-shell main{padding:22px 16px}.preview-shell main h2{font-size:19px}}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background: #102c4b;
  color: #fff;
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 100;
}
.modal-bg {
  position: fixed;
  inset: 0;
  background: #09223b99;
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 25px;
  z-index: 90;
}
.detail-modal,
.form-modal,
.small-modal {
  background: white;
  border-radius: 20px;
  width: min(880px, 96vw);
  max-height: 92vh;
  overflow: auto;
  position: relative;
  box-shadow: 0 30px 80px #00172e66;
}
.modal-close {
  position: fixed;
  right: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  font-size: 25px;
  background: white;
  box-shadow: 0 8px 28px #00172e55;
  z-index: 1003;
}
.detail-hero {
  background: linear-gradient(125deg, #0b3158, #14689d);
  color: white;
  padding: 40px;
}
.detail-hero span {
  font-size: 11px;
  background: #ffffff22;
  padding: 6px 9px;
  border-radius: 8px;
}
.detail-hero h2 {
  font-size: 27px;
  margin: 12px 0 5px;
}
.detail-hero p {
  margin: 0;
  color: #c7e0ef;
}
.detail-content {
  padding: 28px 40px;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.detail-facts div {
  background: #f6f9fb;
  border-radius: 11px;
  padding: 13px;
}
.detail-facts small,
.detail-facts b {
  display: block;
}
.detail-facts small {
  color: var(--muted);
  margin-bottom: 5px;
}
.detail-content h3 {
  font-size: 16px;
  margin-top: 25px;
}
.activity {
  border-left: 3px solid var(--sky);
  background: #f5faff;
  border-radius: 0 10px 10px 0;
  padding: 12px 15px;
  margin-bottom: 9px;
}
.activity span,
.activity b,
.activity small {
  display: block;
}
.activity span {
  color: var(--sky);
  font-size: 11px;
}
.activity b {
  margin: 4px 0;
}
.muted {
  color: var(--muted);
}
.about-card,
.system-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 45px;
  box-shadow: var(--shadow);
}
.about-card h1 {
  font-size: 35px;
}
.about-card > p {
  line-height: 1.9;
  color: var(--muted);
  max-width: 850px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 30px;
}
.about-grid div {
  background: #f4f8fb;
  border-radius: 12px;
  padding: 18px;
}
.about-grid b,
.about-grid span {
  display: block;
}
.about-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 6px;
}
.login-page {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #195f95, #092541 60%);
  display: grid;
  place-items: center;
  padding: 25px;
}
.back-link {
  position: absolute;
  top: 25px;
  left: 25px;
  border: 0;
  background: transparent;
  color: white;
}
.login-card {
  background: white;
  border-radius: 22px;
  padding: 38px;
  width: min(420px, 94vw);
  box-shadow: 0 35px 90px #00182e99;
  text-align: center;
}
.login-card .seal {
  margin: 0 auto 20px;
}
.login-card h1 {
  margin: 6px 0;
}
.login-card p {
  color: var(--muted);
  font-size: 13px;
}
.login-card form,
.small-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card label,
.small-modal label,
.form-grid label {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}
.login-card input,
.small-modal input,
.small-modal select,
.form-grid input,
.form-grid select,
.tag-input input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  outline: 0;
  background: white;
}
.login-card input:focus,
.form-grid input:focus {
  border-color: var(--sky);
}
.login-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 18px;
}
.admin-page {
  padding-top: 30px;
}
.welcome {
  background: linear-gradient(115deg, #0b3158, #155f91);
  color: white;
  border-radius: 18px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.welcome h1 {
  margin: 5px 0;
}
.welcome p {
  margin: 0;
  color: #c8deed;
}
.status {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
}
.status.ok {
  background: #dff8ed;
  color: #08764c;
}
.status.warn {
  background: #fff2d6;
  color: #9e5f08;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 13px;
  margin: 17px 0;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
}
.stat > span {
  float: right;
  color: var(--sky);
  font-size: 21px;
}
.stat small,
.stat b {
  display: block;
}
.stat small {
  color: var(--muted);
  margin-bottom: 8px;
}
.stat b {
  font-size: 22px;
}
.table-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #eaf0f4;
  padding: 12px 14px;
  font-size: 12px;
  vertical-align: top;
}
th {
  background: #f4f8fb;
  color: #617184;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.row-actions {
  display: flex;
  gap: 5px;
}
.row-actions button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 5px 8px;
  color: var(--blue);
}
.row-actions .danger,
.danger-text {
  color: var(--red);
}
.system-card {
  max-width: 850px;
  margin: auto;
}
.system-card h2 {
  margin-top: 0;
}
.system-card > div:not(.export-grid) {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}
.system-card p {
  color: var(--muted);
  line-height: 1.8;
}
.export-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border: 0 !important;
}
.export-grid button {
  background: #f3f8fb;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
  text-align: left;
}
.export-grid b,
.export-grid span {
  display: block;
}
.export-grid b {
  font-size: 25px;
  color: var(--blue);
}
.export-grid span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.form-modal {
  overflow: hidden;
}
.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  background: white;
}
.form-head h2 {
  margin: 4px 0;
}
.form-head button {
  border: 0;
  background: #edf2f6;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 1003;
  background: white;
  box-shadow: 0 8px 28px #00172e55;
}
.form-scroll {
  padding: 22px 28px;
  max-height: calc(92vh - 150px);
  overflow: auto;
}
.form-scroll h3 {
  font-size: 14px;
  margin: 20px 0 10px;
  color: var(--navy);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.form-grid .span2 {
  grid-column: span 2;
}
.form-grid select:disabled {
  background: #eef2f5;
}
.tag-input {
  display: flex;
  gap: 7px;
}
.tag-input input {
  flex: 1;
}
.tag-input button,
.subhead button {
  border: 1px solid var(--line);
  background: white;
  color: var(--blue);
  border-radius: 9px;
  padding: 8px 12px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tags button {
  border: 0;
  background: #eaf5ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 5px 9px;
}
.subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.activity-form {
  background: #f3f9fd;
  border: 1px solid #d7eaf6;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.activity-form:nth-of-type(even) {
  background: #f1faf5;
}
.remove {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 11px;
  padding-top: 10px;
}
.upload-box {
  border: 1px dashed #8eb6d1;
  background: #f4faff;
  border-radius: 12px;
  padding: 22px;
  display: block;
  text-align: center;
  color: var(--blue);
  cursor: pointer;
}
.upload-box input {
  display: none;
}
.file-list {
  margin-top: 9px;
}
.file-list div {
  display: flex;
  gap: 9px;
  align-items: center;
  background: #f5f7f9;
  padding: 9px;
  border-radius: 8px;
  margin-bottom: 5px;
}
.file-list b {
  font-size: 12px;
  flex: 1;
}
.file-list button {
  border: 0;
  background: transparent;
}
.form-actions {
  border-top: 1px solid var(--line);
  padding: 15px 25px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: white;
}
.small-modal {
  padding: 35px;
  width: min(480px, 94vw);
}
.small-modal h2 {
  margin: 0;
}
.generic-card {
  background: white;
}
.danger-text {
  border: 0;
  background: transparent;
  padding: 0;
}
.admin .section {
  padding: 0;
  margin-top: 18px;
}
.admin .section:nth-child(even) {
  background: transparent;
}
.backup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.backup-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.backup-card.restore {
  border-top: 4px solid #e49a2f;
}
.backup-card.storage { border-top:4px solid #16a085; background:linear-gradient(160deg,#fff,#edfffa); }
.backup-card.storage .backup-icon { color:#08765f; background:#dff8f1; }
.storage-link { display:inline-flex; align-items:center; justify-content:center; color:white; background:linear-gradient(135deg,#0d8e72,#18ae8a); text-decoration:none; }
.backup-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--ice);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 800;
}
.backup-card h2 { margin: 18px 0 8px; }
.backup-card p {
  color: var(--muted);
  line-height: 1.8;
  min-height: 74px;
}
.backup-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 13px;
}
.backup-file {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #8eb6d1;
  background: #f4faff;
  color: var(--blue);
  border-radius: 11px;
  padding: 13px;
  margin-bottom: 10px;
  cursor: pointer;
}
.backup-file input { display: none; }
.backup-note {
  margin-top: 17px;
  background: #fff7e8;
  border: 1px solid #f0d29b;
  border-radius: 13px;
  padding: 16px 18px;
  color: #805511;
}
.backup-note b, .backup-note span { display: block; }
.backup-note span { font-size: 12px; margin-top: 4px; }
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
  .announcement-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .backup-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 15px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 12px;
  }
  .sidebar-foot {
    display: none;
  }
  .brand {
    padding-bottom: 12px;
  }
  .main {
    width: 100%;
  }
  .topbar {
    position: relative;
    padding: 0 18px;
  }
  .hero {
    padding: 42px 22px;
    min-height: auto;
  }
  .hero h1 {
    font-size: 32px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .section,
  .page-wrap,
  .admin-page {
    padding: 25px 16px;
  }
  .project-card {
    grid-template-columns: 1fr;
  }
  .project-image {
    min-height: 170px;
  }
  .product-grid,
  .doc-grid,
  .announcement-row,
  .about-grid,
  .detail-facts,
  .form-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span2 {
    grid-column: auto;
  }
  .section-head,
  .module-head,
  .welcome {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filterbar {
    flex-wrap: wrap;
  }
  .filterbar label {
    flex-basis: 100%;
  }
  .detail-content {
    padding: 22px;
  }
  .detail-hero {
    padding: 30px 22px;
  }
  .modal-bg {
    padding: 8px;
  }
  .form-scroll {
    padding: 15px;
  }
  .sidebar nav .nav-item {
    font-size: 12px;
  }
  .topbar .ghost {
    display: none;
  }
}

/* Government-university workspace visual language from the supplied reference. */
:root { --navy:#0e3f69; --blue:#1262a5; --sky:#1769aa; }
body { background:#eef3f8; }
.sidebar { background:#0e4778; }
.seal, .admin-seal { background:#eaf5ff; color:#0c416e; box-shadow:none; }
.nav-item:hover, .nav-item.active { background:#ffffff18; }
.nav-item.active { box-shadow:none; }
.hero { min-height:325px; margin:24px clamp(24px,4vw,54px) 0; border-radius:24px; background:linear-gradient(115deg,#12487a 0%,#1768a8 63%,#28a6dc); padding:32px; }
.hero { grid-template-columns:1.35fr .65fr; }
.hero h1 { font-size:clamp(30px,3vw,40px); }
.hero-badge { display:inline-block; border:1px solid #ffffff55; background:#ffffff14; border-radius:999px; padding:7px 12px; font-size:12px; }
.hero-house { height:190px; border:1px solid #ffffff38; background:#ffffff13; border-radius:22px; display:grid; place-items:center; font-size:68px; }
.hero-house img { width:100%; height:100%; object-fit:cover; border-radius:21px; display:block; }
.section,.page-wrap,.admin-page { padding:30px clamp(24px,4vw,54px); }
.project-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.project-card { display:block; }
.project-image { height:265px; min-height:0; }
.project-body h3 { font-size:17px; }
.filterbar select { min-width:180px; border:1px solid var(--line); background:white; border-radius:10px; padding:0 12px; color:var(--text); }
.admin-filter { padding:18px; align-items:end; }
.admin-filter label { flex-direction:column; align-items:stretch; background:white; border:0; padding:0; font-size:11px; font-weight:700; }
.admin-filter label input { border:1px solid var(--line); border-radius:9px; padding:11px 12px; margin-top:4px; }
.form-modal { width:min(1160px,97vw); }
.form-grid textarea,.entity-modal textarea { border:1px solid var(--line); border-radius:10px; padding:11px 12px; resize:vertical; }
th { text-transform:none; letter-spacing:0; }
.activity-title { display:flex; justify-content:space-between; align-items:center; background:#eaf3fb; margin:-18px -18px 16px; padding:12px 16px; }
.subhead.mini { margin-top:16px; }
.subhead small { display:block; color:var(--muted); font-size:11px; margin-top:3px; }
.kpi-row { display:grid; grid-template-columns:2fr 1fr 1fr 1fr auto; gap:8px; padding:9px 0; }
.kpi-row input { min-width:0; border:1px solid var(--line); border-radius:9px; padding:10px; }
.kpi-row .danger { border:0; border-radius:9px; padding:0 12px; background:#c93c40; color:white; }
.project-kpi { border-bottom:1px solid var(--line); }
.entity-modal { width:min(760px,96vw); padding:30px; }
.entity-modal .form-actions { position:static; margin:22px -30px -30px; }
.public-projects-wide .project-list { grid-template-columns:1fr; }
.public-projects-wide .project-card { display:grid; grid-template-columns:minmax(280px, 34%) minmax(0, 1fr); align-items:stretch; }
.public-projects-wide .project-image { width:100%; height:100%; min-height:300px; aspect-ratio:auto; }
.public-projects-wide .project-body { display:flex; flex-direction:column; justify-content:center; padding:24px 26px; }
.home-projects-wide .project-card { grid-template-columns:minmax(290px,35%) minmax(0,1fr); }
.home-projects-wide .project-image { min-height:310px; }
.stat-grid .stat { position:relative; overflow:hidden; border-top:4px solid #1769aa; }
.stat-grid .stat::after { content:""; position:absolute; width:70px; height:70px; right:-22px; top:-27px; border-radius:50%; background:#1769aa12; }
.stat-grid .stat:nth-child(2) { border-top-color:#7c5ce7; }
.stat-grid .stat:nth-child(3) { border-top-color:#00a6c7; }
.stat-grid .stat:nth-child(4) { border-top-color:#e59034; }
.stat-grid .stat:nth-child(5) { border-top-color:#16a085; }
.settings-page { background:radial-gradient(circle at 94% 2%,#dff5ff 0,transparent 24%),radial-gradient(circle at 5% 16%,#eee8ff 0,transparent 21%); }
.settings-hero { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:26px 28px; margin-bottom:20px; border-radius:20px; color:white; background:linear-gradient(115deg,#0d4779,#1769aa 58%,#7c5ce7); box-shadow:0 16px 38px #174d7a28; }
.settings-hero span { display:inline-block; padding:6px 10px; border:1px solid #ffffff45; background:#ffffff15; border-radius:999px; font-size:11px; }
.settings-hero h1 { margin:8px 0 3px; font-size:27px; }
.settings-hero p { margin:0; color:#eef8ff; }
.settings-hero .btn { border:1px solid #ffffff66; min-width:132px; }
.settings-actions { display:flex; gap:9px; flex-wrap:wrap; justify-content:flex-end; }
.settings-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; margin:-7px 0 20px; }
.settings-overview > div { padding:15px 18px; border:1px solid var(--line); border-radius:14px; background:white; box-shadow:0 8px 22px #174d7a0d; }
.settings-overview b,.settings-overview span { display:block; }
.settings-overview b { font-size:24px; color:var(--blue); }
.settings-overview span { margin-top:2px; color:var(--muted); font-size:12px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.settings-card { background:white; border:1px solid var(--line); border-top:4px solid var(--accent,#1769aa); border-radius:18px; overflow:hidden; box-shadow:0 9px 30px #224e7410; }
.settings-card header { display:grid; grid-template-columns:44px 1fr auto; gap:12px; align-items:center; padding:17px 18px; border-bottom:1px solid var(--line); background:linear-gradient(90deg,#f8fbfe,#fff); }
.settings-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:white; background:var(--accent,#1769aa); font-size:20px; box-shadow:0 6px 15px #193f6420; }
.settings-card h2 { font-size:16px; margin:0; }
.settings-card p { font-size:11px; color:var(--muted); margin:3px 0 0; }
.settings-card header button { border:0; background:var(--accent,#1769aa); color:white; border-radius:9px; padding:8px 12px; }
.settings-card table { min-width:0; }
.settings-empty { padding:18px; color:var(--muted); font-size:12px; text-align:center; }
.file-source { margin-top:20px; padding:18px; border:1px solid #cfe0ed; border-radius:16px; background:linear-gradient(135deg,#f7fbff,#f7f6ff); }
.file-source-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:13px; }
.file-source-title b,.file-source-title small { display:block; }
.file-source-title small { color:var(--muted); font-size:11px; margin-top:3px; }
.file-source-title > span { color:#1769aa; background:#e5f3ff; border-radius:999px; padding:5px 9px; font-size:10px; white-space:nowrap; }
.file-source-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.source-card { min-width:0; min-height:145px; padding:16px; border:1px dashed #96b9d5; border-radius:14px; background:white; display:flex; flex-direction:column; justify-content:center; cursor:pointer; }
.source-card > b,.source-card > small { display:block; }
.source-card > small { color:var(--muted); font-size:10px; margin-top:3px; }
.source-upload { background:linear-gradient(145deg,#eef8ff,#fff); }
.source-url { background:linear-gradient(145deg,#f4f0ff,#fff); cursor:default; }
.source-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:white; background:#1769aa; font-size:20px; margin-bottom:7px; }
.source-url .source-icon { background:#7c5ce7; }
.source-upload input[type=file] { width:100%; margin-top:10px; padding:7px; border:1px solid #cbdce9; background:white; border-radius:8px; font-size:10px; }
.url-add { display:grid; grid-template-columns:1fr auto; gap:7px; margin-top:10px; }
.url-add input { min-width:0; border:1px solid #d2caec; border-radius:8px; padding:9px 10px; }
.url-add button { border:0; border-radius:8px; background:#7c5ce7; color:white; padding:0 13px; font-weight:700; }
.source-items { display:grid; gap:8px; margin-top:12px; }
.source-item { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px 12px; border:1px solid #dbe6ef; border-radius:10px; background:white; }
.source-item b,.source-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.source-item b { font-size:11px; }
.source-item small { color:var(--muted); font-size:9px; margin-top:2px; }
.source-item > img { width:76px; height:58px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.source-item a { display:inline-block; margin-top:4px; color:#1769aa; font-size:10px; font-weight:700; }
.source-item button { border:0; color:#bd3338; background:#fff0f0; border-radius:7px; padding:6px 9px; }
.source-item .set-cover { display:inline-block; margin:5px 0 0 8px; color:#0b6ea8; background:#e7f4ff; font-size:10px; font-weight:700; }
.password-editor > div { display:grid; grid-template-columns:1fr auto auto; gap:7px; }
.password-editor > div button { border:1px solid var(--line); border-radius:9px; background:white; color:var(--blue); padding:0 10px; }
.password-editor > small { color:var(--muted); margin-top:5px; font-weight:400; }
@media (max-width:1050px) { .project-list { grid-template-columns:1fr; } .public-projects-wide .project-card { grid-template-columns:300px 1fr; } }
@media (max-width:760px) { .hero { margin:12px; grid-template-columns:1fr; } .filterbar select { min-height:44px; flex:1; } .kpi-row { grid-template-columns:1fr 1fr; } .settings-grid,.file-source-grid { grid-template-columns:1fr; } .settings-hero { align-items:flex-start; flex-direction:column; } .public-projects-wide .project-card { display:block; } .public-projects-wide .project-image { width:100%; height:auto; min-height:0; aspect-ratio:16 / 10; } }

/* Dense information pages remain readable on faculty office screens. */
.form-grid label,
.small-modal label,
.entity-modal label,
.owner-picker > label {
  font-size: 14px;
  font-weight: 700;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.small-modal input,
.small-modal select,
.entity-modal input,
.entity-modal select,
.entity-modal textarea {
  min-height: 45px;
  font-size: 15px;
}
table th { font-size: 13px; }
table td { font-size: 14px; }
table td small { font-size: 12px; }
.project-body p,
.detail-content p { font-size: 14px; }

.form-help {
  margin: -7px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.owner-picker {
  border: 1px solid #cfe0ed;
  border-radius: 14px;
  padding: 15px;
  background: #f8fbfe;
}
.owner-tools {
  display: grid;
  grid-template-columns: minmax(210px,.8fr) minmax(280px,1.2fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-top: 8px;
}
.owner-tools select,
.owner-tools textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: white;
}
.owner-tools button {
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  color: white;
  background: var(--blue);
  font-weight: 700;
}
.tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.tags button {
  border: 1px solid #b9d9ee;
  border-radius: 999px;
  padding: 6px 10px;
  color: #0e5c90;
  background: #eaf7ff;
}
.project-document-form {
  margin: 15px 0;
  padding: 18px;
  border: 1px solid #cfe0ed;
  border-radius: 15px;
  background: #fbfdff;
}
.project-document-form .file-source { margin-top: 14px; }
.project-activity-preview,
.table-activities {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.project-activity-preview span,
.table-activities span {
  display: block;
  padding: 5px 8px;
  border-radius: 7px;
  color: #30506d;
  background: #edf5fb;
  font-size: 12px;
}
.project-activity-preview span { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.status-badge { display:inline-flex; align-items:center; width:max-content; padding:4px 8px; border-radius:999px; font-size:10px; font-style:normal; font-weight:700; white-space:nowrap; background:#fff1d8; color:#9a5b00; }
.status-badge.completed { background:#e2f6ed; color:#087852; }
.status-switch-field { display:flex !important; flex-direction:column; gap:7px; }
.status-switch { min-height:45px; display:flex; align-items:center; gap:9px; padding:7px 12px; border:1px solid #ecd49d; border-radius:11px; color:#8a5500; background:#fff8e9; cursor:pointer; font-weight:700; }
.status-switch i { position:relative; width:42px; height:24px; flex:0 0 auto; border-radius:999px; background:#d4b36b; }
.status-switch i::after { content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; border-radius:50%; background:white; box-shadow:0 2px 5px #0002; transition:.2s; }
.status-switch.completed { border-color:#8bd5bc; color:#087852; background:#edfbf5; }
.status-switch.completed i { background:#17a178; }
.status-switch.completed i::after { transform:translateX(18px); }
.detail-documents { display:grid; gap:10px; }
.detail-documents article {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:13px 15px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f8fbfe;
}
.detail-documents b,
.detail-documents small { display:block; }
.detail-documents small { color:var(--muted); margin-top:2px; }
.detail-documents article > div:last-child { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.detail-documents a {
  text-decoration:none;
  color:white;
  background:var(--blue);
  border-radius:8px;
  padding:7px 10px;
  font-size:12px;
}
.detail-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-bottom:20px; }
.detail-gallery button { border:0; padding:0; height:130px; overflow:hidden; border-radius:11px; background:#eaf3fb; cursor:zoom-in; }
.detail-gallery img { width:100%; height:100%; object-fit:cover; }
.square-gallery button { width:100%; height:auto; aspect-ratio:1 / 1; }
.product-detail-modal { width:min(900px,94vw); }
.product-detail-head { display:grid; grid-template-columns:minmax(180px,240px) 1fr; gap:22px; align-items:center; padding:22px; background:linear-gradient(135deg,#eef8ff,#f6f2ff); border-bottom:1px solid var(--line); }
.product-detail-head h2 { margin:8px 0; font-size:24px; }
.product-detail-head p { color:var(--muted); line-height:1.7; }
.product-detail-cover { width:100%; aspect-ratio:1 / 1; display:grid; place-items:center; overflow:hidden; border-radius:16px; background:#dfeff7; color:#4c91b8; font-size:54px; }
.product-detail-cover img { width:100%; height:100%; object-fit:cover; }
.product-price { display:inline-block; margin-top:8px; padding:8px 12px; border-radius:9px; background:#e6f7ef; color:#087852; }
.lightbox { position:fixed; inset:0; z-index:1001; display:grid; place-items:center; background:#06182feF; }
.lightbox img { max-width:min(1200px,86vw); max-height:84vh; object-fit:contain; border-radius:10px; box-shadow:0 20px 70px #0008; }
.lightbox button { position:absolute; z-index:2; width:48px; height:48px; border:1px solid #ffffff66; border-radius:50%; background:#0b315dcc; color:white; font-size:30px; }
.lightbox-close { top:22px; right:25px; }
.lightbox-prev { left:25px; top:50%; }
.lightbox-next { right:25px; top:50%; }
.lightbox > span { position:absolute; bottom:18px; color:white; background:#0008; padding:6px 12px; border-radius:99px; }
.document-links { display:flex; flex-wrap:wrap; gap:7px; }
.document-links a { text-decoration:none; color:white; background:var(--blue); border-radius:8px; padding:7px 10px; font-size:11px; }
.document-file-actions { display:inline-flex; gap:5px; }
.document-links .download-button { background:#17835f; }
.url-button,.document-links .url-button { color:white !important; background:#ed8b24 !important; border-color:#ed8b24 !important; text-decoration:none; }
.external-image-links { margin:0 0 20px; padding:13px; border:1px solid #ffd3a3; border-radius:12px; background:#fff8ef; }
.external-image-links > b { display:block; margin-bottom:9px; }
.external-image-links > div { display:flex; flex-wrap:wrap; gap:7px; }
.detail-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:9px; margin-bottom:18px; }
.detail-kpis article { display:grid; gap:4px; padding:12px; border:1px solid var(--line); border-radius:11px; background:#f8fbfe; }
.detail-kpis span { color:var(--muted); font-size:12px; }
.linked-products { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; margin-bottom:18px; }
.linked-products > button { display:grid; grid-template-columns:72px 1fr; gap:11px; padding:10px; border:1px solid var(--line); border-radius:12px; text-align:left; color:inherit; background:#f8fbfe; cursor:pointer; }
.linked-products > button:hover { border-color:#4da5d6; box-shadow:0 8px 20px #16699a14; }
.linked-products img,.linked-products > button > span { width:72px; height:72px; border-radius:9px; object-fit:cover; display:grid; place-items:center; background:#e6f1f8; }
.linked-products small,.linked-products p { display:block; margin:3px 0 0; color:var(--muted); font-size:11px; }
.linked-products em { display:block; margin-top:5px; color:var(--blue); font-size:11px; font-style:normal; font-weight:700; }
.module-actions { display:flex; gap:8px; flex-wrap:wrap; }
.dashboard-filters,.report-filters { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)) auto; gap:9px; padding:14px; margin-bottom:18px; border:1px solid var(--line); border-radius:15px; background:white; }
.dashboard-filters select,.report-filters select { min-height:44px; padding:0 11px; border:1px solid var(--line); border-radius:10px; background:white; }
.dashboard-summary-grid,.report-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.bar-report { display:grid; gap:11px; padding:6px 0; }
.bar-report > div { display:grid; grid-template-columns:72px minmax(100px,1fr) 90px; align-items:center; gap:10px; }
.bar-report i { height:12px; border-radius:999px; overflow:hidden; background:#e8f1f7; }
.bar-report i b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#1769aa,#23a7d7); }
.bar-report strong { font-size:12px; text-align:right; }
.report-page { max-width:1480px; }
.report-heading { background:linear-gradient(125deg,#0b3158,#1769aa); color:white; }
.report-heading p { color:#dcefff; }
.report-filters { grid-template-columns:repeat(4,minmax(145px,1fr)) auto; }
.report-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:18px; }
.report-stat-grid > button { display:grid; grid-template-columns:42px 1fr; column-gap:10px; padding:16px; border:1px solid var(--line); border-radius:15px; text-align:left; color:inherit; background:white; box-shadow:0 8px 24px #174d7a0d; cursor:pointer; }
.report-stat-grid > button:nth-child(1),.report-stat-grid > button:nth-child(5){background:linear-gradient(145deg,#ffffff,#e8f6ff);border-color:#acd8f1}
.report-stat-grid > button:nth-child(2),.report-stat-grid > button:nth-child(6){background:linear-gradient(145deg,#ffffff,#fff3df);border-color:#f1d19b}
.report-stat-grid > button:nth-child(3),.report-stat-grid > button:nth-child(7){background:linear-gradient(145deg,#ffffff,#ebfbf3);border-color:#a9dfc5}
.report-stat-grid > button:nth-child(4),.report-stat-grid > button:nth-child(8){background:linear-gradient(145deg,#ffffff,#f4edff);border-color:#d2baf4}
.report-stat-grid > button:nth-child(2) > span,.report-stat-grid > button:nth-child(6) > span{background:linear-gradient(135deg,#e59034,#f3b54f)}
.report-stat-grid > button:nth-child(3) > span,.report-stat-grid > button:nth-child(7) > span{background:linear-gradient(135deg,#128768,#28bd8e)}
.report-stat-grid > button:nth-child(4) > span,.report-stat-grid > button:nth-child(8) > span{background:linear-gradient(135deg,#7150c8,#a071ed)}
.report-panels > section:nth-child(odd){border-top:4px solid #24a5d7}.report-panels > section:nth-child(even){border-top:4px solid #7c5ce7}
.report-stat-grid > button > span { grid-row:1 / 4; display:grid; place-items:center; width:42px; height:42px; border-radius:11px; color:white; background:linear-gradient(135deg,#1769aa,#25a5ce); }
.report-stat-grid small,.report-stat-grid b,.report-stat-grid em { display:block; }
.report-stat-grid b { font-size:22px; margin:3px 0; }
.report-stat-grid em { color:var(--blue); font-size:10px; font-style:normal; }
.report-panels { margin-bottom:16px; }
.report-panels > section,.report-project-list { padding:19px; border:1px solid var(--line); border-radius:16px; background:white; }
.report-panels h2,.report-project-list h2 { margin:0 0 14px; font-size:18px; }
.report-ranking { display:grid; gap:8px; }
.report-ranking > div { display:grid; grid-template-columns:1fr auto auto; gap:10px; padding:9px 11px; border-radius:9px; background:#f3f8fc; }
.report-ranking small { color:var(--muted); }
.report-tags { display:flex; flex-wrap:wrap; gap:7px; }
.report-tags span { padding:7px 10px; border-radius:999px; color:#155c86; background:#e8f5fd; font-size:12px; }
.report-project-list { display:grid; gap:7px; }
.report-project-list > button { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 13px; border:1px solid var(--line); border-radius:10px; text-align:left; color:inherit; background:#fbfdff; cursor:pointer; }
.report-project-list > button span { color:var(--muted); font-size:12px; }

.pagination,
.pagination-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:17px;
  color:var(--muted);
  font-size:13px;
}
.pagination > div { display:flex; flex-wrap:wrap; gap:6px; }
.page-slot { display:flex; align-items:center; gap:6px; }
.page-slot i { font-style:normal; padding:0 3px; }
.pagination button {
  min-width:38px;
  min-height:38px;
  border:1px solid var(--line);
  border-radius:9px;
  color:var(--navy);
  background:white;
}
.pagination button.active { border-color:#1769aa; color:white; background:#1769aa; }
.pagination button:disabled { opacity:.4; cursor:not-allowed; }

.export-page { background:radial-gradient(circle at 92% 3%,#dff6ff 0,transparent 23%),radial-gradient(circle at 7% 18%,#f0eaff 0,transparent 20%); }
.export-filter-card,
.export-field-card,
.export-ready {
  margin-top:16px;
  padding:22px;
  border:1px solid var(--line);
  border-radius:17px;
  background:white;
  box-shadow:var(--shadow);
}
.export-filter-card h2,
.export-field-card h2 { margin:0 0 13px; font-size:19px; }
.export-filters { grid-template-columns:2fr 1fr 1.2fr auto; align-items:end; }
.export-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.export-card-head p { margin:2px 0 0; color:var(--muted); }
.export-card-head > div:last-child { display:flex; gap:8px; }
.export-switch-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:17px; }
.export-switch {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
  padding:13px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f9fbfd;
  cursor:pointer;
}
.export-switch b,
.export-switch small { display:block; }
.export-switch small { color:var(--muted); margin-top:2px; font-weight:400; }
.export-switch input { position:absolute; opacity:0; pointer-events:none; }
.export-switch i {
  position:relative;
  width:44px;
  height:25px;
  border-radius:999px;
  background:#cbd7e1;
  transition:.2s;
}
.export-switch i::after {
  content:"";
  position:absolute;
  width:19px;
  height:19px;
  left:3px;
  top:3px;
  border-radius:50%;
  background:white;
  box-shadow:0 2px 5px #18354f33;
  transition:.2s;
}
.export-switch input:checked + i { background:#17a178; }
.export-switch input:checked + i::after { transform:translateX(19px); }
.export-ready {
  display:grid;
  grid-template-columns:150px 150px minmax(260px,1fr) auto;
  align-items:center;
  gap:14px;
  border-left:5px solid #21a4d7;
}
.export-ready > div:not(.export-actions) { padding:13px; border-radius:11px; background:#f2f8fc; }
.export-ready span,
.export-ready b { display:block; }
.export-ready b { margin-top:2px; color:var(--navy); font-size:24px; }
.export-ready p { color:var(--muted); }
.export-actions { display:flex; gap:8px; }
.danger-solid { color:white; background:#c63b43; }
.bulk-paste {
  display:block;
  margin-top:17px;
  padding:14px;
  border:1px dashed #8eb6d1;
  border-radius:12px;
  background:#f3faff;
}
.bulk-paste textarea { display:block; width:100%; margin-top:7px; }
.bulk-paste small { display:block; margin-top:6px; color:var(--muted); }

/* Warm playful theme inspired by the supplied cream, cocoa and pastel reference. */
:root { --navy:#3d2c22; --blue:#4f3829; --sky:#f07845; --ice:#f2f6e8; --line:#e7dccf; --text:#352a24; --muted:#756960; --green:#76964a; --red:#d95f58; --sidebar-start:#35251d; --page-bg:#f7f1e8; --olive:#9bb86b; --coral:#f47c48; --sun:#f4c84c; --lavender:#8d7bf2; }
body { background:radial-gradient(circle at 82% 4%,#efe8ff 0,transparent 22%),radial-gradient(circle at 8% 88%,#eaf2d9 0,transparent 24%),var(--page-bg); }
.sidebar { background:linear-gradient(175deg,#35251d,#533929 68%,#684630); }
.seal,.admin-seal { background:var(--sun); color:#3b2a20; border-radius:50%; box-shadow:0 7px 18px #23150f45; }
.brand { border-bottom-color:#ffffff26; }
.brand span,.sidebar-foot small { color:#eaded1; }
.nav-item { border-radius:13px; }
.nav-item:hover { background:#ffffff12; }
.nav-item.active { color:#302219; background:linear-gradient(135deg,#f3ce62,#f5a65f); box-shadow:0 8px 20px #1e120c38; }
.admin-link { border-color:#ffffff30; background:#ffffff0d; }
.topbar { background:#fffdf9e8; border-bottom-color:#e8dbce; backdrop-filter:blur(14px); }
.topbar b { color:#3c2b21; font-size:17px; }
.hero { color:#3b2b22; background:linear-gradient(120deg,#fffaf0 0%,#fff1ce 48%,#e7f0d2 100%); border:1px solid #ead8bd; box-shadow:0 18px 45px #60422b18; }
.hero p { color:#716052; }
.hero-badge { color:#5b402b; border-color:#dfc79f; background:#ffffffa6; }
.hero-house { border-color:#d9c6a8; background:linear-gradient(145deg,#ffffffc9,#f3ddbd); }
.btn.primary,.product-card > button { background:var(--blue); color:white; }
.btn.primary:hover,.product-card > button:hover { background:#684a35; }
.btn.light { border-color:#ddd0c3; background:#fffdf9; color:#4a3528; }
.section-head button,.ghost,.project-body > button { color:#6d4b34; }
.page-heading,.filterbar,.about-card,.stat,.doc-card,.project-card,.product-card,.report-stat-grid > button,.settings-card { border-color:var(--line); box-shadow:0 10px 28px #5c402614; }
.page-heading { background:linear-gradient(115deg,#fffdf8,#f4f7e9); }
.page-heading::after { content:""; display:block; width:66px; height:5px; margin-top:14px; border-radius:999px; background:linear-gradient(90deg,var(--coral),var(--sun),var(--olive)); }
.page-heading h1,.section-head h2,.module-head h1 { color:#3c2b21; }
.filterbar label { background:#fbf8f3; }
.filterbar select,.filterbar input { color:#44352c; }
.project-card { background:#fffefa; border-top:5px solid var(--olive); }
.project-card:nth-child(3n+2) { border-top-color:var(--coral); }
.project-card:nth-child(3n) { border-top-color:var(--lavender); }
.project-image { background:linear-gradient(145deg,#eef4dc,#f9e9d5); color:#799650; }
.project-image em { background:#493427e6; }
.chips span,.pill { color:#536b34; background:#edf3df; font-size:12px; }
.chips span:nth-child(2) { color:#9b542c; background:#fff0e5; }
.project-body h3 { font-size:22px; font-weight:750; line-height:1.42; letter-spacing:-.01em; }
.project-body small,.meta { font-size:13px; }
.product-card { border-top:5px solid var(--sun); background:#fffefa; }
.product-card:nth-child(3n+2) { border-top-color:var(--olive); }
.product-card:nth-child(3n) { border-top-color:var(--lavender); }
.product-card > div,.product-detail-cover { background:linear-gradient(145deg,#f4f0e9,#edf3dc); color:#718e4b; }
.product-cover > small { background:#493427e6; font-size:11px; }
.product-card h3 { color:#3b2b22; font-size:19px; font-weight:750; line-height:1.45; }
.product-card p,.product-project { font-size:13px; }
.product-project { color:#765943; }
.doc-card { border-left:5px solid var(--coral); background:#fffefa; }
.doc-card:nth-child(4n+2) { border-left-color:var(--olive); }
.doc-card:nth-child(4n+3) { border-left-color:var(--lavender); }
.doc-card:nth-child(4n) { border-left-color:var(--sun); }
.doc-icon { color:#543a2b; background:#f5e4cf; }
.doc-card h3 { color:#3b2b22; font-size:17px; font-weight:750; line-height:1.45; }
.doc-card p,.doc-card a,.danger-text { font-size:13px; }
.announcement { border-top:5px solid var(--sun); background:#fffefa; }
.announcement:nth-child(2n) { border-top-color:var(--lavender); }
.announcement span,.product-card small,.doc-card small { font-size:12px; }
.announcement h3 { font-size:18px; }
.announcement p { font-size:14px; }
.settings-page { background:radial-gradient(circle at 94% 2%,#f0e9ff 0,transparent 24%),radial-gradient(circle at 5% 16%,#eef4dc 0,transparent 21%); }
.settings-hero,.appearance-hero { background:linear-gradient(115deg,#453025 0%,#75513a 50%,#9bb86b 100%); }
.settings-card:nth-child(4n+1) { --accent:var(--olive) !important; }
.settings-card:nth-child(4n+2) { --accent:var(--coral) !important; }
.settings-card:nth-child(4n+3) { --accent:var(--lavender) !important; }
.settings-card:nth-child(4n) { --accent:#d6a62b !important; }
.stat-grid .stat { border-top-color:var(--olive); }
.stat-grid .stat:nth-child(2) { border-top-color:var(--coral); }
.stat-grid .stat:nth-child(3) { border-top-color:var(--lavender); }
.stat-grid .stat:nth-child(4) { border-top-color:var(--sun); }
.report-heading { background:linear-gradient(120deg,#453025,#75513a 58%,#9bb86b); }
.report-heading p { color:#f8eee6; }
.bar-report i { background:#eee5da; }
.bar-report i b { background:linear-gradient(90deg,var(--olive),var(--sun),var(--coral)); }
.detail-hero,.product-detail-head { background:linear-gradient(135deg,#fff8e9,#eef3df 60%,#eee9ff); }
.detail-content h3 { color:#443126; font-size:19px; }
.detail-facts small,.detail-kpis span,.linked-products small,.linked-products p { font-size:12px; }
.detail-facts b,.linked-products b { font-size:14px; }
.file-source { border-color:#dfd4c7; background:linear-gradient(135deg,#fffaf1,#f2f5e7); }
.source-upload { background:linear-gradient(145deg,#f0f5e3,#fff); }
.source-url { background:linear-gradient(145deg,#f0ecff,#fff); }
.source-icon { background:var(--olive); }
.source-url .source-icon,.url-add button { background:var(--lavender); }
.form-grid label,.small-modal label,.entity-modal label,.owner-picker > label { font-size:15px; }
.source-card > small,.file-source-title small,.source-item small { font-size:11px; }
table { font-size:14px; }
th { color:#664d3b; background:#f6efe6; }
td small { font-size:12px; }
.toast { z-index:1200; min-width:260px; padding:16px 20px 16px 48px; border:1px solid #ffffff30; background:#3f2c22; box-shadow:0 18px 48px #24171055; font-size:14px; font-weight:750; animation:toast-pop .22s ease-out; }
.toast::before { content:"✓"; position:absolute; left:17px; top:50%; transform:translateY(-50%); width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:#3c2b21; background:var(--sun); }
@keyframes toast-pop { from { opacity:0; transform:translateY(12px) scale(.96); } to { opacity:1; transform:none; } }
.project-body > button { display:inline-flex; align-items:center; justify-content:center; gap:9px; align-self:flex-start; margin-top:18px; padding:11px 18px; border:0; border-radius:11px; color:white; background:#4f3829; box-shadow:0 8px 18px #3d281b2d; transition:transform .18s ease,box-shadow .2s ease,background .2s ease; }
.project-body > button:hover { color:white; background:var(--coral); transform:translateY(-3px); box-shadow:0 13px 25px #d967372f; }
.project-body > button b { font-size:18px; transition:transform .18s ease; }
.project-body > button:hover b { transform:translateX(4px); }
.report-heading h1,.report-heading .eyebrow { color:#fff !important; text-shadow:0 1px 2px #2a1a1440; }
.report-heading .eyebrow { color:#ffe28a !important; }
.report-heading p { color:#fffaf4 !important; font-size:15px; }
.report-stat-grid > button { padding:20px; min-height:125px; }
.report-stat-grid > button > span { width:48px; height:48px; font-size:20px; }
.report-stat-grid small { color:#5f5148; font-size:14px; font-weight:700; }
.report-stat-grid b { color:#352a24; font-size:25px; }
.report-stat-grid em { color:#604332; font-size:12px; font-weight:750; }
.report-panels h2,.report-project-list h2 { font-size:20px; }
.report-ranking span,.report-ranking b,.report-ranking small,.report-tags span,.report-project-list b,.report-project-list span { font-size:14px; }
.product-card small.product-project { color:#654838; font-weight:650; }
.product-card h3 { color:#382820 !important; }
.product-detail-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; clear:both; }
.product-detail-actions .btn { position:static; display:inline-flex; align-items:center; width:auto; min-height:42px; margin:0; padding:10px 14px; white-space:nowrap; text-decoration:none; }
.linked-products > button { overflow:hidden; align-items:start; }
.linked-products > button > div { min-width:0; }
.linked-products b,.linked-products p { overflow-wrap:anywhere; }
.linked-products em { display:inline-flex; width:max-content; max-width:100%; padding:7px 10px; border-radius:8px; color:white; background:#4f3829; }
.form-actions .btn:disabled,.small-modal .btn:disabled { cursor:wait; opacity:.68; transform:none; }
.detail-hero { color:#352820; }
.detail-hero h2 { color:#352820; font-weight:800; text-shadow:none; }
.detail-hero p { color:#6f594a; font-size:15px; font-weight:600; }
.detail-hero > span { color:#fff; background:#4f3829; font-size:12px; font-weight:750; }
.login-card { width:min(460px,94vw); padding:42px; }
.login-card .eyebrow { font-size:13px; letter-spacing:.15em; }
.login-card h1 { font-size:27px; line-height:1.35; margin:10px 0 7px; }
.login-card p { font-size:15px; line-height:1.6; margin-bottom:18px; }
.login-card label { font-size:15px; gap:8px; }
.login-card input { min-height:48px; padding:13px 14px; font-size:15px; }
.login-card .btn { min-height:48px; font-size:16px; }
.login-card small { font-size:12px; line-height:1.55; }

@media (max-width:1050px) {
  .owner-tools { grid-template-columns:1fr 1fr; }
  .owner-tools button { min-height:44px; }
  .export-filters,
  .export-ready { grid-template-columns:1fr 1fr; }
  .export-switch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  body { font-size:14px; }
  .product-detail-head { grid-template-columns:1fr; padding:18px; }
  .product-detail-head h2 { font-size:22px; }
  .product-grid { grid-template-columns:1fr; }
  .settings-overview { grid-template-columns:1fr; }
  .owner-tools,
  .export-filters,
  .export-ready,
  .export-switch-grid { grid-template-columns:1fr; }
  .pagination { align-items:flex-start; flex-direction:column; }
  .detail-documents article,
  .export-card-head { align-items:flex-start; flex-direction:column; }
  .dashboard-filters,.report-filters,.dashboard-summary-grid,.report-panels,.report-stat-grid { grid-template-columns:1fr; }
  .report-project-list > button { align-items:flex-start; flex-direction:column; }
  .detail-documents article > div:last-child { justify-content:flex-start; }
}
.homepage-editor-card{max-width:980px;margin:22px auto;background:#fff;border:1px solid #dce8f3;border-radius:22px;padding:26px;box-shadow:0 16px 38px rgba(13,63,103,.08);display:grid;gap:20px}.homepage-editor-card label{display:grid;gap:8px}.homepage-editor-card label span{font-weight:800;color:#123d63}.homepage-editor-card textarea{width:100%;resize:vertical;border:1px solid #bfd2e3;border-radius:14px;padding:14px 16px;font:inherit;line-height:1.55}.homepage-copy-preview{padding:24px;border-radius:18px;background:linear-gradient(135deg,#0f4f86,#2ba8dc);color:#fff}.homepage-copy-preview small{color:#d9f4ff}.homepage-copy-preview h2{font-size:clamp(1.45rem,2.6vw,2.25rem);margin:8px 0}.homepage-copy-preview p{margin:0;color:#eefaff}
