/* ======================================================
   RECORDATORIOS WHATSAPP — Premium Dark Theme
   ====================================================== */

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Background layers */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --bg-input: #0f1724;
  --bg-overlay: rgba(0, 0, 0, 0.6);

  /* Text */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0e17;

  /* Brand colors */
  --wa-green: #25D366;
  --wa-green-dim: rgba(37, 211, 102, 0.15);
  --wa-green-glow: rgba(37, 211, 102, 0.3);
  --google-blue: #4285F4;
  --google-blue-dim: rgba(66, 133, 244, 0.15);

  /* Status */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-dim: rgba(59, 130, 246, 0.15);

  /* Borders */
  --border-color: rgba(148, 163, 184, 0.1);
  --border-focus: var(--wa-green);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--wa-green-glow);

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 0px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ======================================================
   SIDEBAR
   ====================================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--wa-green), #128C7E);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  padding: 1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
}

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

.nav-link.active {
  background: var(--wa-green-dim);
  color: var(--wa-green);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--wa-green);
  border-radius: 0 3px 3px 0;
}

.nav-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
  display: none;
}

.nav-badge.connected { background: var(--success); display: block; box-shadow: 0 0 8px var(--success); }
.nav-badge.disconnected { background: var(--danger); display: block; box-shadow: 0 0 8px var(--danger); }
.nav-badge.waiting { background: var(--warning); display: block; box-shadow: 0 0 8px var(--warning); animation: pulse 1.5s infinite; }

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* ======================================================
   MAIN CONTENT
   ====================================================== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
  position: relative;
}

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 99;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ======================================================
   CARDS
   ====================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(148, 163, 184, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.card-header .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-weight: 600;
}

/* ======================================================
   STATS GRID
   ====================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card.green::before { background: linear-gradient(90deg, var(--wa-green), #128C7E); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--google-blue), #1a73e8); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--warning), #d97706); }
.stat-card.red::before { background: linear-gradient(90deg, var(--danger), #dc2626); }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* ======================================================
   STATUS INDICATORS
   ====================================================== */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.status-dot.connected { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-dot.disconnected { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.status-dot.waiting { background: var(--warning); box-shadow: 0 0 10px var(--warning); animation: pulse 1.5s infinite; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-weight: 600;
}

.badge.success { background: var(--success-dim); color: var(--success); }
.badge.warning { background: var(--warning-dim); color: var(--warning); }
.badge.danger { background: var(--danger-dim); color: var(--danger); }
.badge.info { background: var(--info-dim); color: var(--info); }

/* ======================================================
   FORMS
   ====================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px var(--wa-green-dim);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--wa-green), #128C7E);
  color: white;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
}

.btn-google {
  background: linear-gradient(135deg, var(--google-blue), #1a73e8);
  color: white;
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

.btn-google:hover {
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.4);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-warning {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-warning:hover { background: rgba(245, 158, 11, 0.25); }

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: var(--bg-input);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}

td {
  border-bottom: 1px solid var(--border-color);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card-hover); }

.text-truncate {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ======================================================
   QR CODE
   ====================================================== */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.qr-image {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: fadeIn 0.4s ease;
}

.qr-image img {
  width: 280px;
  height: 280px;
  display: block;
}

.qr-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.qr-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--wa-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ======================================================
   SHORTCODE TAGS
   ====================================================== */
.shortcodes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.shortcode-tag {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--wa-green);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.shortcode-tag:hover {
  background: var(--wa-green-dim);
  border-color: var(--wa-green);
}

.shortcode-tag .desc {
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  margin-left: 0.35rem;
  font-size: 0.72rem;
}

/* ======================================================
   TEMPLATE PREVIEW
   ====================================================== */
.template-preview {
  background: #0b3d2e;
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #d1fae5;
  position: relative;
}

.template-preview::before {
  content: 'Vista previa';
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: #0b3d2e;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  color: var(--wa-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ======================================================
   EMPTY STATE
   ====================================================== */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ======================================================
   GRID LAYOUTS
   ====================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

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

/* ======================================================
   ACCOUNT CARD
   ====================================================== */
.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-base);
}

.account-card:hover {
  border-color: rgba(148, 163, 184, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.account-card .account-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.account-avatar.google {
  background: var(--google-blue-dim);
  color: var(--google-blue);
}

.account-info h3 {
  font-size: 1rem;
  font-weight: 700;
}

.account-info .email {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.account-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.account-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.account-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* ======================================================
   REMINDER CARD
   ====================================================== */
.reminder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.reminder-card:hover {
  border-color: rgba(148, 163, 184, 0.2);
}

.reminder-card-body {
  padding: 1.5rem;
}

.reminder-card .reminder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.reminder-card .reminder-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reminder-timing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  background: var(--info-dim);
  color: var(--info);
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  font-weight: 600;
}

.reminder-template {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 120px;
  overflow: hidden;
  position: relative;
}

.reminder-template::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--bg-input));
}

.reminder-card-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
}

/* ======================================================
   WA STATUS PANEL
   ====================================================== */
.wa-status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  text-align: center;
}

.wa-connected-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--success-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  width: 100%;
  max-width: 400px;
}

.wa-connected-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--wa-green), #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-connected-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.wa-connected-text {
  text-align: left;
}

.wa-connected-text h3 {
  color: var(--success);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.wa-connected-text p {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ======================================================
   LOGIN PAGE
   ====================================================== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 2rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.5s ease;
}

.login-card .logo {
  justify-content: center;
  margin-bottom: 2rem;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-error {
  background: var(--danger-dim);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.pin-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  font-weight: 700;
  padding: 1rem;
}

/* ======================================================
   MODAL / DIALOG
   ====================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.modal-close:hover { color: var(--text-primary); }

/* ======================================================
   TOAST / NOTIFICATIONS
   ====================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ======================================================
   SECTION DIVIDERS
   ====================================================== */
.section-gap { margin-bottom: 2rem; }

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.inline-form .form-group { margin-bottom: 0; flex: 1; }

/* ======================================================
   ANIMATIONS
   ====================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ======================================================
   CALENDAR SELECT LIST
   ====================================================== */
.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calendar-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-option:hover {
  border-color: var(--text-muted);
}

.calendar-option.selected,
.calendar-option:has(input:checked) {
  border-color: var(--google-blue);
  background: var(--google-blue-dim);
}

.calendar-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-option input[type="radio"] {
  display: none;
}

.calendar-option .cal-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.calendar-option .cal-id {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ======================================================
   ALERTS
   ====================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert.success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.2); }
.alert.error { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert.warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.alert.info { background: var(--info-dim); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.2); }

/* ======================================================
   SETTINGS PAGE
   ====================================================== */
.settings-form {
  max-width: 560px;
}

/* ======================================================
   LOG STATUS COLORS
   ====================================================== */
.status-sent { color: var(--success); }
.status-failed { color: var(--danger); }
.status-pending { color: var(--warning); }

/* ======================================================
   TOGGLE SWITCH
   ====================================================== */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: all var(--transition-fast);
}

.toggle input:checked + .toggle-slider {
  background: var(--wa-green-dim);
  border-color: var(--wa-green);
}

.toggle input:checked + .toggle-slider::before {
  background: var(--wa-green);
  transform: translateX(20px);
}

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
    padding-top: 4rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .qr-image img {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
