/* Infinity Web Administration - Modern Dark Theme */
:root {
  --bg-primary: #0b0d11;
  --bg-secondary: #12151b;
  --bg-card: #181c24;
  --bg-card-hover: #1e232d;
  --bg-input: #0f1217;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --border-color: #262c38;
  --border-focus: #5865f2;
  
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-light: rgba(88, 101, 242, 0.15);
  
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
  
  --transition: all 0.2s ease-in-out;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

a {
  color: #818cf8;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #a5b4fc;
  text-decoration: none;
}

/* Layout */
.app-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header & Navigation */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #7983f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.nav-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: #3b4252;
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
}

/* Cards & Surfaces */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.subcard {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 10px 0;
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

/* Typography & Utilities */
.muted { color: var(--text-secondary); }
.dimmed { color: var(--text-muted); }
.small { font-size: 12px; }
.bold { font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Badges & Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.pill-success { background: var(--success-bg); color: #4ade80; border-color: rgba(34, 197, 94, 0.25); }
.pill-warning { background: var(--warning-bg); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.pill-danger { background: var(--danger-bg); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.pill-info { background: var(--info-bg); color: #60a5fa; border-color: rgba(59, 130, 246, 0.25); }
.pill-accent { background: var(--accent-light); color: #a5b4fc; border-color: rgba(88, 101, 242, 0.25); }

/* Form Controls */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.button:hover, button:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.button.secondary, button.secondary {
  background: #272d38;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.button.secondary:hover, button.secondary:hover {
  background: #323a48;
}

.button.success, button.success {
  background: var(--success);
}
.button.success:hover, button.success:hover {
  background: #16a34a;
}

.button.danger, button.danger {
  background: var(--danger);
}
.button.danger:hover, button.danger:hover {
  background: #dc2626;
}

.button.sm, button.sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Settings Row */
.setting-item {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr);
  gap: 18px;
  align-items: start;
  border-top: 1px solid var(--border-color);
  padding: 16px 0;
}

.setting-item:first-child {
  border-top: 0;
}

.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Alerts / Notices */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.alert-success {
  background: var(--success-bg);
  color: #86efac;
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: var(--warning-bg);
  color: #fde047;
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: var(--danger-bg);
  color: #fca5a5;
  border-left: 4px solid var(--danger);
}

.alert-info {
  background: var(--info-bg);
  color: #93c5fd;
  border-left: 4px solid var(--info);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .setting-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
}
