/* AFE Leaks Modern Theme - Tailwind CSS Custom Build */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* Tailwind CSS CDN with custom theme */
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  /* Brand Colors */
  --brand: #00b09a;
  --brand-600: #009784;
  --brand-700: #008673;
  --brand-50: #f0fffe;
  --brand-100: #ccfbf1;
  
  /* Neutrals */
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  
  /* Accent */
  --accent: #978b82;
  
  /* Status Colors */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Shadows */
  --shadow-soft: 0 8px 30px rgba(0,0,0,.05);
  --shadow-medium: 0 4px 20px rgba(0,0,0,.08);
  --shadow-strong: 0 12px 40px rgba(0,0,0,.12);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

/* Component Classes */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand);
  color: white;
}

.btn-primary:hover {
  background-color: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
}

.card {
  background: white;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 1rem;
  font-size: 0.875rem;
  background-color: white;
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 176, 154, 0.1);
}

.select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 1rem;
  font-size: 0.875rem;
  background-color: white;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
  appearance: none;
}

.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 176, 154, 0.1);
}

/* Layout Classes */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 48rem;
  margin: 0 auto 2rem auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.navbar-container {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--gray-900);
  text-decoration: none;
}

.navbar-brand img {
  height: 1.5rem;
}

.navbar-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.navbar-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar-nav a:hover {
  color: var(--brand);
}

.navbar-nav a.active {
  color: var(--brand);
  font-weight: 600;
}

.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: calc(100vh - 3.5rem);
}

.app-sidebar {
  width: 20rem;
  background: white;
  border-right: 1px solid var(--gray-200);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  overflow-y: auto;
}

.app-main {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.filter-section label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Data Table */
.data-table {
  background: white;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.data-table-scroll {
  overflow: auto;
  max-height: 70vh;
}

.data-table table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.data-table thead {
  background-color: var(--gray-50);
  position: sticky;
  top: 0;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.data-table th {
  font-weight: 600;
  color: var(--gray-700);
}

.data-table tr:hover {
  background-color: var(--brand-50);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.metric-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-200);
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* Responsive Design */
@media (min-width: 768px) {
  .navbar-nav {
    display: flex;
  }
  
  .hero h1 {
    font-size: 4rem;
  }
}

@media (max-width: 767px) {
  .app-layout {
    flex-direction: column;
  }
  
  .app-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
}

/* Utility Classes */
.text-brand { color: var(--brand); }
.bg-brand { background-color: var(--brand); }
.border-brand { border-color: var(--brand); }

.text-muted { color: var(--gray-600); }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.hidden { display: none !important; }
.sr-only { 
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--brand);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animation Utilities */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
