/* FRYA Operator UI — base stylesheet (created P-44) */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: #1a1a1a;
  background: #f5f5f5;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: calc(100vh - 48px);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  padding: 0 20px;
  background: #1e293b;
  color: #fff;
}
.topbar .brand { font-weight: 700; font-size: 1rem; margin-right: auto; }
.topbar .notice { font-size: 0.82rem; color: #94a3b8; }
.topbar .auth-state { font-size: 0.85rem; display: flex; align-items: center; gap: 10px; }
.topbar .auth-user { color: #cbd5e1; }
.topbar .logout-form { display: inline; }
.topbar .logout-form button {
  background: transparent; border: 1px solid #475569; color: #cbd5e1;
  border-radius: 4px; padding: 2px 10px; cursor: pointer; font-size: 0.82rem;
}
.topbar .logout-form button:hover { background: #334155; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 16px 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
}
.sidebar nav a {
  padding: 7px 20px;
  color: #374151;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.sidebar nav a:hover { background: #f0f4ff; text-decoration: none; }
.sidebar nav a.active {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1d4ed8;
  font-weight: 600;
}
.en-hint { font-size: 0.78rem; color: #9ca3af; font-weight: 400; }

.content {
  flex: 1;
  padding: 24px 28px;
  overflow: auto;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 { font-size: 1.4rem; margin: 0 0 4px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
.page-lead { color: #6b7280; font-size: 0.9rem; margin: 0 0 20px; }
.muted { color: #9ca3af; font-size: 0.88rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #f1f5f9;
  color: #374151;
  border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #e2e8f0; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
label { font-size: 0.88rem; font-weight: 500; display: block; margin-bottom: 4px; }
.form-group { margin-bottom: 14px; }

/* ── Flash messages ─────────────────────────────────────────────────────── */
.flash-msg {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.panel-warn, .flash-error {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.panel-ok {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
thead { background: #f8fafc; }
th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #374151;
}
td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* ── Section head (title + action button row) ───────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 { margin: 0; }

/* ── Summary grid (dashboard cards) ────────────────────────────────────── */
.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 20px;
  min-width: 130px;
  flex: 1;
}
.summary-card.compact { padding: 10px 14px; min-width: 100px; }
.summary-label { font-size: 0.78rem; color: #9ca3af; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.summary-value { font-size: 1.5rem; font-weight: 700; margin: 0; }
.summary-grid.compact .summary-value { font-size: 1.2rem; }

.status-open-card { border-top: 3px solid #10b981; }
.status-overdue-card { border-top: 3px solid #ef4444; }
