/* This admin's own bits; everything else is Sahl's admin.css. */
.notice-error { border-color: #d33; color: #a11; margin-bottom: 16px; }
.notice-ok { border-color: #2a8; margin-bottom: 16px; line-height: 1.6; }
.create-form { max-width: 640px; }
.create-form select { width: 100%; }
.list-row-title a { color: inherit; text-decoration: none; }
.list-row-title a:hover { text-decoration: underline; }

/* Sign-in page: the shapsogh.com homepage look, the logo is the button. */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  margin: 0;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  background: radial-gradient(circle at 50% 40%, #17191b 0%, #0b0c0d 100%);
}
.login-main { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 32px 0; }
.logo-button { display: block; border-radius: 12px; -webkit-tap-highlight-color: transparent; transition: transform 0.15s ease; }
.logo-button:hover, .logo-button:focus-visible { transform: translateY(-3px); }
.logo-button:active { transform: scale(0.97); }
.logo-button:focus-visible { outline: 3px solid #fff; outline-offset: 12px; }
.logo { display: block; width: clamp(180px, 42vmin, 320px); height: auto; color: #fff; overflow: visible; }
.logo .leaf, .logo .star { transform-box: fill-box; }
.logo .leaf { transform-origin: 50% 85%; animation: leaf-grow 0.7s cubic-bezier(.2, .9, .3, 1.15) both; }
.logo .star { transform-origin: center; animation: star-pop 0.45s calc(1.05s + var(--i) * 0.07s) ease-out both; }
.logo .arrows { animation: arrows-in 0.35s 0.2s ease-out both; }
@keyframes leaf-grow { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
@keyframes star-pop {
  0% { opacity: 0; transform: scale(0) rotate(-90deg); }
  70% { opacity: 1; transform: scale(1.25) rotate(10deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes arrows-in { from { opacity: 0; } to { opacity: 1; } }
.login-page .login-error { margin: 0; max-width: 320px; text-align: center; background: none; color: #ff8a80; }
.login-page .login-error[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .logo * { animation: none !important; } }

/* Dark mode: follows the device setting. Sahl's admin.css draws everything from
   these variables, so only the variables (and a few hard-coded whites) change. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121314;
    --surface: #1b1d1f;
    --hover: #26292c;
    --border: #3a3e42;
    --border-soft: #2a2d30;
    --text: #ececec;
    --text-2: #c4c7ca;
    --muted: #9a9ea3;
    --accent: #5ba8f2;
    --accent-hover: color-mix(in srgb, var(--accent) 80%, white);
    --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--surface));
    --accent-softer: color-mix(in srgb, var(--accent) 9%, var(--surface));
    --danger: #ff8a96;
    --danger-soft: #3a1d22;
    --success: #6fd37b;
    --success-soft: #16301b;
    --warn: #f0b45c;
    --warn-soft: #36280f;
    --paper: #2a2927;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.6);
  }
  .btn-primary { color: #08121e; }
  .admin-toast { color: var(--bg); }
  .admin-toast-error { color: #2a0a10; }
  .notice-error { color: var(--danger); }
  .login-page .login-error { background: none; }
}

/* Filter tabs on the Sites list: Sahl's .seg look, as links */
.filter-tabs { margin-bottom: 14px; }
.filter-tabs a {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
}
.filter-tabs a:hover { color: var(--text); }
.filter-tabs a.is-active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.filter-tabs a span { color: var(--muted); font-weight: 400; margin-left: 2px; }

/* shapsogh.com page: the homepage tiles */
.app-row { gap: 12px; }
.app-row input[type="text"] { width: 100%; max-width: 260px; }
.app-thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 19%; background: #fff; display: grid; place-items: center; border: 1px solid var(--border); }
.app-thumb img { width: 62%; height: 62%; object-fit: contain; }
.app-show { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.app-section { font-size: 16px; margin: 28px 0 2px; }
.app-hint { margin: 0 0 10px; color: var(--muted); }

.reset-password { margin: 8px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reset-password code { font-size: 18px; letter-spacing: 0.04em; user-select: all; }
.user-row { flex-wrap: wrap; }
.user-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-actions input[type=text] { width: 230px; margin: 0; }
