:root { --ink:#0b0b0c; --red:#ed1c24; --red-dark:#c81017; --paper:#f4f2ed; --white:#fff; --line:#d9d6d0; --muted:#706f6b; }
* { box-sizing:border-box; }
html,body { max-width:100%; overflow-x:hidden; }
body { margin:0; color:var(--ink); background:var(--paper); font-family:"DM Sans",Arial,sans-serif; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }
.admin-header { height:76px; padding:0 clamp(20px,4vw,60px); display:flex; align-items:center; justify-content:space-between; color:white; background:var(--ink); border-bottom:1px solid #29292c; }
.admin-brand { width:240px; height:70px; display:inline-flex; align-items:center; color:white; }
.admin-brand-logo { width:235px; height:70px; object-fit:contain; object-position:left center; }
.header-actions { display:flex; align-items:center; gap:26px; font-size:12px; font-weight:700; }
.header-actions a:hover,.link-button:hover { color:var(--red); }
.link-button { padding:0; color:white; background:none; border:0; }
.link-button[hidden] { display:none; }
.admin-notice { position:fixed; z-index:50; top:88px; right:clamp(18px,4vw,60px); max-width:min(420px,calc(100vw - 36px)); margin:0; padding:13px 16px; color:#155f38; background:#edf8f0; border-left:3px solid #2f9b5a; box-shadow:0 12px 34px rgba(0,0,0,.13); font-size:12px; font-weight:700; }
.admin-notice[data-error="true"] { color:#a31218; background:#fff0f0; border-left-color:var(--red); }
.prototype-badge { padding:7px 10px; color:#ff858a; border:1px solid #702126; text-transform:uppercase; font-size:9px; letter-spacing:.13em; }
.kicker,.step { margin:0 0 20px; color:var(--red); text-transform:uppercase; letter-spacing:.19em; font:700 10px "Manrope",sans-serif; }
.auth-view { min-height:calc(100svh - 76px); padding:clamp(45px,7vw,100px); display:grid; grid-template-columns:1fr minmax(390px,520px); gap:10vw; align-items:center; color:white; background:var(--ink); }
.auth-copy h1 { margin:0; font:700 clamp(57px,7vw,105px)/.94 "Manrope",sans-serif; letter-spacing:-.06em; }
.auth-copy h1 span { color:var(--red); }
.auth-copy > p:last-child { max-width:540px; margin-top:35px; color:#99999d; font-size:18px; line-height:1.7; }
.auth-card { padding:clamp(28px,4vw,50px); color:var(--ink); background:white; }
.auth-card h2 { margin:0 0 12px; font:700 30px/1.15 "Manrope",sans-serif; letter-spacing:-.04em; }
.form-intro { margin:0 0 28px; color:var(--muted); font-size:13px; line-height:1.6; }
label { display:flex; flex-direction:column; gap:8px; margin-bottom:20px; font-size:11px; font-weight:800; }
input,select,textarea { width:100%; padding:13px 0; color:var(--ink); background:transparent; border:0; border-bottom:1px solid #c9c6c0; border-radius:0; outline:none; font-weight:400; }
input:focus,select:focus,textarea:focus { border-color:var(--red); }
textarea { resize:vertical; }
.primary-button,.outline-button,.danger-button { min-height:50px; padding:0 18px; border:0; display:inline-flex; justify-content:space-between; align-items:center; gap:35px; font-size:12px; font-weight:800; }
.icon-arrow-down,.icon-close,.icon-plus { position:relative; display:inline-block; width:13px; height:13px; flex:0 0 auto; color:currentColor; }
.icon-arrow-down::before { content:""; position:absolute; top:0; left:6px; width:2px; height:12px; background:currentColor; }
.icon-arrow-down::after { content:""; position:absolute; bottom:0; left:3px; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); }
.icon-close::before,.icon-close::after { content:""; position:absolute; top:6px; left:0; width:13px; height:2px; background:currentColor; }
.icon-close::before { transform:rotate(45deg); }
.icon-close::after { transform:rotate(-45deg); }
.icon-plus::before,.icon-plus::after { content:""; position:absolute; top:6px; left:0; width:13px; height:2px; background:currentColor; }
.icon-plus::after { transform:rotate(90deg); }
.primary-button { color:white; background:var(--red); }
.primary-button:hover { background:var(--red-dark); }
.auth-card .primary-button { width:100%; margin-top:4px; }
.outline-button { color:var(--ink); background:transparent; border:1px solid var(--line); }
.outline-button:hover { border-color:var(--ink); }
.danger-button { color:white; background:var(--red); }
.security-note { margin:16px 0 0; color:#93918d; font-size:10px; line-height:1.55; }
.form-error { padding:10px 12px; color:#a31218; background:#fff0f0; font-size:12px; }
#temporary-login-form { margin-top:22px; }

.dashboard { min-height:calc(100svh - 76px); display:grid; grid-template-columns:290px 1fr; }
.admin-sidebar { position:sticky; top:0; height:calc(100svh - 76px); padding:48px 34px 30px; display:flex; flex-direction:column; color:white; background:#151517; }
.admin-sidebar h2 { margin:0; font:700 26px "Manrope",sans-serif; }
.admin-sidebar nav { margin:55px -12px 0; display:flex; flex-direction:column; }
.admin-tab { padding:16px 12px; display:flex; align-items:center; color:#8c8c90; background:transparent; border:0; border-bottom:1px solid #2b2b2e; text-align:left; font-size:13px; font-weight:700; }
.admin-tab:hover,.admin-tab.active { color:white; }
.admin-tab.active { border-bottom-color:var(--red); }
.sidebar-note { margin:auto 0 0; color:#67676b; font-size:10px; line-height:1.6; }
.admin-content { min-width:0; padding:clamp(35px,5vw,75px); }
.admin-view { display:none; max-width:1180px; margin:auto; }
.admin-view.active { display:block; }
.view-title { margin-bottom:50px; display:flex; justify-content:space-between; align-items:end; gap:30px; }
.view-title h1 { margin:0; font:700 clamp(42px,5vw,70px)/1 "Manrope",sans-serif; letter-spacing:-.055em; }
.view-title > div > p:last-child:not(.kicker) { margin:15px 0 0; color:var(--muted); }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:17px; }
.stats-grid article { min-height:220px; padding:27px; display:flex; flex-direction:column; background:white; border-top:3px solid var(--ink); }
.stats-grid article:nth-child(2) { border-color:var(--red); }
.stats-grid span { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.stats-grid strong { margin:auto 0 0; font:700 64px/1 "Manrope",sans-serif; letter-spacing:-.06em; }
.stats-grid small { margin-top:8px; color:#96948f; }
.info-panel { margin-top:18px; padding:32px; display:grid; grid-template-columns:70px 1fr auto; gap:25px; align-items:center; border:1px solid var(--line); }
.info-index { color:var(--red); text-transform:uppercase; font-size:10px; font-weight:800; letter-spacing:.16em; }
.info-panel h3 { margin:0 0 6px; font:700 19px "Manrope",sans-serif; }
.info-panel p { margin:0; color:var(--muted); font-size:13px; }
.text-action { padding:9px 0; border:0; border-bottom:1px solid var(--ink); background:transparent; font-size:12px; font-weight:800; }
.inline-form { margin-bottom:35px; padding:28px; display:grid; grid-template-columns:1fr auto; gap:25px; align-items:end; background:white; }
.inline-form label { margin:0; }
.service-form { margin-bottom:35px; padding:28px; display:grid; grid-template-columns:1fr 1.35fr auto; gap:20px; align-items:end; background:white; }
.service-form label { margin:0; }
.service-form .primary-button { min-height:46px; justify-content:center; }
.service-admin-list { border-top:1px solid var(--ink); }
.service-admin-item { padding:20px 0; display:grid; grid-template-columns:.8fr 1.4fr auto; gap:16px; align-items:center; border-bottom:1px solid var(--line); }
.service-admin-item input,.service-admin-item textarea { padding:10px 0; font-size:13px; }
.service-admin-item textarea { min-height:58px; }
.service-admin-actions { display:flex; gap:8px; align-items:center; }
.service-admin-actions .outline-button { min-height:38px; padding:0 13px; font-size:11px; }
.admin-list { border-top:1px solid var(--ink); }
.list-item { padding:19px 5px; display:grid; grid-template-columns:1fr auto auto; gap:16px; align-items:center; border-bottom:1px solid var(--line); }
.list-item strong { font:700 18px "Manrope",sans-serif; }
.list-item small { color:var(--muted); }
.icon-button { width:38px; height:38px; display:grid; place-items:center; color:#777; background:transparent; border:1px solid var(--line); }
.icon-button:hover { color:white; background:var(--red); border-color:var(--red); }
.empty-state { padding:45px; text-align:center; color:var(--muted); border:1px solid var(--line); }
.project-form { margin-bottom:55px; padding:30px; display:grid; grid-template-columns:minmax(300px,.9fr) 1.1fr; gap:35px; background:white; }
.upload-box { position:relative; min-height:280px; overflow:hidden; display:grid; place-items:center; background:#efede8; border:1px dashed #b9b5ae; }
.upload-box input { position:absolute; opacity:0; pointer-events:none; }
.upload-box label { position:absolute; inset:0; z-index:2; margin:0; padding:30px; display:flex; align-items:center; justify-content:center; text-align:center; cursor:pointer; }
.upload-box label strong,.upload-box label small { display:block; }
.upload-box label small { margin-top:6px; color:var(--muted); font-weight:400; }
.upload-icon { width:46px; height:46px; margin:0 auto 17px; display:grid; place-items:center; color:white; background:var(--red); }
.upload-icon .icon-plus { width:20px; height:20px; }
.upload-icon .icon-plus::before,.upload-icon .icon-plus::after { top:9px; width:20px; height:2px; }
.upload-box img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#171719; }
.project-fields { align-self:center; }
.project-fields .primary-button { width:100%; }
.upload-message { min-height:16px; margin:11px 0 0; color:#197043; font-size:11px; font-weight:700; }
.upload-message[data-error="true"] { color:var(--red); }
.project-admin-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.project-admin-card { overflow:hidden; background:white; }
.project-admin-cover { aspect-ratio:4/3; display:grid; place-items:center; color:var(--muted); background:#efede8; font-size:12px; }
.project-admin-cover img { width:100%; height:100%; object-fit:contain; object-position:center; display:block; background:#efede8; }
.project-admin-footer { padding:18px; display:grid; gap:15px; }
.project-admin-card span { display:block; margin-bottom:4px; color:var(--red); text-transform:uppercase; font-size:9px; font-weight:800; letter-spacing:.1em; }
.project-admin-card strong { font-size:13px; }
.project-admin-actions { display:flex; flex-wrap:wrap; gap:9px; }
.project-admin-actions .outline-button,.clear-project-button { min-height:36px; padding:0 11px; font-size:10px; }
.clear-project-button { color:#a6141a; background:transparent; border:1px solid #e0b6b8; font-weight:800; }
.clear-project-button:hover:not(:disabled) { color:white; background:var(--red); border-color:var(--red); }
.clear-project-button:disabled { opacity:.4; cursor:not-allowed; }
.review-form { max-width:760px; padding:clamp(27px,4vw,48px); background:white; }
.two-cols { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.review-form .primary-button { min-width:230px; }
.review-admin-list { max-width:960px; margin-top:28px; border-top:1px solid var(--ink); }
.review-admin-item { padding:22px 0; display:grid; gap:16px; border-bottom:1px solid var(--line); }
.review-admin-top { display:grid; grid-template-columns:1fr 140px 1fr; gap:16px; }
.review-admin-item input,.review-admin-item select,.review-admin-item textarea { padding:10px 0; font-size:13px; }
.review-admin-item textarea { min-height:86px; }
.settings-card,.danger-card { margin-bottom:20px; padding:32px; background:white; }
.settings-card h3,.danger-card h3 { margin:0 0 10px; font:700 20px "Manrope",sans-serif; }
.settings-card p,.danger-card p { max-width:780px; color:var(--muted); font-size:13px; line-height:1.65; }
.danger-card { display:flex; justify-content:space-between; align-items:center; gap:35px; border:1px solid #e4c4c4; }
.danger-card button { padding:12px 16px; color:#a6141a; background:transparent; border:1px solid #d9a7aa; font-size:11px; font-weight:800; }
#confirm-dialog { width:min(440px,90vw); padding:35px; border:0; box-shadow:0 25px 90px rgba(0,0,0,.3); }
#confirm-dialog::backdrop { background:rgba(0,0,0,.65); }
#confirm-dialog h3 { margin:0 0 10px; font:700 24px "Manrope",sans-serif; }
#confirm-dialog p { color:var(--muted); font-size:13px; }
#confirm-dialog > div { margin-top:28px; display:flex; justify-content:flex-end; gap:10px; }
.project-dialog { position:relative; width:min(980px,94vw); max-height:88svh; padding:clamp(26px,4vw,44px); border:0; background:var(--paper); box-shadow:0 25px 90px rgba(0,0,0,.3); overflow:auto; }
.project-dialog::backdrop { background:rgba(0,0,0,.65); }
.project-dialog h2 { margin:0; font:700 clamp(32px,5vw,52px)/1 "Manrope",sans-serif; letter-spacing:-.05em; }
.dialog-intro { margin:12px 0 26px; color:var(--muted); font-size:13px; }
.dialog-close { position:absolute; top:18px; right:18px; width:32px; height:32px; display:grid; place-items:center; color:#777; border:1px solid var(--line); background:transparent; }
.dialog-close:hover { color:white; background:var(--red); border-color:var(--red); }
.project-photo-list { margin-bottom:28px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.project-photo-item { position:relative; min-width:0; padding:10px; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; background:white; }
.project-photo-item img { width:100%; grid-column:1/-1; aspect-ratio:4/3; object-fit:contain; background:#efede8; }
.project-photo-item strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.project-photo-item .icon-button { width:30px; height:30px; }
.project-add-form { padding:24px; display:grid; grid-template-columns:1fr 1fr auto; gap:16px; align-items:end; background:white; }
.project-add-form label { margin:0; }
.project-add-form .file-label input { padding:11px 0; }
.project-add-form .primary-button { min-height:46px; justify-content:center; }

@media(max-width:900px){
  .auth-view { grid-template-columns:1fr; }
  .auth-copy h1 { font-size:58px; }
  .dashboard { width:100%; max-width:100%; grid-template-columns:minmax(0,1fr); overflow-x:hidden; }
  .admin-sidebar { position:static; min-width:0; width:100%; max-width:100%; height:auto; padding:25px 20px; overflow:hidden; }
  .admin-sidebar > div,.sidebar-note { display:none; }
  .admin-sidebar nav { min-width:0; max-width:100%; margin:0; flex-direction:row; overflow-x:auto; }
  .admin-tab { flex:0 0 auto; border-bottom:2px solid #2b2b2e; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .project-admin-grid { grid-template-columns:1fr 1fr; }
  .project-photo-list { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:620px){
  .admin-header { height:68px; padding:0 16px; }
  .prototype-badge { display:none; }
  .header-actions { gap:14px; font-size:11px; }
  .admin-brand { width:148px; height:60px; }
  .admin-brand-logo { width:146px; height:60px; }
  .auth-view { min-height:calc(100svh - 68px); padding:42px 20px; }
  .auth-copy h1 { font-size:46px; }
  .auth-copy > p:last-child { font-size:15px; }
  .admin-sidebar { position:sticky; top:0; z-index:20; padding:0; border-bottom:1px solid #2b2b2e; }
  .admin-sidebar nav { width:100%; max-width:100%; padding:7px 8px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; overflow:visible; }
  .admin-tab { min-width:0; padding:10px 3px; justify-content:center; border:0; border-bottom:2px solid transparent; font-size:11px; text-align:center; white-space:normal; }
  .admin-tab.active { background:#202023; border-bottom-color:var(--red); }
  .admin-content { min-width:0; width:100%; max-width:100%; padding:30px 16px 48px; overflow:hidden; }
  .admin-view,.view-title,.stats-grid,.info-panel,.inline-form,.service-form,.service-admin-item,.project-form,.project-admin-grid,.review-form,.review-admin-list,.settings-card,.danger-card { min-width:0; max-width:100%; }
  input,select,textarea { min-width:0; max-width:100%; }
  p,h1,h2,h3,strong,small { overflow-wrap:anywhere; }
  .view-title { margin-bottom:30px; align-items:start; flex-direction:column; gap:18px; }
  .view-title h1 { font-size:clamp(38px,12vw,52px); }
  .view-title > div > p:last-child:not(.kicker) { font-size:14px; line-height:1.55; }
  .stats-grid,.project-form,.project-admin-grid,.two-cols,.project-photo-list,.project-add-form,.review-admin-top { grid-template-columns:1fr; }
  .stats-grid { gap:10px; }
  .stats-grid article { min-height:135px; padding:20px; }
  .stats-grid strong { font-size:48px; }
  .info-panel { padding:22px; grid-template-columns:1fr; gap:15px; }
  .inline-form,.service-form,.service-admin-item { padding:20px; grid-template-columns:1fr; gap:16px; }
  .service-admin-item { padding:20px 0; }
  .list-item { grid-template-columns:1fr auto; }
  .list-item small { display:none; }
  .project-form { margin-bottom:35px; padding:20px; gap:22px; }
  .upload-box { min-height:220px; }
  .project-admin-grid { gap:12px; }
  .project-admin-footer { padding:15px; }
  .project-admin-actions { display:grid; grid-template-columns:1fr 1fr; }
  .project-admin-actions button:last-child { grid-column:1/-1; }
  .review-form { padding:22px; }
  .review-admin-list { margin-top:20px; }
  .review-admin-item { padding:18px 0; }
  .service-admin-actions { display:grid; grid-template-columns:1fr auto; }
  .service-admin-actions .outline-button { width:100%; justify-content:center; }
  .danger-card { align-items:flex-start; flex-direction:column; }
  #confirm-dialog { width:calc(100vw - 32px); padding:26px 20px; }
  .project-dialog { width:calc(100vw - 18px); max-height:92svh; padding:24px 18px; }
  .project-dialog h2 { padding-right:28px; font-size:34px; }
  .project-photo-list { gap:10px; }
  .project-add-form { padding:18px; gap:14px; }
}
