/* ==========================================
   Wolka Admin – Refined Design
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root, [data-theme="dark"] {
  --bg: #000000;
  --bg-surface: rgba(28, 28, 30, 1);
  --bg-glass: rgba(28, 28, 30, 0.92);
  --bg-glass-hover: rgba(44, 44, 46, 0.95);
  --bg-glass-active: rgba(58, 58, 60, 1);
  --bg-input: rgba(44, 44, 46, 1);
  --bg-inset: rgba(28, 28, 30, 1);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.05);
  --border-focus: #0a84ff;
  --text: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.3);
  --text-heading: #ffffff;
  --primary: #0a84ff;
  --primary-hover: #409cff;
  --primary-soft: rgba(10, 132, 255, 0.12);
  --success: #30d158;
  --success-soft: rgba(48, 209, 88, 0.12);
  --danger: #ff453a;
  --danger-soft: rgba(255, 69, 58, 0.12);
  --accent-gradient: linear-gradient(135deg, #0a84ff, #5e5ce6, #bf5af2);
  --blur: 20px;
  --radius: 12px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: none;
  --transition: 0.2s ease;
  --separator: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  --bg: #f2f2f7;
  --bg-surface: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-hover: rgba(255, 255, 255, 0.98);
  --bg-glass-active: rgba(233, 233, 238, 1);
  --bg-input: rgba(255, 255, 255, 1);
  --bg-inset: rgba(255, 255, 255, 1);
  --border: rgba(0, 0, 0, 0.06);
  --border-light: rgba(0, 0, 0, 0.04);
  --border-focus: #007aff;
  --text: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.5);
  --text-muted: rgba(0, 0, 0, 0.3);
  --text-heading: #000000;
  --primary: #007aff;
  --primary-hover: #0a84ff;
  --primary-soft: rgba(0, 122, 255, 0.08);
  --success: #34c759;
  --success-soft: rgba(52, 199, 89, 0.1);
  --danger: #ff3b30;
  --danger-soft: rgba(255, 59, 48, 0.08);
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --separator: rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.44;
}

/* ==========================================
   Auth (Login)
   ========================================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.auth-logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-card h2 {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 400;
  margin-bottom: 24px;
}

/* ==========================================
   App Layout
   ========================================== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   Navbar
   ========================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(var(--blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--blur));
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-badge {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--danger-soft);
  color: var(--danger);
  -webkit-text-fill-color: var(--danger);
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user { color: var(--text-muted); font-size: 0.78rem; }

/* ==========================================
   Content
   ========================================== */
.content {
  flex: 1;
  padding: 24px 16px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.page-header { margin-bottom: 20px; }
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}
.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================
   Cards
   ========================================== */
.card {
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 14px;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { opacity: 0.8; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* ==========================================
   Forms
   ========================================== */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-check { display: flex; align-items: center; }
.form-check label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0;
}

/* ==========================================
   Alerts
   ========================================== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }

/* ==========================================
   Users List
   ========================================== */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--separator);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.user-row {
  background: var(--bg);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.user-info {
  flex: 1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-fields { flex: 1; min-width: 0; }
.user-field-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.field-input {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-input);
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  min-width: 0;
}
.field-input:focus { outline: none; box-shadow: 0 0 0 2px var(--border-focus); }
.field-sm { max-width: 130px; }
.user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.meta-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.user-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-self: center;
}

/* ==========================================
   Theme Toggle
   ========================================== */
.theme-toggle {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 0; flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-glass-hover); color: var(--text); }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
  .navbar { padding: 0 12px; }
  .content { padding: 16px 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .user-field-row { flex-direction: column; }
  .field-sm { max-width: none; }
  .user-row { flex-direction: column; gap: 10px; }
  .user-actions { align-self: stretch; }
}
