/* Arnold's site portal. One stylesheet for login, sites, new, edit. */
:root {
  --ink:#14181f; --soft:#6b7280; --faint:#9aa1ad; --line:#e8eaee; --bg:#fff; --wash:#f6f7f9;
  --navy:#12284c; --ok:#17803d; --bad:#b42318; --warn:#9a6700;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; -webkit-font-smoothing:antialiased; }
a { color:inherit; }

.top { height:60px; padding:0 24px; display:flex; align-items:center; gap:24px; border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:5; }
.top img { height:30px; width:auto; display:block; }
.top nav { display:flex; gap:4px; margin-left:auto; }
.top nav a { text-decoration:none; font-size:14px; font-weight:500; color:var(--soft); padding:7px 12px; border-radius:8px; }
.top nav a:hover { color:var(--ink); background:var(--wash); }
.top nav a.on { color:var(--ink); }

.wrap { max-width:1040px; margin:0 auto; padding:40px 24px 80px; }
.head { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
h1 { font-size:24px; font-weight:650; letter-spacing:-.01em; margin:0; }
.count { color:var(--faint); font-size:15px; }
.grow { flex:1; }

.btn { font:inherit; font-size:14px; font-weight:600; cursor:pointer; border:1px solid var(--navy); background:var(--navy); color:#fff; border-radius:9px; padding:9px 16px; text-decoration:none; display:inline-flex; align-items:center; gap:8px; white-space:nowrap; transition:opacity .12s, background .12s; }
.btn:hover { opacity:.9; }
.btn:disabled { opacity:.4; cursor:default; }
.btn.quiet { background:#fff; color:var(--ink); border-color:var(--line); }
.btn.quiet:hover { background:var(--wash); opacity:1; }
.btn.big { font-size:15px; padding:12px 20px; }

input[type=search], input[type=password], select { font:inherit; font-size:14px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:9px; padding:9px 12px; outline:none; }
input:focus, select:focus { border-color:var(--navy); box-shadow:0 0 0 3px rgba(18,40,76,.1); }
input[type=search] { width:220px; }

.list { border-top:1px solid var(--line); }
.row { display:flex; align-items:center; gap:14px; padding:14px 4px; border-bottom:1px solid var(--line); min-height:64px; }
.dot { width:10px; height:10px; border-radius:50%; background:var(--navy); flex:none; }
.who { min-width:0; flex:1; }
.who b { display:block; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.who span { display:block; font-size:13px; color:var(--soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.when { font-size:13px; color:var(--faint); white-space:nowrap; }
.when.views { width:64px; text-align:right; } .when.date { width:48px; text-align:right; }
.links { display:flex; gap:2px; flex:none; }
.links a, .links button { font:inherit; font-size:13px; font-weight:500; color:var(--soft); text-decoration:none; padding:6px 10px; border-radius:7px; background:none; border:0; cursor:pointer; white-space:nowrap; }
.links a:hover, .links button:hover { color:var(--ink); background:var(--wash); }
.links button.sure { color:var(--bad); background:#fdecec; }
.links button:disabled { opacity:.5; cursor:default; }
.state { font-size:13px; white-space:nowrap; color:var(--soft); display:inline-flex; align-items:center; gap:7px; }
.state.ok { color:var(--ok); } .state.bad { color:var(--bad); } .state.warn { color:var(--warn); }
.cost { font-size:13px; color:var(--faint); font-variant-numeric:tabular-nums; white-space:nowrap; width:52px; text-align:right; }
.spin { width:12px; height:12px; border-radius:50%; border:2px solid var(--line); border-top-color:var(--navy); animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.empty { text-align:center; color:var(--soft); padding:72px 0; }
.empty .btn { margin-top:16px; }

.drop { display:block; border:1.5px dashed #cfd4dc; border-radius:14px; padding:64px 24px; text-align:center; cursor:pointer; transition:border-color .12s, background .12s; }
.drop:hover, .drop.hot { border-color:var(--navy); background:var(--wash); }
.drop b { display:block; font-size:16px; font-weight:600; }
.drop span { display:block; margin-top:6px; font-size:13px; color:var(--soft); }
.drop input { display:none; }
.under { margin-top:14px; font-size:13px; color:var(--soft); text-align:center; }
.under a { color:var(--soft); }
.bar { display:flex; align-items:center; gap:12px; margin:0 0 20px; }
.msg { font-size:14px; color:var(--bad); margin:16px 0 0; }

.login { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--wash); }
.login form { width:100%; max-width:320px; display:flex; flex-direction:column; gap:12px; }
.login img { height:44px; width:auto; align-self:center; margin-bottom:20px; }
.login input { font-size:16px; padding:12px 14px; }
.login .btn { justify-content:center; padding:12px; font-size:15px; }
.login .msg { margin:0; text-align:center; min-height:20px; }

.edit-bar { position:fixed; inset:0 0 auto 0; height:56px; z-index:10; display:flex; align-items:center; gap:10px; padding:0 16px; background:#fff; border-bottom:1px solid var(--line); }
.edit-bar .back { text-decoration:none; color:var(--soft); font-size:20px; line-height:1; padding:6px 8px; border-radius:7px; }
.edit-bar .back:hover { background:var(--wash); color:var(--ink); }
.edit-bar .title { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.edit-frame { position:absolute; inset:56px 0 0 0; }
.edit-frame iframe { width:100%; height:100%; border:0; display:block; }

@media (max-width:640px) {
  .top { padding:0 16px; gap:12px; } .wrap { padding:28px 16px 64px; }
  .head { flex-wrap:wrap; } input[type=search] { width:100%; order:3; }
  .when { display:none; } .row { gap:10px; flex-wrap:wrap; } .who { flex-basis:60%; }
  .edit-bar .hide-s { display:none; }
}

.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; }
.card { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; display:flex; flex-direction:column; text-align:left; padding:0; font:inherit; color:inherit; }
.card img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; object-position:top; border-bottom:1px solid var(--line); background:var(--wash); }
.card .foot { display:flex; align-items:center; gap:8px; padding:12px 14px; }
.card .foot { flex-wrap:wrap; }
.card .foot b { font-weight:600; flex:1 1 100%; min-width:0; }
.card .foot .btn { flex:1; justify-content:center; }
button.card { cursor:pointer; transition:border-color .12s, box-shadow .12s; }
button.card:hover { border-color:#c3c8d2; }
button.card.on { border-color:var(--navy); box-shadow:0 0 0 2px var(--navy); }
.cards.small { grid-template-columns:repeat(auto-fill,minmax(180px,220px)); gap:14px; margin-bottom:28px; }
.cards.small .foot { padding:9px 12px; font-size:14px; }

.seg { display:inline-flex; background:var(--wash); border-radius:10px; padding:3px; margin-bottom:16px; }
.seg button { font:inherit; font-size:14px; font-weight:500; color:var(--soft); background:none; border:0; border-radius:8px; padding:7px 14px; cursor:pointer; }
.seg button.on { background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.08); }
.form { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:560px; }
.form input { font:inherit; font-size:15px; color:var(--ink); border:1px solid var(--line); border-radius:9px; padding:11px 12px; outline:none; width:100%; }
.form .wide { grid-column:1 / -1; }
.form .btn { justify-self:start; }
@media (max-width:640px) { .form { grid-template-columns:1fr; } }

.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:28px; }
.stats div { border:1px solid var(--line); border-radius:14px; padding:18px 20px; }
.stats b { display:block; font-size:28px; font-weight:650; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.stats span { display:block; margin-top:2px; font-size:13px; color:var(--soft); }
.num { font-size:13px; color:var(--soft); white-space:nowrap; width:84px; text-align:right; font-variant-numeric:tabular-nums; }
.num b { color:var(--ink); font-weight:600; font-size:14px; }
.bar-wrap { flex:0 0 160px; height:6px; border-radius:3px; background:var(--wash); overflow:hidden; }
.bar-fill { display:block; height:100%; background:var(--navy); border-radius:3px; }
input[type=month] { font:inherit; font-size:14px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:9px; padding:8px 12px; outline:none; }
@media (max-width:640px) { .stats { grid-template-columns:1fr; } .bar-wrap { display:none; } .top nav a { padding:7px 8px; } }

.cost:empty { display:none; }

/* photo picker (edit page) */
.picker { border:0; border-radius:14px; padding:0; width:min(920px,94vw); max-height:86vh; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.picker::backdrop { background:rgba(20,24,31,.45); }
.picker-head { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); position:sticky; top:0; background:#fff; z-index:1; }
.picker-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; padding:16px; overflow:auto; }
.tile { position:relative; padding:0; border:2px solid transparent; border-radius:10px; overflow:hidden; background:var(--wash); cursor:pointer; aspect-ratio:4/3; }
.tile img { display:block; width:100%; height:100%; object-fit:cover; }
.tile:hover, .tile:focus-visible { border-color:var(--navy); outline:none; }
.tile.on { border-color:var(--navy); }
.tile span { position:absolute; left:6px; bottom:6px; font-size:12px; font-weight:600; background:#fff; color:var(--ink); padding:2px 7px; border-radius:6px; }
