/* Weed Samurai portal -- Y2K-inspired layer on top of style.css.
 *
 * Riff on the Tkinter Y2K theme (chrome gradients, magenta accents,
 * monospace slugs, beveled tiles) -- but web-CSS, NOT Tkinter colors.
 * Stays compatible with the existing dark theme; this stylesheet adds
 * variables + new classes without overriding the base style.css.
 */

:root {
  --y2k-cyan: #00f7ff;
  --y2k-magenta: #ff2cc4;
  --y2k-lime: #b6ff3e;
  --y2k-purple: #6a3df5;
  --y2k-chrome-1: #2a2a3a;
  --y2k-chrome-2: #404054;
  --y2k-chrome-shine: #6c6c88;
  --y2k-amber: #ffd84a;
  --y2k-pink-shadow: rgba(255, 44, 196, 0.18);
}

/* Body backdrop -- subtle gradient pulse */
.y2k-body {
  background:
    radial-gradient(ellipse at top left,  rgba(106, 61, 245, 0.07), transparent 50%),
    radial-gradient(ellipse at top right, rgba(0, 247, 255, 0.05), transparent 50%),
    #0d0d0d;
}

/* Chrome bevels for header + footer + cards */
.y2k-chrome {
  background:
    linear-gradient(180deg,
      var(--y2k-chrome-2) 0%,
      var(--y2k-chrome-1) 100%);
  border-top: 1px solid var(--y2k-chrome-shine);
  border-bottom: 1px solid #15151a;
}

/* Brand wordmark */
.y2k-brand {
  color: var(--y2k-cyan);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px rgba(0, 247, 255, 0.25);
}
.brand-mark { color: var(--y2k-magenta); }
.brand-dot { color: var(--y2k-amber); }

.y2k-accent {
  color: var(--y2k-magenta);
  text-shadow: 0 0 4px var(--y2k-pink-shadow);
  letter-spacing: 0.02em;
}

/* Header dropdown */
.scope-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.scope-label {
  color: var(--y2k-cyan);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#scope-select {
  background: #15151a;
  color: var(--y2k-lime);
  border: 1px solid var(--y2k-chrome-shine);
  border-radius: 3px;
  padding: 0.3rem 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  cursor: pointer;
}
#scope-select:focus { outline: 2px solid var(--y2k-magenta); }

/* Dashboard head */
.dashboard-head {
  margin-bottom: 2rem;
  border-bottom: 1px dashed var(--y2k-chrome-shine);
  padding-bottom: 1.5rem;
}
.dashboard-head h1 {
  margin: 0;
  font-size: 1.7rem;
}

/* Tile grid -- 3 per row on wide screens, responsive */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.y2k-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background:
    linear-gradient(135deg,
      rgba(106, 61, 245, 0.05) 0%,
      rgba(0, 247, 255, 0.03) 100%),
    var(--surface, #161616);
  border: 1px solid var(--y2k-chrome-shine);
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg, #e8e8e8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 247, 255, 0.03);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.y2k-tile:hover {
  transform: translateY(-3px);
  border-color: var(--y2k-magenta);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 20px var(--y2k-pink-shadow);
}
.y2k-tile:focus {
  outline: 2px solid var(--y2k-cyan);
  outline-offset: 2px;
}

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--y2k-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tile-slug {
  background: rgba(0, 247, 255, 0.08);
  border: 1px solid rgba(0, 247, 255, 0.18);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}
.tile-badge {
  background: var(--y2k-magenta);
  color: #0d0d0d;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.tile-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg, #e8e8e8);
}
.tile-desc {
  color: var(--fg-dim, #9a9a9a);
  font-size: 0.9rem;
  line-height: 1.4;
}
.tile-client {
  font-size: 0.75rem;
  color: var(--y2k-amber);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.tile-admin {
  background:
    linear-gradient(135deg,
      rgba(255, 44, 196, 0.08) 0%,
      rgba(106, 61, 245, 0.04) 100%),
    var(--surface, #161616);
  border-color: rgba(255, 44, 196, 0.3);
}
.tile-admin .tile-slug {
  background: rgba(255, 44, 196, 0.1);
  border-color: rgba(255, 44, 196, 0.25);
  color: var(--y2k-magenta);
}

/* Client picker (admin first-landing) */
.client-picker { max-width: 800px; margin: 0 auto; }
.client-picker h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.client-picker .subtle { text-align: center; margin-bottom: 2rem; }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.picker-tile {
  background: var(--surface, #161616);
  border: 1px solid var(--y2k-chrome-shine);
  border-radius: 6px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--fg, #e8e8e8);
  font: inherit;
}
.picker-tile:hover {
  border-color: var(--y2k-magenta);
  transform: translateY(-2px);
}
.picker-tile .tile-slug {
  margin: 0 auto;
}
.picker-tile .tile-name {
  font-size: 1.05rem;
}

/* Placeholder page */
.placeholder-card {
  margin-top: 1.5rem;
  padding: 1.5rem 2rem;
  border-radius: 6px;
  border: 1px solid var(--y2k-chrome-shine);
}
.placeholder-card code {
  background: #15151a;
  color: var(--y2k-lime);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9rem;
}
.placeholder-card ul {
  padding-left: 1.5rem;
  color: var(--fg-dim, #9a9a9a);
}

/* Admin links card */
.admin-links {
  margin-top: 3rem;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--y2k-chrome-shine);
}
.admin-links a {
  color: var(--y2k-cyan);
  text-decoration: none;
  border-bottom: 1px dotted var(--y2k-cyan);
}
.admin-links a:hover { color: var(--y2k-magenta); border-color: var(--y2k-magenta); }

/* Empty state */
.empty-dashboard {
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
  border-radius: 6px;
  border: 1px dashed var(--y2k-chrome-shine);
}

/* ---------------------------------------------------------------------
   Admin dashboard (PLAN_OPERATOR_WORKFLOWS Section 1 -- UB-B 2026-05-12)
   ---------------------------------------------------------------------
   Mobile-first: stacked single column on phones, 2-up on tablet,
   3-up on desktop. iPhone Safari is the daily-driver case.
*/

.admin-dashboard { padding-bottom: 4rem; }

.dashboard-section-title {
  color: var(--y2k-cyan);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--y2k-chrome-shine);
}

/* Section 1: 6 client cards */
.client-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .client-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .client-card-grid { grid-template-columns: repeat(3, 1fr); }
}

.client-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--y2k-chrome-2), var(--y2k-chrome-1));
  border: 1px solid var(--y2k-chrome-shine);
  min-height: 240px;
}

.client-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(108, 108, 136, 0.4);
  padding-bottom: 0.5rem;
}
.client-code {
  color: var(--y2k-magenta);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.client-name {
  color: var(--y2k-lime);
  font-size: 0.9rem;
  text-align: right;
}

.client-app-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}
.client-app-row { margin: 0; }
.client-app-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.5rem;
  text-decoration: none;
  border-radius: 4px;
  /* iPhone tap target -- at least 44px tall per Apple HIG */
  min-height: 44px;
  border-bottom: 1px solid rgba(108, 108, 136, 0.2);
}
.client-app-link:hover, .client-app-link:focus {
  background: rgba(255, 44, 196, 0.08);
  outline: none;
}
.client-app-name {
  color: #e0e0e0;
  font-size: 0.95rem;
}
.client-app-freshness {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.freshness-green  { color: #6cff6c; }
.freshness-yellow { color: var(--y2k-amber); }
.freshness-red    { color: #ff5e5e; }
.freshness-grey   { color: #888; }

.client-app-empty {
  color: #888;
  font-size: 0.85rem;
  flex-grow: 1;
  padding: 0.5rem 0;
}

.client-card-foot {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(108, 108, 136, 0.4);
}
.refresh-kiosks-form { margin: 0; }
.btn-refresh-kiosks {
  width: 100%;
  padding: 0.65rem 1rem;
  background: #15151a;
  color: var(--y2k-cyan);
  border: 1px solid var(--y2k-chrome-shine);
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  /* iPhone tap target */
  min-height: 44px;
}
.btn-refresh-kiosks:hover {
  color: var(--y2k-magenta);
  border-color: var(--y2k-magenta);
}

/* Section 2: admin row */
.admin-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .admin-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .admin-row { grid-template-columns: repeat(5, 1fr); }
}
.admin-row-tile {
  display: block;
  padding: 1rem;
  border-radius: 6px;
  background: linear-gradient(180deg, #2a1f44 0%, #1a1230 100%);
  border: 1px solid rgba(106, 61, 245, 0.4);
  text-decoration: none;
  /* iPhone tap target */
  min-height: 88px;
}
.admin-row-tile:hover {
  border-color: var(--y2k-magenta);
  background: linear-gradient(180deg, #2a1f44 0%, #2a1640 100%);
}
.admin-row-tile-name {
  color: var(--y2k-cyan);
  font-weight: bold;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.admin-row-tile-desc {
  color: #aaa;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Section 3: recent activity */
.recent-activity {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent-activity-row {
  border-bottom: 1px solid rgba(108, 108, 136, 0.3);
}
.recent-activity-row a {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  color: #e0e0e0;
  /* iPhone tap target */
  min-height: 44px;
}
.recent-activity-row a:hover {
  background: rgba(0, 247, 255, 0.05);
}
.recent-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.recent-client {
  color: var(--y2k-magenta);
  font-family: ui-monospace, monospace;
  font-weight: bold;
}
.recent-app {
  color: var(--y2k-lime);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
.recent-time {
  margin-left: auto;
  color: #888;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
.recent-activity-empty {
  padding: 1rem 0;
}

/* Section 4: system status */
.system-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(180deg, var(--y2k-chrome-2), var(--y2k-chrome-1));
  border: 1px solid var(--y2k-chrome-shine);
  border-radius: 6px;
}
@media (min-width: 640px) {
  .system-status { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .system-status { grid-template-columns: repeat(4, 1fr); }
}
.system-status-cell {
  padding: 0.5rem;
  margin: 0;
}
.system-status-cell dt {
  color: var(--y2k-cyan);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.system-status-cell dd {
  color: #e0e0e0;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  margin: 0;
}

/* ---------------------------------------------------------------------
   Refresh-kiosks modal + result (PLAN_KIOSK_REMOTE_REFRESH Phase 2)
   UB-B 2026-05-12. Mobile-first; iPhone 375px is the daily-driver case.
   --------------------------------------------------------------------- */

.refresh-modal {
  border: 1px solid var(--y2k-magenta);
  border-radius: 6px;
  background: linear-gradient(180deg, #2a1f44 0%, #1a1230 100%);
  color: #e0e0e0;
  padding: 0;
  max-width: 480px;
  width: calc(100vw - 2rem);
  margin: auto;
}
.refresh-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.refresh-modal-form { padding: 1.25rem; }
.refresh-modal-title {
  color: var(--y2k-cyan);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.refresh-modal-body {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ccc;
}
.refresh-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-modal-cancel,
.btn-modal-confirm {
  /* iPhone tap target (Apple HIG 44px min) */
  min-height: 44px;
  min-width: 120px;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-modal-cancel {
  background: #15151a;
  color: #aaa;
  border: 1px solid var(--y2k-chrome-shine);
}
.btn-modal-cancel:hover { color: #fff; }
.btn-modal-confirm {
  background: var(--y2k-magenta);
  color: #fff;
  border: 1px solid var(--y2k-magenta);
}
.btn-modal-confirm:hover { background: #ff5cd4; }

/* Per-card inline result panel */
.refresh-kiosks-result {
  margin-top: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}
.refresh-pending {
  color: var(--y2k-amber);
  padding: 0.5rem;
}
.refresh-ok {
  color: #6cff6c;
  padding: 0.5rem;
  border-left: 3px solid #6cff6c;
}
.refresh-fail {
  color: #ff5e5e;
  padding: 0.5rem;
  border-left: 3px solid #ff5e5e;
  word-break: break-word;
}
.refresh-pi-list {
  list-style: none;
  padding: 0.5rem 0 0 0.5rem;
  margin: 0;
  font-size: 0.78rem;
}
.refresh-pi-list li {
  padding: 0.2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.refresh-pi-list .pi-name {
  color: var(--y2k-cyan);
  font-weight: bold;
}
.refresh-pi-list .pi-status {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}
.refresh-pi-list li.pi-ok .pi-status { color: #6cff6c; }
.refresh-pi-list li.pi-failed .pi-status { color: #ff5e5e; }
.refresh-pi-list li.pi-skipped .pi-status { color: #888; }
.refresh-pi-list .pi-msg {
  color: #999;
  flex-basis: 100%;
  font-size: 0.7rem;
  margin-left: 0.4rem;
}
