:root {
  color-scheme: dark;
  --bg: #080809;
  --surface: rgba(20, 20, 22, 0.92);
  --surface-2: #1a1a1d;
  --surface-3: #222226;
  --line: #353238;
  --text: #f3f0e8;
  --muted: #a7a3a0;
  --gold: #d3ad62;
  --gold-light: #f0d18a;
  --gold-dark: #8b652b;
  --danger: #e46d6d;
  --success: #74c991;
  --warning: #e2b963;
  --radius: 18px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -20%, rgba(211, 173, 98, 0.12), transparent 38%),
    linear-gradient(180deg, #09090a 0%, #050506 100%);
  color: var(--text);
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.ambient { position: fixed; border-radius: 999px; filter: blur(100px); pointer-events: none; opacity: .2; }
.ambient-one { width: 420px; height: 420px; background: #7c5a24; left: -210px; top: 30%; }
.ambient-two { width: 360px; height: 360px; background: #5d4932; right: -180px; bottom: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(211, 173, 98, 0.14);
  background: rgba(8, 8, 9, 0.82);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .12em; }
.brand img { filter: drop-shadow(0 8px 18px rgba(211, 173, 98, .18)); }
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; color: var(--gold-light); }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; letter-spacing: .3em; }
.top-nav { display: flex; align-items: center; gap: 10px; }
.nav-link { text-decoration: none; color: var(--muted); padding: 10px 13px; border-radius: 10px; font-size: .9rem; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,.05); }
.nav-button { border: 1px solid #4a4235; background: transparent; cursor: pointer; }

.page-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: clamp(46px, 8vw, 88px) 0 76px; min-height: calc(100vh - 140px); }
.site-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; padding: 24px clamp(20px, 5vw, 72px); color: #77736d; border-top: 1px solid #1f1f22; font-size: .72rem; letter-spacing: .16em; }

.hero { max-width: 870px; margin: 0 auto 40px; text-align: center; }
.eyebrow { display: inline-block; color: var(--gold); letter-spacing: .26em; font-weight: 700; font-size: .72rem; margin-bottom: 16px; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
h1 { margin: 0; font-size: clamp(2.45rem, 7vw, 5.25rem); line-height: .98; letter-spacing: -.035em; }
h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.55rem); letter-spacing: -.02em; }
h3 { margin: 0; font-size: 1.22rem; }
.hero p { max-width: 680px; margin: 22px auto 0; color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.gold { color: var(--gold-light); }

.grid { display: grid; gap: 18px; }
.grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel {
  background: linear-gradient(145deg, rgba(29,29,31,.96), rgba(14,14,15,.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}
.panel-subtle { background: rgba(17,17,19,.84); box-shadow: none; }
.action-card { text-decoration: none; min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .22s ease, border-color .22s ease; }
.action-card:hover { transform: translateY(-4px); border-color: #6d5833; }
.icon-box { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #6b5634; border-radius: 14px; color: var(--gold-light); font-weight: 800; }
.action-card p, .muted { color: var(--muted); line-height: 1.65; }
.arrow { color: var(--gold); font-weight: 700; }

.form-shell { max-width: 820px; margin: 0 auto; }
.form-head { margin-bottom: 28px; }
.form-head p { color: var(--muted); line-height: 1.65; margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label { font-size: .82rem; font-weight: 700; color: #d4d0c7; letter-spacing: .04em; }
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #101012;
  border: 1px solid #39383d;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(211,173,98,.11); }
textarea { min-height: 112px; resize: vertical; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.button {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.button:disabled { opacity: .55; cursor: wait; }
.button-primary { background: linear-gradient(135deg, var(--gold-light), #b78539); color: #15110b; }
.button-secondary { background: #29292d; color: var(--text); border: 1px solid #44434a; }
.button-danger { background: rgba(228,109,109,.12); color: #f3a0a0; border: 1px solid rgba(228,109,109,.35); }
.button-small { padding: 9px 12px; border-radius: 9px; font-size: .82rem; }

.notice { border-radius: 12px; padding: 14px 16px; margin: 18px 0; border: 1px solid; line-height: 1.5; }
.notice-success { color: #b7e6c7; background: rgba(116,201,145,.1); border-color: rgba(116,201,145,.32); }
.notice-error { color: #f4b0b0; background: rgba(228,109,109,.1); border-color: rgba(228,109,109,.32); }
.notice-warning { color: #f3d495; background: rgba(226,185,99,.1); border-color: rgba(226,185,99,.32); }
.hidden { display: none !important; }

.login-panel { max-width: 500px; margin: 0 auto; }
.login-panel .brand-mini { text-align: center; margin-bottom: 28px; }
.brand-mini img { width: 64px; height: 64px; }
.brand-mini p { color: var(--muted); }

.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.dashboard-head p { color: var(--muted); margin: 8px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: rgba(18,18,20,.9); border: 1px solid #313136; border-radius: 15px; padding: 17px; }
.stat span { display: block; color: var(--muted); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 8px; font-size: 1.65rem; font-family: Georgia, "Times New Roman", serif; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { border: 1px solid #37363c; color: var(--muted); background: #171719; border-radius: 999px; padding: 8px 13px; cursor: pointer; }
.filter-chip.active { color: #17120a; background: var(--gold); border-color: var(--gold); font-weight: 800; }
.search-input { max-width: 300px; }

.application-list { display: grid; gap: 13px; }
.application-card { border: 1px solid #333238; background: rgba(18,18,20,.9); border-radius: 16px; overflow: hidden; }
.application-summary { display: grid; grid-template-columns: 1.35fr .9fr .7fr auto; gap: 16px; align-items: center; padding: 18px; }
.application-summary h3 { font-family: inherit; font-size: 1rem; }
.application-summary p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.application-actions { display: flex; gap: 8px; justify-content: flex-end; }
.application-details { border-top: 1px solid #2f2e33; padding: 20px; background: rgba(9,9,10,.56); }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-block { padding: 15px; background: #131315; border: 1px solid #2c2b30; border-radius: 12px; }
.detail-block.full { grid-column: 1/-1; }
.detail-block span { display: block; color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.detail-block p { margin: 0; color: #d8d4cd; line-height: 1.55; white-space: pre-wrap; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; text-transform: capitalize; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pending { color: var(--warning); background: rgba(226,185,99,.1); }
.status-processing { color: #82b7ea; background: rgba(92,151,206,.11); }
.status-approved { color: var(--success); background: rgba(116,201,145,.1); }
.status-rejected, .status-error { color: var(--danger); background: rgba(228,109,109,.1); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }

.dialog-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); padding: 20px; }
.dialog { width: min(560px, 100%); background: #171719; border: 1px solid #474139; border-radius: 18px; box-shadow: var(--shadow); padding: 26px; }
.dialog p { color: var(--muted); line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.loading-panel { max-width: 420px; margin: 80px auto; text-align: center; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid #323236; border-top-color: var(--gold); border-radius: 50%; margin: 0 auto 14px; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { width: 72px; height: 72px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(116,201,145,.12); border: 1px solid rgba(116,201,145,.35); color: var(--success); font-size: 2rem; font-weight: 900; }

@media (max-width: 820px) {
  .grid-two, .grid-three, .form-grid, .details-grid { grid-template-columns: 1fr; }
  .field.full, .detail-block.full { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .application-summary { grid-template-columns: 1fr; }
  .application-actions { justify-content: flex-start; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .site-footer { flex-direction: column; }
}
@media (max-width: 560px) {
  .site-header { padding: 12px 16px; }
  .brand small { display: none; }
  .brand strong { font-size: .88rem; }
  .top-nav .nav-link:not(.nav-button) { display: none; }
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 36px; }
  .panel { padding: 21px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .toolbar { align-items: stretch; }
  .search-input { max-width: none; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}


/* Exact Invictus emblem supplied by the brand owner */
.brand-emblem {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
  filter: drop-shadow(0 8px 18px rgba(211, 173, 98, .2));
}
.hero-emblem {
  display: block;
  width: clamp(118px, 18vw, 170px);
  height: auto;
  margin: -24px auto 20px;
  border-radius: 22px;
  background: #000;
  filter: drop-shadow(0 18px 36px rgba(211, 173, 98, .15));
}
.brand-mini img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 18px;
  background: #000;
}
@media (max-width: 560px) {
  .brand-emblem {
    width: 46px;
    height: 46px;
  }
  .hero-emblem {
    width: 122px;
    margin-top: -8px;
  }
}
