/* News Spinner - Bold Reader Theme */

/* Import Google Font - including 800 weight for bold headlines */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
  /* Colors - Bold Reader Palette */
  --bg-primary: #fffbf7;
  --bg-surface: #ffffff;

  --text-primary: #1a1a2e;
  --text-secondary: #64607d;
  --text-muted: #9994b0;

  --accent-primary: #f72585;
  --accent-secondary: #7209b7;
  --accent-tertiary: #ff6d00;
  --accent-success: #00b4a6;

  --border-color: #e5e5e5;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 95%; /* Increased from 1200px to fill more screen */
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* Header */
.header {
  text-align: center;
  padding: var(--spacing-xl) 0;
  margin-bottom: var(--spacing-lg);
}

.logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-weight: 400;
}

/* Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.card-login {
  max-width: 400px;
  margin: 4rem auto;
}

.card-config {
  /* Removed grid-column since we are changing layout */
  max-width: 100%; /* Adapts to main content area */
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: #d91a6f;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-secondary);
  border: 2px solid var(--accent-secondary);
}

.btn-secondary:hover {
  background: var(--accent-secondary);
  color: white;
}

.btn-google {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.btn-google:hover {
  background: var(--bg-primary);
  border-color: var(--text-muted);
}

.btn-google img,
.btn-google svg {
  width: 20px;
  height: 20px;
}

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

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* User Profile */
.user-profile {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
}

.user-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.user-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.sidebar {
  width: 300px; /* Increased sidebar width */
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
  position: sticky;
  top: 20px;
  min-height: calc(100vh - 200px); /* Make sidebar tall */
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  font-family: inherit;
}

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

.nav-item.active {
  background: rgba(247, 37, 133, 0.1);
  color: var(--accent-primary);
}

.nav-icon {
  font-size: 1.25rem;
}

.main-content {
  flex: 1;
  min-width: 0; /* Prevent flex child overflow */
}

/* Dashboard Grid - Kept for internal layout if needed, though reduced usage */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  /* margin-top: var(--spacing-lg); Remove top margin as it's inside main-content now */
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid var(--accent-success);
  border-radius: var(--radius-sm);
  color: var(--accent-success);
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-success);
  border-radius: 50%;
}

/* News Feed */
.news-feed {
  margin-top: var(--spacing-lg);
}

.news-item {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.news-item:hover {
  border-left-color: var(--accent-secondary);
}

.news-item h4 {
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  font-weight: 700;
}

.news-item p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Configuration Section */
.config-section {
  background: var(--bg-surface);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.config-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  background: var(--accent-primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Links */
a {
  color: var(--accent-secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

/* Helper text */
.form-helper {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: var(--spacing-xs);
}

/* Highlight for important elements */
.highlight {
  color: var(--accent-tertiary);
  font-weight: 700;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Warning Status Badge */
.status-badge.warning {
  border-color: var(--accent-tertiary);
  color: var(--accent-tertiary);
}

.status-badge.warning::before {
  background: var(--accent-tertiary);
}

.status-badge.success {
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.status-badge.success::before {
  background: var(--accent-success);
}

.status-badge.inactive {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.status-badge.inactive::before {
  background: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }

  .header {
    padding: var(--spacing-lg) 0;
  }

  .logo {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  /* Dashboard Layout Response */
  .dashboard-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: var(--spacing-lg);
  }
  
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .nav-item {
    justify-content: center;
  }

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

  .card {
    padding: var(--spacing-md);
  }

  .user-profile {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
}