/* =====================================================
   OE-Monddel
   Sotet tema dashboard, reszponziv
   ===================================================== */

:root {
  --bg-primary:   #0b1220;
  --bg-secondary: #111a2e;
  --bg-tertiary:  #172238;
  --bg-card:      #1a2540;
  --bg-hover:     #233152;

  --border-color: #243556;
  --border-light: #2d3f64;

  --text-primary:   #e8eef9;
  --text-secondary: #a4b1cc;
  --text-muted:     #6b7a99;

  --accent:       #38bdf8;
  --accent-hover: #0ea5e9;

  /* Statusz szinek */
  --status-pending:     #f59e0b;
  --status-in-progress: #3b82f6;
  --status-resolved:    #10b981;
  --status-suggestion:  #a855f7;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --sidebar-width: 240px;
  --right-sidebar-width: 320px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--right-sidebar-width);
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;            /* mindig viewport magas */
  overflow-y: auto;
  z-index: 100;             /* a footer fole, hogy a user-info ne legyen takarva */
  scrollbar-width: thin;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.sidebar .logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar .logo-text {
  display: flex;
  flex-direction: column;
}
.sidebar .logo-text strong {
  font-size: 14px;
  letter-spacing: 0.3px;
}
.sidebar .logo-text small {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-section {
  margin-bottom: 14px;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  padding: 0 10px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.15s;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-create {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 500;
  width: 100%;
  margin-top: 4px;
  transition: all 0.15s;
}
.btn-create:hover {
  background: rgba(56, 189, 248, 0.2);
}

.sidebar-user {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-size: 13px;
}
.user-info { flex: 1; min-width: 0; }
.user-info strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info small { font-size: 10px; color: var(--text-muted); }


.main {
  padding: 24px 32px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.search-box {
  flex: 1;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}
.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #0b1220;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-hover);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Kartyak */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 18px;
  font-weight: 600;
}
.card-link {
  font-size: 13px;
  color: var(--accent);
}

/* Hero szekció */
.hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.hero-image {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

/* Posts lista */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
  border-radius: var(--radius-sm);
}
.post-row:hover { background: var(--bg-hover); }
.post-row:last-child { border-bottom: none; }

.post-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.post-info { min-width: 0; }
.post-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: block;
}
.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.post-meta .dot { color: var(--border-light); }

.post-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Statusz badge */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pending     { background: rgba(245, 158, 11, 0.15); color: var(--status-pending); }
.status-in_progress { background: rgba(59, 130, 246, 0.15); color: var(--status-in-progress); }
.status-resolved    { background: rgba(16, 185, 129, 0.15); color: var(--status-resolved); }
.status-suggestion  { background: rgba(168, 85, 247, 0.15); color: var(--status-suggestion); }


.right-sidebar {
  padding: 24px 24px 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;               /* mindig viewport magas */
  overflow-y: auto;
  z-index: 100;                /* a footer fole */
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.widget-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title .icon { color: var(--accent); }
.widget-link {
  font-size: 12px;
  color: var(--text-muted);
}

.announce-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}
.announce-item:last-child { border-bottom: none; }
.announce-date {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
  flex-shrink: 0;
  min-width: 48px;
}
.announce-date strong { display: block; font-size: 14px; }
.announce-date small { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.announce-body strong { display: block; font-size: 13px; margin-bottom: 4px; }
.announce-body p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.faq-item {
  padding: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-muted);
}
.faq-item[open] summary svg {
  transform: rotate(180deg);
}
.faq-item .faq-answer {
  padding: 0 12px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 13px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}
.form-group textarea { min-height: 140px; resize: vertical; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Custom select arrow - hogy a nyil ne tapadjon a jobb szelhez */
.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a4b1cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* Form-check kartyak - minden checkbox egyseges alignment-tel,
   transparent border kompenzal a kiemelt (highlight) valtozat 1px borderjet */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.form-check.form-check-highlight {
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.25);
}
.form-check input[type=checkbox] {
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.form-check label { font-size: 13px; color: var(--text-secondary); margin: 0; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* File input csinositas - custom magyar "Tallozas" gomb */
.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.file-input-wrapper input[type=file] {
  /* a tenyleges file input rejtve - csak a label gombra kattintva nyilik */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.file-input-wrapper .file-input-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0b1220;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s;
  white-space: nowrap;
}
.file-input-wrapper .file-input-button:hover {
  background: var(--accent-hover);
}
.file-input-wrapper .file-name {
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Flash messages */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #10b981; }
.flash-error   { background: rgba(239, 68, 68, 0.15);  border: 1px solid rgba(239, 68, 68, 0.3);  color: #ef4444; }

/* Tablazat (admin) */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.table tbody tr:hover { background: var(--bg-hover); }

/* Stat dobozok */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-box .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-box .value { font-size: 28px; font-weight: 700; margin-top: 6px; }

/* Login oldal */
.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 420px;
  width: 100%;
}
.login-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-card .subtitle { color: var(--text-secondary); font-size: 13px; margin-bottom: 24px; }
.demo-users {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}
.demo-users code {
  background: var(--bg-tertiary);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent);
}

/* Bejegyzes reszletes nezet */
.post-detail h1 {
  font-size: 24px;
  margin-bottom: 12px;
}
.post-detail .meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.post-detail .body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 24px;
  white-space: pre-wrap;
}
.comment {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 3px solid transparent;
}
.comment.official { border-left-color: var(--accent); }
.comment .author {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.comment .badge {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
}
.comment .time { font-size: 11px; color: var(--text-muted); font-weight: normal; }
.comment .body { font-size: 14px; color: var(--text-secondary); }

/* Footer */
.footer {
  grid-column: 1 / -1;
  padding: 20px 32px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  position: relative;
  z-index: 1;                       /* alacsonyabb mint a sidebar - igy nem takarja a user-infot */
  font-size: 13px;
  color: var(--text-muted);
}
.footer a:hover { color: var(--text-primary); }

@media (max-width: 1100px) {
  .app {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  .right-sidebar { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-image { display: none; }
}

@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: left 0.25s;
    width: 260px;
    height: 100vh;
  }
  .sidebar.open { left: 0; }
  .main { padding: 16px; padding-top: 70px; }
  .topbar { flex-direction: column; align-items: stretch; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Forum bejegyzes lista mobil-on */
  .post-row { grid-template-columns: 36px 1fr auto; gap: 10px; padding: 12px 8px; }
  .post-stat { display: none; }
  .post-badges { flex-wrap: wrap; justify-content: flex-end; }
  .post-badges .status { padding: 3px 8px; font-size: 11px; }
  .post-title { font-size: 13px; }
  .post-meta { font-size: 11px; }

  /* Hero szekcio - egy oszlop, kisebb padding */
  .hero { padding: 20px; }
  .hero h1 { font-size: 20px; line-height: 1.3; }
  .hero p { font-size: 13px; }

  /* Card padding csokkentes */
  .card { padding: 16px; }
  .card-header { flex-wrap: wrap; gap: 10px; }
  .card-title { font-size: 15px; }

  /* Footer - oszlopok egymas alatt mobile-on (inline grid-template miatt !important kell) */
  .footer {
    grid-template-columns: 1fr !important;
    text-align: center;
    padding: 16px !important;
  }
  .footer > * { justify-self: center !important; }

  /* Form elemek mobile-on - iOS zoom prevention */
  .form-group input,
  .form-group textarea,
  .form-group select { font-size: 16px; }

  .mobile-menu-btn {
    display: grid !important;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    place-items: center;
  }
}

.mobile-menu-btn { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }