:root {
  --bg: #050505;
  --bg-elevated: #0a0a0a;
  --bg-card: #0f0f0f;
  --bg-card-hover: #141414;
  --bg-input: #0c0c0c;
  --bg-sidebar: #080808;

  --text: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --text-dim: #404040;

  --border: #1a1a1a;
  --border-light: #252525;
  --border-hover: #333333;

  --accent: #ffffff;
  --accent-glow: rgba(255,255,255,0.06);
  --accent-glow-strong: rgba(255,255,255,0.12);

  --success: #00ff88;
  --success-dim: rgba(0,255,136,0.15);
  --danger: #ff3355;
  --danger-dim: rgba(255,51,85,0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', 'Fira Code', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 30px var(--accent-glow-strong); }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* Ambient gradient */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(255,255,255,0.03), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(255,255,255,0.015), transparent 50%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(255,255,255,0.01), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}
a:hover { opacity: 0.7; }

/* ===== LAYOUT ===== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand:hover { opacity: 1; }

.logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  position: relative;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
}
.logo::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: calc(var(--radius-md) - 2px);
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.3) 100%);
}

.brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.2s var(--ease);
}
.nav-link:hover {
  color: var(--text);
  background: var(--accent-glow);
  opacity: 1;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2.5s infinite;
}
.status-dot.admin {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

/* ===== MAIN CONTENT ===== */
.main {
  flex: 1;
  padding: 40px 0 80px;
  animation: fadeIn 0.5s var(--ease);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  margin-bottom: 32px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-accent {
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
}

.section-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.meta-item strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-card {
  grid-column: span 4;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all 0.3s var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.bento-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow);
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card.featured {
  grid-column: span 6;
  min-height: 220px;
}

@media (max-width: 900px) {
  .bento-card, .bento-card.featured { grid-column: span 6; }
}
@media (max-width: 600px) {
  .bento-card, .bento-card.featured { grid-column: span 12; }
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.card-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.card-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s var(--ease);
}
.card-link:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  opacity: 1;
}
.card-link svg {
  width: 14px;
  height: 14px;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 48px 0;
}

/* ===== PANEL (Auth, etc) ===== */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  padding: 14px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  transition: all 0.2s var(--ease);
}
.form-input::placeholder {
  color: var(--text-dim);
}
.form-input:hover {
  border-color: var(--border-hover);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 2px 0 0 var(--accent);
}

.form-input-boxed {
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.form-input-boxed:hover {
  border-color: var(--border-hover);
}
.form-input-boxed:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23606060' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: all 0.2s var(--ease);
}
.form-select:hover {
  border-color: var(--border-hover);
}
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}
.btn:hover::before {
  opacity: 1;
}
.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-light);
}
.btn-ghost::before { display: none; }
.btn-ghost:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: none;
}

.btn-danger {
  color: var(--danger);
  background: transparent;
  border-color: rgba(255,51,85,0.25);
}
.btn-danger::before { display: none; }
.btn-danger:hover {
  background: var(--danger-dim);
  border-color: rgba(255,51,85,0.4);
  box-shadow: none;
  transform: none;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* ===== MESSAGES ===== */
.message {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 24px;
}
.message-error {
  background: var(--danger-dim);
  border: 1px solid rgba(255,51,85,0.25);
  color: var(--text);
}
.message-success {
  background: var(--success-dim);
  border: 1px solid rgba(0,255,136,0.25);
  color: var(--text);
}

/* ===== AUTH PAGES ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  text-align: center;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-footer a {
  color: var(--text-secondary);
  font-size: 14px;
}
.auth-footer a:hover {
  color: var(--text);
  opacity: 1;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-back:hover {
  color: var(--text);
  opacity: 1;
}

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 32px;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff 0%, #888 100%);
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all 0.15s var(--ease);
  position: relative;
}
.sidebar-link:hover {
  color: var(--text);
  background: var(--accent-glow);
  opacity: 1;
}
.sidebar-link.active {
  color: var(--text);
  background: var(--accent-glow);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 32px 40px 80px;
  animation: fadeIn 0.4s var(--ease);
}

@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-main {
    margin-left: 0;
    padding: 24px 20px 60px;
  }
}

/* ===== ADMIN HEADER ===== */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.admin-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.admin-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.toolbar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ===== TABLE ===== */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

td {
  padding: 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--accent-glow);
}

.table-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ===== INLINE CELL COMPONENTS ===== */
.cell-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  padding: 4px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.cell-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.cell-actions {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px;
  min-width: 280px;
}

.cell-actions form + form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===== PAGER ===== */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.pager-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.pager-info strong {
  color: var(--text);
}

.pager-nav {
  display: flex;
  gap: 6px;
}

.pager-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.15s var(--ease);
}
.pager-btn:hover {
  color: var(--text);
  background: var(--accent-glow);
  border-color: var(--border-hover);
  opacity: 1;
}

/* ===== UTILITY ===== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ===== PATCH: wider home + safer wrapping ===== */
.wrap-wide {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
}

.panel, .bento-card, .table-empty {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* ====================================================================== */
/* ===== MOBILE VERSION (drop-in overrides) ===== */
/* ====================================================================== */

@media (max-width: 600px) {
  :root { --radius-xl: 16px; }

  /* Layout / oddech */
  .wrap, .wrap-wide { padding: 0 16px; }
  .main { padding: 24px 0 56px; }

  /* Header (public) */
  .header { padding: 10px 0; }
  .header-inner { gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  .brand { gap: 10px; }
  .brand-text { font-size: 14px; }

  .nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
  }
  .nav::-webkit-scrollbar { height: 0; }
  .nav-link { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; }

  .user-badge { width: 100%; justify-content: space-between; padding: 8px 12px; }

  /* Sekcje */
  .section-title { font-size: 22px; }
  .section-subtitle { max-width: 100%; }
  .section-meta { flex-wrap: wrap; gap: 10px; }

  /* Bento */
  .bento-grid { gap: 12px; }
  .bento-card, .bento-card.featured { grid-column: span 12; padding: 18px; min-height: 160px; }
  .card-desc { -webkit-line-clamp: 3; }
  .card-footer { flex-direction: column; align-items: stretch; gap: 10px; }
  .card-link { width: 100%; justify-content: center; }

  /* Panele */
  .panel { padding: 22px; }

  /* Formularze */
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .form-input { padding: 12px 0; }
  .form-input-boxed { padding: 12px 14px; }
  .form-select { padding: 12px 38px 12px 14px; }

  /* Buttony */
  .btn { width: 100%; padding: 12px 18px; }
  .btn-sm { width: 100%; padding: 10px 14px; }

  /* Tabele poza adminem: zostawiamy scroll */
  table { min-width: 720px; }
  th, td { padding: 14px 14px; }
}

/* ====================================================================== */
/* ===== ADMIN MOBILE: hamburger + accordion + cards + modal-like sheet === */
/* ====================================================================== */

/* elementy admin mobile UI */
.admin-mobilebar { display: none; }
.admin-overlay { display: none; }
.admin-drawer { display: none; } /* wrapper dla sidebaru w mobile */
.admin-accordion { display: none; }
.admin-cards { display: none; }
.admin-sheet { display: none; }

/* <=900: sidebar jako drawer (hamburger) */
@media (max-width: 900px) {
  .admin-main { margin-left: 0; padding: 18px 16px 56px; }

  .admin-mobilebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 12px 12px;
    margin: -18px -16px 16px;
    background: rgba(5,5,5,0.92);
    backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--border);
  }

  .admin-mobilebar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .admin-mobilebar-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .admin-mobilebar-tab {
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .admin-mobilebar-home {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    white-space: nowrap;
  }

  .admin-burger {
    width: 42px;
    height: 38px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    border-radius: 10px;
    cursor: pointer;
  }
  .admin-burger span {
    display: block;
    height: 2px;
    width: 18px;
    background: var(--text);
    margin-left: 12px;
    opacity: 0.9;
  }

  /* Drawer */
  .admin-sidebar {
    transform: translateX(-105%);
    transition: transform .25s var(--ease);
    z-index: 110;
  }
  body.admin-nav-open .admin-sidebar { transform: translateX(0); }

  .admin-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease);
    z-index: 100;
  }
  body.admin-nav-open .admin-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* <=600: projekty jako karty + zwiń "Dodaj projekt" + ukryj tabele */
@media (max-width: 600px) {
  /* oddech + typografia */
  .admin-main { padding: 16px 14px 56px; }
  .admin-header { margin-bottom: 14px; }
  .admin-title { font-size: 20px; margin-bottom: 4px; }
  .admin-subtitle { font-size: 13px; }

  /* toolbar 1 kolumna */
  .toolbar { grid-template-columns: 1fr !important; gap: 12px; margin-bottom: 16px; }
  .toolbar-card { padding: 16px; }
  .toolbar-card[style*="grid-column"] { grid-column: auto !important; }

  /* Accordion: "Dodaj projekt" i inne duże formularze */
  .admin-accordion { display: block; }
  .admin-acc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
  }
  .admin-acc > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
  }
  .admin-acc > summary::-webkit-details-marker { display: none; }
  .admin-acc-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .admin-acc-chevron {
    width: 28px; height: 28px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    background: var(--bg);
    transition: transform .2s var(--ease);
    flex: 0 0 auto;
  }
  .admin-acc[open] .admin-acc-chevron { transform: rotate(180deg); }
  .admin-acc-body { padding: 0 16px 16px; border-top: 1px solid var(--border); }

  /* Cards list (zamiast tabeli) */
  .admin-cards { display: grid; gap: 10px; }
  .admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 14px;
  }
  .admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .admin-card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
  }
  .admin-card-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    overflow-wrap: anywhere;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg);
    color: var(--text-secondary);
    white-space: nowrap;
  }
  .badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-dim);
    box-shadow: none;
  }
  .badge.ok { color: var(--text); }
  .badge.ok .dot { background: var(--success); box-shadow: 0 0 10px var(--success); }
  .badge.no .dot { background: var(--text-dim); }

  .admin-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }
  .admin-card-actions .btn { width: 100%; }

  /* "Modal" (sheet) – full screen panel */
  .admin-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease);
    padding: 14px;
  }
  body.admin-sheet-open .admin-sheet {
    opacity: 1;
    pointer-events: auto;
  }
  .admin-sheet-panel {
    height: 100%;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sheet-head {
    position: sticky;
    top: 0;
    background: rgba(15,15,15,0.92);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 1;
  }
  .admin-sheet-title { font-weight: 800; letter-spacing: -0.02em; }
  .admin-sheet-close {
    width: 40px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
  }
  .admin-sheet-body { padding: 14px; }

  /* Ukryj klasyczną tabelę w projects na telefonie (zastępujemy kartami) */
  .table-wrap { display: none; }
}