/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --primary: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-hover: #1e40af;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --success: #059669;
  --success-light: #d1fae5;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --sidebar-width: 260px;
  --header-height: 56px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.sidebar-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-logo-text span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

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

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 40px;
  max-width: 1100px;
}

/* === HEADER === */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* === CATEGORY FILTERS === */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* === NEWS CARD GRID === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 1px solid var(--border);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #e5e7eb;
}

.news-card-body {
  padding: 18px 20px;
}

.news-card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.news-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.news-card-author {
  font-weight: 500;
}

/* === ARTICLE DETAIL === */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
}

.article-detail-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
  background: #e5e7eb;
}

.article-detail-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.article-detail h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.article-detail-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-detail-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.article-detail-content p {
  margin-bottom: 18px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 20px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.back-btn:hover {
  text-decoration: underline;
}

/* === REPORTS === */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.report-card-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.report-card-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e5e7eb;
}

.report-card-info {
  flex: 1;
}

.report-card-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.report-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.report-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.report-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.report-detail {
  max-width: 800px;
  margin: 0 auto;
}

.report-detail-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: #e5e7eb;
}

.report-detail-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.report-detail h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.report-detail-summary {
  font-size: 16px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.report-detail-content {
  font-size: 17px;
  line-height: 1.8;
}

.report-detail-content p {
  margin-bottom: 16px;
}

/* === CALENDAR === */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-nav-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.calendar-nav-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.calendar-month-title {
  font-size: 22px;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 28px;
}

.calendar-day-header {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 0;
}

.calendar-day {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 80px;
  padding: 6px;
  position: relative;
  transition: background 0.15s ease;
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.calendar-day.today {
  border-color: var(--primary);
  background: var(--primary-light);
}

.calendar-day.has-events {
  cursor: pointer;
}

.calendar-day.has-events:hover {
  box-shadow: var(--shadow);
}

.calendar-day-event {
  font-size: 10px;
  line-height: 1.3;
  margin-bottom: 2px;
  display: block;
}

.calendar-day-event-dot {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 2px;
}

.event-dot-default { background: var(--primary); }
.event-dot-business { background: var(--accent); }
.event-dot-technology { background: #7c3aed; }
.event-dot-lifestyle { background: #ec4899; }
.event-dot-sports { background: #10b981; }
.event-dot-culture { background: #f59e0b; }

/* Events list below calendar */
.events-list-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-list-item {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border);
  align-items: center;
}

.event-list-date {
  text-align: center;
  min-width: 50px;
}

.event-list-day {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.event-list-month {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.event-list-info {
  flex: 1;
}

.event-list-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.event-list-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.event-list-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: capitalize;
}

/* === NOTIFICATIONS === */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-item {
  display: flex;
  gap: 14px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--border);
  align-items: flex-start;
  transition: background 0.15s ease;
}

.notification-item.unread {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification-icon.info {
  background: var(--primary-light);
  color: var(--primary);
}

.notification-icon.warning {
  background: var(--accent-light);
  color: var(--accent);
}

.notification-icon.alert {
  background: var(--danger-light);
  color: var(--danger);
}

.notification-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notification-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === BREAKING NEWS TICKER === */
.ticker-bar {
  background: var(--danger);
  color: white;
  padding: 8px 0;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.ticker-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 2px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  margin: 0 12px;
}

.ticker-text {
  display: inline-block;
  animation: ticker-scroll 25s linear infinite;
  font-size: 14px;
  font-weight: 500;
}

@keyframes ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* === STATS CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* === SECTION TITLE === */
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* === LOADING === */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === ERROR === */
.error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--danger);
}

.error-state h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.error-state p {
  color: var(--text-secondary);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* === MOBILE === */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 56px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-grid {
    font-size: 12px;
  }

  .calendar-day {
    min-height: 60px;
    padding: 4px;
  }

  .report-card-header {
    flex-direction: column;
  }

  .report-card-image {
    width: 100%;
    height: 140px;
  }

  .article-detail h1 {
    font-size: 26px;
  }

  .article-detail-image {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-card-image {
    height: 140px;
  }

  .article-detail h1 {
    font-size: 22px;
  }

  .article-detail-image {
    height: 180px;
  }
}
