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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 40px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  gap: 30px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
}

.logo-lh {
  color: #fff;
}

.logo-journal {
  color: #3498db;
}

.tabs {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-icon {
  font-size: 16px;
  display: inline-block;
}

.tab:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.tab.active {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
  border-color: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Cards */
.card {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.card-header h2 {
  font-size: 1.8em;
  color: #fff;
}

.card-body {
  margin-top: 20px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9em;
}

/* Forms */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  font-size: 0.95em;
}

.form-input,
select.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1em;
  transition: all 0.3s ease;
}

.form-input:hover,
select.form-input:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
}

.form-input:focus,
select.form-input:focus {
  outline: none;
  border-color: #3498db;
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
  color: rgba(255,255,255,0.5);
}

select.form-input option {
  background: #16213e;
  color: white;
  padding: 10px;
}

.form-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header h3 {
  font-size: 1.5em;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2em;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.1);
}

.modal-body {
  padding: 30px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.modal-actions .btn {
  flex: 1;
}

.modal-small {
  max-width: 400px;
}

/* Dashboard KPIs */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1000px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.dash-kpi {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
}

.dash-kpi:hover {
  background: rgba(255,255,255,0.11);
}

.dash-kpi-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.dash-kpi-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.dash-kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.dash-kpi-sub {
  margin-top: 4px;
  font-size: 12px;
}

/* Finance Styles */
.finance-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.finance-init-info {
  padding: 10px 0;
}

.finance-stat {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.finance-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.finance-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.finance-table thead {
  background: rgba(52, 152, 219, 0.1);
}

.finance-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.8);
  border-bottom: 2px solid #3498db;
}

.finance-table td {
  padding: 15px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
}

.finance-table tbody tr {
  transition: background-color 0.2s;
}

.finance-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.sortie-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sortie-type-don {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.sortie-type-vente-kiosque {
  background: rgba(155, 89, 182, 0.2);
  color: #9b59b6;
  border: 1px solid rgba(155, 89, 182, 0.4);
}

.sortie-type-vente-distributeur {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.sortie-type-perte {
  background: rgba(233, 69, 96, 0.2);
  color: #e94560;
  border: 1px solid rgba(233, 69, 96, 0.4);
}

.sortie-type-depense {
  background: rgba(230, 126, 34, 0.2);
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.4);
}

.sortie-type-prime {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.4);
}

.sortie-type-autre {
  background: rgba(189, 195, 199, 0.2);
  color: #bdc3c7;
  border: 1px solid rgba(189, 195, 199, 0.4);
}

.sorties-table {
  overflow-x: auto;
}

/* Finance Filters */
.finance-filters {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.finance-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finance-filter-group label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-filter-group .form-input,
.finance-filter-group select.form-input {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
  border-width: 1px;
}

.finance-filter-btns {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}

.finance-filter-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  color: rgba(255,255,255,0.6);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.finance-filter-btn:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.1);
}

.finance-filter-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.finance-filter-btn.active {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}

.finance-combined-totals {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.finance-combined-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.finance-combined-total span:first-child {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.finance-dir-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.finance-dir-entree {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.3);
}

.finance-dir-sortie {
  background: rgba(233,69,96,0.15);
  color: #e94560;
  border: 1px solid rgba(233,69,96,0.3);
}

/* Rapport hebdomadaire */
.rapport-grid { display: flex; flex-direction: column; gap: 0; }
.rapport-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.rapport-row:last-child { border-bottom: none; }
.rapport-row.rapport-separator { border-top: 2px solid rgba(255,255,255,0.15); margin-top: 4px; padding-top: 14px; }
.rapport-label { color: rgba(255,255,255,0.65); font-size: 14px; }
.rapport-value { font-weight: 700; font-size: 16px; color: rgba(255,255,255,0.9); }

/* Historique rapports */
.rapport-hist-item summary::-webkit-details-marker { display:none; }
.rapport-hist-item summary::marker { display:none; }
.rapport-hist-item[open] summary { margin-bottom:4px; }

/* Weekly Recap */
.weekly-recap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.weekly-recap-period {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.weekly-recap-balance {
  font-size: 18px;
  font-weight: 700;
}

.weekly-recap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .weekly-recap-grid { grid-template-columns: 1fr; }
}

.weekly-recap-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-recap-col-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.weekly-recap-empty {
  color: rgba(255,255,255,0.4);
  font-style: italic;
  padding: 10px 0;
}

.weekly-recap-type-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.weekly-recap-type-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.weekly-recap-type-icon {
  font-size: 16px;
}

.weekly-recap-type-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

.weekly-recap-type-count {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

.weekly-recap-type-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.weekly-recap-type-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.weekly-recap-type-amount {
  font-size: 14px;
  font-weight: 700;
  min-width: 100px;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 12px 20px;
    gap: 12px;
  }

  .card {
    padding: 20px;
  }

  .card-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .dash-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-content {
    width: 95%;
  }
}

/* Login page */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  text-align: center;
  max-width: 440px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 50px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-icon {
  font-size: 56px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.login-title {
  font-size: 2em;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 1.1em;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.login-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #3498db, #5865F2);
  border-radius: 3px;
  margin: 0 auto 24px;
}

.login-desc {
  color: rgba(255,255,255,0.6);
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 32px;
}

.form-header {
  margin-bottom: 20px;
}

.btn-discord {
  background: #5865F2;
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88,101,242,0.5);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Header user */
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
}

.header-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.header-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  width: fit-content;
}

.role-patron { background: rgba(231,76,60,0.2); color: #e74c3c; border: 1px solid rgba(231,76,60,0.4); }
.role-co-patron { background: rgba(230,126,34,0.2); color: #e67e22; border: 1px solid rgba(230,126,34,0.4); }
.role-comptable { background: rgba(243,156,18,0.2); color: #f39c12; border: 1px solid rgba(243,156,18,0.4); }
.role-journaliste { background: rgba(52,152,219,0.2); color: #3498db; border: 1px solid rgba(52,152,219,0.4); }
.role-journaliste-en-test { background: rgba(149,165,166,0.2); color: #95a5a6; border: 1px solid rgba(149,165,166,0.4); }

/* Employees grid */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.emp-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  transition: background 0.2s;
}

.emp-card:hover {
  background: rgba(255,255,255,0.09);
}

.emp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.emp-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.emp-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
}

.emp-active {
  background: rgba(46,204,113,0.2);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.3);
}

.emp-inactive {
  background: rgba(233,69,96,0.2);
  color: #e94560;
  border: 1px solid rgba(233,69,96,0.3);
}

.emp-role {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  margin-bottom: 10px;
}

.emp-discord {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin-bottom: 10px;
}

.emp-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Logs */
.logs-table {
  font-size: 14px;
}

.log-action {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(52,152,219,0.15);
  color: #3498db;
  border: 1px solid rgba(52,152,219,0.3);
}

.log-connexion {
  background: rgba(155,89,182,0.15);
  color: #9b59b6;
  border-color: rgba(155,89,182,0.3);
}

.log-entree {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border-color: rgba(46,204,113,0.3);
}

.log-sortie {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  border-color: rgba(231,76,60,0.3);
}

.log-modification {
  background: rgba(241,196,15,0.15);
  color: #f1c40f;
  border-color: rgba(241,196,15,0.3);
}

.log-suppression {
  background: rgba(231,76,60,0.15);
  color: #e74c3c;
  border-color: rgba(231,76,60,0.3);
}

.log-ajout {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border-color: rgba(46,204,113,0.3);
}

.log-topic {
  background: rgba(52,152,219,0.15);
  color: #3498db;
  border-color: rgba(52,152,219,0.3);
}

/* ============================================
   TOPICS
   ============================================ */

.topics-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.topic-filter {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
}

.topic-filter.active {
  background: rgba(52,152,219,0.2);
  border-color: #3498db;
  color: #fff;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.topic-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.topic-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(52,152,219,0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.topic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.topic-date {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.topic-card-title {
  font-size: 1.1em;
  margin-bottom: 8px;
  color: #fff;
}

.topic-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin-bottom: 12px;
}

.topic-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-brouillon {
  background: rgba(149,165,166,0.15);
  color: #95a5a6;
  border: 1px solid rgba(149,165,166,0.3);
}

.status-en-cours {
  background: rgba(241,196,15,0.15);
  color: #f1c40f;
  border: 1px solid rgba(241,196,15,0.3);
}

.status-pret {
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  border: 1px solid rgba(46,204,113,0.3);
}

.status-publie {
  background: rgba(52,152,219,0.15);
  color: #3498db;
  border: 1px solid rgba(52,152,219,0.3);
}

/* Topic detail modal */
.modal-large {
  max-width: 800px;
}

.topic-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.topic-detail-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.topic-detail-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

.topic-desc-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  margin-bottom: 20px;
}

.topic-section {
  margin-top: 24px;
}

.topic-section h4 {
  margin-bottom: 12px;
  font-size: 1em;
  color: rgba(255,255,255,0.8);
}

/* Topic photos */
.topic-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.topic-photo-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: rgba(0,0,0,0.3);
}

.topic-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.topic-photo-item img:hover {
  transform: scale(1.05);
}

.topic-photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(231,76,60,0.9);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.topic-photo-item:hover .topic-photo-delete {
  opacity: 1;
}

.topic-upload-zone {
  margin-top: 8px;
}

/* Topic comments */
.topic-comment {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.topic-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

.topic-comment-date {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

.topic-comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(231,76,60,0.6);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.topic-comment:hover .topic-comment-delete {
  opacity: 1;
}

.topic-comment-delete:hover {
  color: #e74c3c;
}

.topic-comment-body {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.7);
}

.topic-comment-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: flex-end;
}

.topic-comment-input textarea {
  flex: 1;
  resize: vertical;
  min-height: 40px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Article section */
.topic-article-display {
  margin-bottom: 8px;
}

.topic-article-content {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 20px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  white-space: pre-wrap;
  max-height: 500px;
  overflow-y: auto;
}

.topic-article-textarea {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.8;
  font-family: inherit;
}

.topic-article-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}

/* ============================================
   AVATARS
   ============================================ */

.emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.avatar-small {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.avatar-tiny {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.topic-card-author {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-meta-info {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}
