:root {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --secondary: #10b981;
  --dark: #090d10;           /* Midnight Dark background */
  --darker: #050708;         /* Sub-background / sidebar */
  --light: #ffffff;          /* Text color */
  --gray: #94a3b8;           /* Muted text color */
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glass: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --glow-green: rgba(34, 197, 94, 0.15);
}


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

html {
  background: radial-gradient(circle at 50% 45%, #062a19 0%, #020304 100%) fixed;
  background-color: #020304;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-sans);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: -20%;
  right: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.16) 0%, rgba(34, 197, 94, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -20%;
  left: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  font-weight: 600;
  min-height: 44px; /* Touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Global logo image sizing */
.logo img {
  height: 56px !important;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* Center logo in auth cards */
.auth-card .logo, .text-center .logo {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

/* Sidebar logo sizing for dashboards */
.sidebar .logo img {
  height: 48px !important;
  margin: 0;
}

input, select, textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: #f1f5f9;
  padding: 12px 16px;
  border-radius: var(--radius);
  outline: none;
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 16px; /* Prevents iOS zoom */
  min-height: 44px; /* Touch target */
  transition: all 0.2s ease;
  box-sizing: border-box;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
}

select option {
  background: var(--darker);
  color: #f1f5f9;
  padding: 12px;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group > label:first-child {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  min-width: 0; /* Prevents grid/flex blowout */
  box-sizing: border-box;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: rgba(34, 197, 94, 0.1);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  padding: 12px 24px;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.text-gradient {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Utils */
.flex { display: flex; flex-wrap: wrap; }
.no-wrap { flex-wrap: nowrap !important; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.max-w-full { max-width: 100%; }

@media (min-width: 768px) {
  .md-flex-row { flex-direction: row !important; }
}
/* Mobile Adjustments */
@media (max-width: 768px) {
  :root {
    --radius: 10px;
  }
  
  .container {
    padding: 0 16px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .btn-primary, .btn-outline, .btn-danger {
    width: 100%; /* Force full width on small mobile */
    margin-bottom: 8px;
  }
}
