@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #430057;
  --secondary-color: #5c467a;
  --accent-color: #a55ea3;
  --text-main: #333333;
  --text-muted: #666666;
  --bg-color: #c7ccee;
  --card-bg: #ffffff;
  --border-color: #eaeaea;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: var(--accent-color);
  transition: var(--transition);
}

a:hover {
  filter: brightness(0.8);
}

header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  color: var(--text-main);
  font-weight: 500;
}

nav a:hover, nav a.active {
  color: var(--primary-color);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.75rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-accent {
  background-color: var(--accent-color);
  color: #fff;
}

.btn-accent:hover {
  filter: brightness(0.9);
}

main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

main.container-wide {
  max-width: 1464px;
}

@media (max-width: 768px) {
  .responsive-flex-stack {
    flex-direction: column !important;
    padding: 0 !important;
  }
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
}

.form-control {
  width: 100%;
  padding: 1.15rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text-main);
  transition: var(--transition);
  background-color: #f9fafb;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(67, 0, 87, 0.15);
}

.notification-bell {
  position: relative;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(0,0,0,0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* ==================================
   SPLIT SCREEN AUTH LOGIC
   ================================== */
.auth-page {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  overflow: hidden;
  background-color: #ffffff;
}

.auth-split-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.auth-split-left {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.abstract-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.shape-1 {
  width: 600px; height: 600px;
  top: -200px; left: -200px;
}

.shape-2 {
  width: 800px; height: 800px;
  bottom: -400px; right: -200px;
}

.auth-split-content {
  max-width: 500px;
  position: relative;
  z-index: 2;
}

.auth-split-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.1;
}

.auth-split-content p {
  font-size: 1.35rem;
  line-height: 1.6;
  opacity: 0.9;
  font-weight: 400;
}

.auth-split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  padding: 2rem;
  overflow-y: auto;
}

.auth-split-right .auth-card {
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  box-shadow: none;
  border: none;
}

.auth-header {
  text-align: left;
  margin-bottom: 2.5rem;
}

.auth-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Auth Media Query */
@media (max-width: 1000px) {
  .auth-split-left {
    display: none;
  }
  .auth-split-right {
    padding: 1.5rem;
  }
  .auth-split-right .auth-card {
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
  }
}

.google-btn {
  width: 100%;
  background-color: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  color: #3c4043;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  padding: 1.1rem 1.75rem;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.google-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.google-btn img {
  width: 24px;
  height: 24px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider::before { margin-right: 0.5em; }
.divider::after { margin-left: 0.5em; }

footer {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==================================
   MOBILE RESPONSIVENESS
   ================================== */

@media (max-width: 1024px) {
  .auth-split-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .notification-bell {
    margin-left: auto;
    order: -1; /* Keep bell near the right */
  }

  main {
    padding: 1rem;
  }

  .dashboard-controls {
    flex-direction: column;
    align-items: stretch !important;
    gap: 1rem;
  }

  .dashboard-controls .btn, 
  .dashboard-controls div {
    width: 100%;
    margin-left: 0 !important;
  }

  .table-responsive {
    margin-top: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive table {
    min-width: 600px;
  }

  table th, table td {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .action-links a {
    margin-right: 0 !important;
    flex: 1;
    min-width: 80px;
    text-align: center;
  }

  /* Submit Page specific split stacking */
  .submit-split-container {
      flex-direction: column !important;
  }

  .submit-split-left, .submit-split-right {
      width: 100% !important;
      min-width: 0 !important;
      flex: none !important;
  }

  /* Split layout on submit needs adjustment */
  main.container-wide > div {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  main.container-wide > div > div {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
  }

  /* Adjust buttons for easier touch */
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
}

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

  .auth-header h1 {
    font-size: 1.8rem;
  }

  .auth-split-right .auth-card {
    padding: 1.5rem;
  }

  .google-btn {
    font-size: 1rem;
    padding: 0.9rem 1.25rem;
  }

  .form-control {
    padding: 0.9rem 1rem;
    font-size: 1rem;
  }
}

/* ==================================
   ADMIN SUMMARY STRIP
   ================================== */
.summary-strip {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.summary-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1rem 1.4rem;
  flex: 1;
  min-width: 140px;
  border-left: 4px solid var(--border-color);
  transition: box-shadow 0.2s ease;
}

.summary-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.summary-card .sc-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.summary-card .sc-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.summary-card.sc-total  { border-left-color: #374151; }
.summary-card.sc-total  .sc-value { color: #374151; }
.summary-card.sc-awaiting { border-left-color: #f59e0b; }
.summary-card.sc-awaiting .sc-value { color: #f59e0b; }
.summary-card.sc-unpaid { border-left-color: #ef4444; }
.summary-card.sc-unpaid .sc-value { color: #ef4444; }
.summary-card.sc-published { border-left-color: #16a34a; }
.summary-card.sc-published .sc-value { color: #16a34a; }
.summary-card.sc-revenue { border-left-color: #16a34a; }
.summary-card.sc-revenue .sc-value { color: #16a34a; }

@media (max-width: 768px) {
  .summary-strip {
    gap: 0.75rem;
  }
  .summary-card {
    min-width: calc(50% - 0.75rem);
    flex: 0 0 calc(50% - 0.75rem);
  }
  .summary-card.sc-revenue {
    min-width: 100%;
    flex: 0 0 100%;
  }
}

/* ==================================
   REPORTS VIEW
   ================================== */
.report-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.report-controls label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.report-period-select {
  padding: 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.report-period-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.report-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.report-total-row {
  font-weight: 700;
  background: #f8f9fa;
}
