:root {
  --bg: #f6f7f9; --card: #fff; --ink: #14161a; --muted: #6b7280; --line: #e5e7eb;
  --brand: #4f46e5; --brand-ink: #fff; --ok: #047857; --ok-bg: #ecfdf5; --bad: #b91c1c; --bad-bg: #fef2f2;
  --warn: #92400e; --warn-bg: #fffbeb; --radius: 12px;
}
* { box-sizing: border-box; }
/* No ligatures anywhere: joined letters like 'ff' look odd in UI text. */
body { font-variant-ligatures: no-common-ligatures; }
body { margin: 0; font: 15px/1.5 Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: linear-gradient(90deg, #0C0A24, #1E1B4B 60%, #2B2670); color: #fff; }
header.top .in { max-width: 1040px; margin: auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
header.top .logo { display: inline-flex; align-items: center; gap: 10px; font: 700 15px Montserrat, system-ui, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #fff; }
header.top .logo b { font-weight: 500; letter-spacing: .24em; margin-left: .3em; opacity: .8; }
header.top .logo:hover { text-decoration: none; }
header.top .sp { flex: 1; }
header.top form { margin: 0; }
header.top button { background: none; border: 1px solid rgba(255,255,255,.25); color: #d1d5db; padding: 4px 12px; border-radius: 8px; cursor: pointer; }
main { max-width: 1040px; margin: auto; padding: 24px 20px 64px; }
h1 { font-size: 24px; margin: 4px 0 20px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.crumb { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff;
}
textarea { min-height: 70px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; padding: 9px 16px; border-radius: 8px; font: 600 14px Montserrat, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d1d5db; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #fecaca; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.info, .note { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 8px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #eef2ff; color: #3730a3; }
.pill.off { background: #f3f4f6; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; }
.secret { font: 600 22px ui-monospace, Consolas, monospace; letter-spacing: 1px; background: #111827; color: #fff; padding: 12px 16px; border-radius: 8px; display: inline-block; user-select: all; }

/* ------------------------------------------------------------ sign-in page */
body.auth { min-height: 100vh; background: #0C0A24; color: #fff; display: flex; flex-direction: column; }
.auth-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(12,10,36,.94) 0%, rgba(12,10,36,.80) 38%, rgba(30,27,75,.45) 70%, rgba(12,10,36,.70) 100%),
    url('/assets/login-bg.jpg') center / cover no-repeat;
}
.auth-wrap {
  flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 48px 28px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
.auth-brand { animation: rise .7s ease-out both; }
.auth-mark { display: block; height: 104px; width: auto; margin-bottom: 26px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.45)); }
/* COSTA over FASHION: both spaced caps, FASHION tracked out to the same
   width. Sizes are relative so the lockup scales as one. The negative right
   margins cancel the space letter-spacing adds after the last letter, so the
   block is exactly as wide as the letters and centres properly. */
.auth-name { display: inline-block; text-align: left; font: 700 46px/1 Montserrat, system-ui, sans-serif; margin: 0; text-transform: uppercase; }
.auth-name .c { display: inline-block; letter-spacing: .26em; margin-right: -.26em; }
.auth-name .f { display: inline-block; font-size: .39em; font-weight: 500; letter-spacing: 1.15em; margin-right: -1.15em; margin-top: 12px; color: rgba(255,255,255,.85); }
.auth-tag { margin: 14px 0 0; font-size: 17px; color: rgba(255,255,255,.72); letter-spacing: .2px; }
.auth-tag::before { content: ''; display: block; width: 44px; height: 2px; background: #ED1B2D; margin-bottom: 14px; }
.auth-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border-radius: 22px; padding: 32px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: rise .7s .12s ease-out both;
}
.auth-title { font: 700 22px Montserrat, system-ui, sans-serif; letter-spacing: -.3px; margin: 0 0 4px; }
.auth-sub { margin: 0 0 18px; color: rgba(255,255,255,.65); font-size: 14px; }
.auth-card label { color: rgba(255,255,255,.85); font-weight: 500; }
.auth-card input[type=email], .auth-card input[type=password] {
  background: rgba(255,255,255,.95); border-color: transparent; padding: 12px 14px; border-radius: 10px; color: #14161a;
}
.auth-card input:focus { outline: 3px solid rgba(139,128,255,.6); outline-offset: 1px; }
.auth-btn { width: 100%; margin-top: 22px; padding: 13px; border-radius: 10px; font-size: 15px; background: linear-gradient(90deg, #5B4CF5, #4338CA); box-shadow: 0 8px 24px rgba(91,76,245,.4); }
.auth-note { margin: 18px 0 0; font-size: 13px; color: rgba(255,255,255,.55); text-align: center; }
.auth-card .flash { margin-bottom: 14px; }
.auth-foot { padding: 0 28px 26px; max-width: 1040px; width: 100%; margin: 0 auto; box-sizing: border-box; opacity: .8; }
.auth-foot img { display: block; height: 34px; width: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-brand, .auth-card { animation: none; } }
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 24px; }
  .auth-brand { text-align: center; }
  .auth-mark { height: 76px; margin: 0 auto 18px; }
  .auth-name { font-size: 34px; }
  .auth-name .f { margin-top: 9px; }
  .auth-tag::before { margin: 0 auto 12px; }
  .auth-foot { display: flex; justify-content: center; }
}
