:root {
  /* Colormind Palette */
  --color-dark: #2C1B26;
  --color-brown: #533034;
  --color-rust: #C3704C;
  --color-gold: #EAAE68;
  --color-olive: #958658;
  
  /* Semantic Colors */
  --primary: var(--color-rust);
  --secondary: var(--color-gold);
  --accent: var(--color-olive);
  --background: var(--color-dark);
  --surface: var(--color-brown);
  --text-primary: #ffffff;
  --text-secondary: var(--color-gold);
  --text-muted: #b2aba4;
  
  /* Status Colors */
  --success-bg: rgba(234, 174, 104, 0.2);
  --success-border: var(--color-gold);
  --success-text: var(--color-gold);
  --error-bg: rgba(195, 112, 76, 0.2);
  --error-border: var(--color-rust);
  --error-text: var(--color-rust);
  --info-bg: rgba(149, 134, 88, 0.2);
  --info-border: var(--color-olive);
  --info-text: var(--color-olive);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(44, 27, 38, 0.3);
  --shadow-md: 0 4px 8px rgba(44, 27, 38, 0.4);
  --shadow-lg: 0 8px 16px rgba(44, 27, 38, 0.5);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Newsreader', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--background) 0%, var(--surface) 100%);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===================
   LOGIN PAGE STYLES
   =================== */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
}

.login-card {
  max-width: 480px;
  width: 100%;
  padding: var(--spacing-xl);
  background: rgba(83, 48, 52, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(234, 174, 104, 0.1);
}

.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.logo-image {
  width: 80px;
  height: 80px;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.logo-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  color: var(--text-secondary);
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  text-align: center;
  font-family: 'Newsreader', serif;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 var(--spacing-xl) 0;
}

.login-form {
  margin-bottom: var(--spacing-lg);
}

/* ===================
   DASHBOARD LAYOUT
   =================== */

.dashboard-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-xl);
  background: rgba(83, 48, 52, 0.95);
  border-bottom: 2px solid rgba(149, 134, 88, 0.3);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.header-logo {
  width: 70px;
  height: 70px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.header-logo:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.header h2 {
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  font-family: 'Newsreader', serif;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(149, 134, 88, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
}

.user-email {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.logout-btn {
  background: var(--primary);
  color: var(--text-primary);
  border: none;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--color-brown);
  transform: translateY(-1px);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.approval-check {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-secondary);
  font-style: italic;
  background: rgba(149, 134, 88, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
}

/* ===================
   TAB NAVIGATION
   =================== */

.tab-navigation {
  display: flex;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  border-bottom: 2px solid rgba(149, 134, 88, 0.3);
}

.tab-item {
  padding: var(--spacing-md) 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.025em;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.tab-item:hover {
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-secondary);
}

/* ===================
   TABLE STYLES
   =================== */

.table-container {
  background: rgba(83, 48, 52, 0.6);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(149, 134, 88, 0.3);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-md);
}

.stories-table {
  width: 100%;
  border-collapse: collapse;
}

.stories-table thead {
  background: rgba(44, 27, 38, 0.8);
}

.stories-table th {
  padding: var(--spacing-md);
  text-align: left;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  border-bottom: 2px solid rgba(149, 134, 88, 0.3);
}

.stories-table td {
  padding: var(--spacing-md);
  color: var(--text-muted);
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(149, 134, 88, 0.2);
}

.stories-table tbody tr {
  transition: background-color 0.2s ease;
}

.stories-table tbody tr:hover {
  background: rgba(149, 134, 88, 0.1);
}

.subject-cell {
  color: var(--text-primary);
  font-weight: 500;
}

.status-badge {
  background: var(--success-bg);
  color: var(--success-text);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border: 1px solid var(--success-border);
}

.error-message {
  text-align: center;
  color: var(--error-text);
  font-style: italic;
  padding: var(--spacing-xl);
}

/* ===================
   ADD BUTTON
   =================== */

.add-button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--spacing-lg);
}

.add-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--background);
  border: none;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  letter-spacing: 0.025em;
}

.add-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.add-button svg {
  width: 20px;
  height: 20px;
}

/* ===================
   FORM ELEMENTS
   =================== */

input[type="email"] {
  width: 100%;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(149, 134, 88, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

input[type="email"]:focus {
  outline: none;
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(234, 174, 104, 0.2);
}

input[type="email"]::placeholder {
  color: var(--text-muted);
}

button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--color-brown) 100%);
  color: var(--text-primary);
  border: none;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
}

button:hover {
  background: linear-gradient(135deg, var(--color-brown) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ===================
   STATUS MESSAGES
   =================== */

.status {
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 2px solid;
  font-weight: 500;
  display: none;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.status.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

/* ===================
   APPROVAL STATES
   =================== */

.approved-content {
  animation: fadeIn 0.5s ease;
}

.not-approved-content {
  background: var(--error-bg);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--error-border);
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.not-approved-content h2 {
  color: var(--error-text);
  margin-top: 0;
  font-family: 'Newsreader', serif;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===================
   RESPONSIVE DESIGN
   =================== */

@media (max-width: 768px) {
  .header {
    padding: var(--spacing-sm) var(--spacing-md);
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
  }
  
  .header-left,
  .header-right {
    width: 100%;
    justify-content: center;
  }
  
  .main-content {
    padding: var(--spacing-md);
  }
  
  .login-card {
    padding: var(--spacing-lg);
  }
  
  .login-card h1 {
    font-size: 2rem;
  }
  
  .tab-navigation {
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
  }
  
  .tab-item {
    white-space: nowrap;
    min-width: max-content;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .stories-table {
    min-width: 600px;
  }
  
  .user-info {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
  }
  
  .add-button-container {
    justify-content: center;
  }
}