/* FujiXPlan Admin: creator consent workflow version */
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: #f5f5f7;
  background: #0d0d0f;
  font-synthesis: none;
  --background: #0d0d0f;
  --surface: #1c1c1e;
  --border: #38383d;
  --muted: #a1a1a8;
  --blue: #0a84ff;
  --red: #ff453a;
  --orange: #ff9f0a;
  --green: #30d158;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { background: var(--background); }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 20px; }
h3 { margin-bottom: 6px; font-size: 17px; }
p { color: var(--muted); line-height: 1.5; }
.eyebrow { margin-bottom: 6px; color: #8e8e93; font-size: 11px; font-weight: 750; letter-spacing: .16em; }
.top-gap { margin-top: 20px; }
.stack { display: grid; gap: 16px; }
.login-screen { display: grid; min-height: 100svh; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #22242a 0, var(--background) 48%); }
.login-card { width: min(100%, 410px); padding: 34px; border: 1px solid var(--border); border-radius: 26px; background: rgba(28,28,30,.92); box-shadow: 0 24px 80px #0008; }
.consent-screen { display: grid; min-height: 100svh; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #22242a 0, var(--background) 52%); }
.consent-card { width: min(100%, 560px); padding: 34px; border: 1px solid var(--border); border-radius: 26px; background: rgba(28,28,30,.95); box-shadow: 0 24px 80px #0008; }
.consent-points { margin: 20px 0; padding-left: 22px; color: #d8d8dc; line-height: 1.65; }
.consent-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 24px; }
.brand-mark { display: grid; width: 52px; height: 52px; margin-bottom: 20px; place-items: center; border-radius: 15px; background: linear-gradient(145deg, #f5f5f7, #8e8e93); color: #111; font-weight: 850; letter-spacing: -.05em; }
.brand-mark.small { width: 38px; height: 38px; margin: 0; border-radius: 11px; font-size: 13px; }
.app-shell { display: grid; min-height: 100svh; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100svh; flex-direction: column; padding: 22px 14px; border-right: 1px solid #2c2c2f; background: #151517; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
nav { display: grid; gap: 4px; }
nav button { display: flex; min-height: 44px; align-items: center; justify-content: space-between; padding: 10px 13px; border: 0; border-radius: 11px; background: transparent; color: #d8d8dc; text-align: left; font-weight: 600; }
nav button:hover { background: #242427; }
nav button.active { background: #303035; color: #fff; }
.nav-count { min-width: 23px; padding: 2px 7px; border-radius: 99px; background: #3a3a3e; font-size: 11px; text-align: center; }
.nav-count:empty { display: none; }
.sidebar-footer { display: grid; gap: 6px; margin-top: auto; padding: 18px 10px 2px; border-top: 1px solid #303034; overflow-wrap: anywhere; }
.sidebar-footer small { color: var(--muted); }
.text-button { width: fit-content; padding: 4px 0; border: 0; background: none; color: var(--blue); }
.workspace { width: 100%; max-width: 1480px; padding: 42px clamp(20px, 4vw, 60px) 90px; overflow: hidden; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-header p:last-child { margin-bottom: 0; }
.view { animation: enter .18s ease-out; }
@keyframes enter { from { opacity: .4; transform: translateY(4px); } }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; }
.metric, .panel, .card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric { min-height: 126px; padding: 20px; }
.metric strong { display: block; margin-top: 14px; font-size: 32px; letter-spacing: -.035em; }
.metric span { color: var(--muted); font-size: 13px; }
.panel { padding: 22px; }
.panel.narrow { max-width: 680px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; }
.two-column { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.compact-list { display: grid; gap: 10px; }
.compact-item { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #303034; }
.compact-item:last-child { border: 0; }
.compact-item span { color: var(--muted); }
.notes { margin: 14px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toolbar input[type="search"] { max-width: 420px; }
.toolbar select { width: auto; min-width: 210px; }
.primary, .secondary, .danger { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 11px; font-weight: 700; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #409cff; }
.secondary { border: 1px solid #4a4a50; background: #2c2c30; color: #f5f5f7; }
.secondary:hover { background: #3a3a3f; }
.danger { background: #3a1819; color: #ff6961; }
.danger:hover { background: #512021; }
button:disabled { cursor: wait; opacity: .5; }
label { display: grid; gap: 7px; color: #d8d8dc; font-size: 13px; font-weight: 600; }
label small { color: var(--muted); font-weight: 400; line-height: 1.4; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #48484e; border-radius: 10px; outline: 0; background: #111113; color: #f5f5f7; }
textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #0a84ff32; }
input[type="checkbox"] { width: 19px; min-height: 19px; accent-color: var(--blue); }
.switch { display: flex; min-height: 44px; align-items: center; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-all { grid-column: 1 / -1; }
.field-label { margin-bottom: 9px; color: #d8d8dc; font-size: 13px; font-weight: 600; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check-option { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #3d3d42; border-radius: 10px; background: #171719; font-weight: 500; }
.form-note, .warning-note { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 13px; }
.form-note { background: #212b36; color: #b5cee6; }
.warning-note { background: #382b16; color: #ffd08a; }
.consent-admin-panel { padding: 18px; border: 1px solid #315477; border-radius: 14px; background: #17222d; }
.consent-admin-panel > p { margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { overflow: hidden; }
.card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
.card-body { display: grid; gap: 11px; padding: 18px; }
.card-body p { margin: 0; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.badge { display: inline-flex; width: fit-content; align-items: center; padding: 5px 9px; border: 1px solid #4a4a50; border-radius: 99px; color: #c9c9cf; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.badge.green { border-color: #286c3d; background: #17321f; color: #76e093; }
.badge.orange { border-color: #71531d; background: #33270f; color: #ffc35d; }
.badge.red { border-color: #73302d; background: #351817; color: #ff7770; }
.muted { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid #343438; text-align: left; vertical-align: middle; }
th { color: #8e8e93; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
td { color: #e2e2e6; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #232326; }
.row-button { min-height: 36px; padding: 7px 11px; border: 1px solid #48484d; border-radius: 9px; background: #2a2a2e; color: #fff; }
.empty { padding: 34px; color: var(--muted); text-align: center; }
dialog { width: min(92vw, 680px); max-height: 90svh; padding: 24px; overflow-y: auto; border: 1px solid #4a4a50; border-radius: 22px; background: #1c1c1f; color: #f5f5f7; box-shadow: 0 30px 100px #000c; }
dialog.wide-dialog { width: min(94vw, 900px); }
dialog::backdrop { background: #000a; backdrop-filter: blur(6px); }
.dialog-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-title h2 { margin: 0; }
.dialog-title .close { min-height: 38px; padding: 7px 12px; }
.detail-image { width: 100%; max-height: 320px; margin-top: 18px; border-radius: 13px; object-fit: cover; background: #111; }
.detail-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; margin-top: 16px; }
.detail-grid dt, .detail-grid dd { padding: 9px 0; border-bottom: 1px solid #343438; overflow-wrap: anywhere; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }
.recipe-form { display: grid; gap: 18px; }
fieldset { display: grid; gap: 18px; margin: 0; padding: 18px; border: 1px solid #3b3b40; border-radius: 14px; }
legend { padding: 0 8px; color: #fff; font-weight: 750; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); margin: 0; padding: 13px 17px; border: 1px solid #4a4a50; border-radius: 12px; background: #2c2c30; color: white; box-shadow: 0 15px 50px #000a; }
.toast:empty { display: none; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; z-index: 5; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid #2c2c2f; }
  .brand { padding-bottom: 12px; }
  nav { display: flex; padding-bottom: 4px; overflow-x: auto; }
  nav button { flex: 0 0 auto; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 10px 4px 0; }
  .workspace { padding-top: 30px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .login-card { padding: 26px 22px; }
  .workspace { padding: 24px 16px 70px; }
  .page-header, .toolbar { align-items: stretch; flex-direction: column; }
  .page-header .secondary { align-self: flex-start; }
  .metrics, .two-column, .form-grid { grid-template-columns: 1fr; }
  .span-all { grid-column: auto; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar input[type="search"], .toolbar select { width: 100%; max-width: none; }
  dialog, dialog.wide-dialog { width: calc(100vw - 20px); padding: 18px; border-radius: 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid dt { padding-bottom: 2px; border-bottom: 0; }
  .detail-grid dd { padding-top: 2px; }
  .consent-card { padding: 27px 22px; }
  .consent-actions { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .metrics, .check-grid, .cards { grid-template-columns: 1fr; } }
