/* UI/UX Pro Max - SaaS Base Styles */
:root {
  /* Colors */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadows & Borders */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Layouts */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--slate-100);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: white;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--slate-900); }
.badge { background: var(--slate-100); color: var(--slate-600); font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 999px; font-weight: 500; }

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--slate-600);
  font-weight: 500;
  transition: all 0.2s;
}
.sidebar-nav li a:hover {
  background-color: var(--slate-50);
  color: var(--slate-900);
}
.sidebar-nav li.divider {
  height: 1px;
  background-color: var(--slate-100);
  margin: 1rem 1.5rem;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--slate-100);
}
.user-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.75rem; }

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* fix flex overflow */
}

.top-header {
  background-color: white;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--slate-200);
}
.top-header h1 { font-size: 1.5rem; font-weight: 600; }

.content-wrapper {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Cards & Forms */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  background: white;
}
.card-body { padding: 1.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: white; border-color: var(--slate-300); color: var(--slate-700); }
.btn-outline:hover { background-color: var(--slate-50); border-color: var(--slate-400); color: var(--slate-900); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
.alert-error { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* Tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
table th {
  background-color: var(--slate-50);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--slate-500);
  font-weight: 600;
  border-bottom: 1px solid var(--slate-200);
}
table td {
  padding: 1rem;
  border-bottom: 1px solid var(--slate-100);
  font-size: 0.875rem;
  color: var(--slate-700);
}
table tr:last-child td { border-bottom: none; }

/* Status Badges */
.status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.status.publicado { background: #dcfce7; color: #166534; }
.status.rascunho { background: #fef3c7; color: #92400e; }
.status.ativo { background: #dbeafe; color: #1e40af; }

/* Auth Box */
.auth-box {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--slate-200);
}
.auth-box h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }

/* Utils */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.text-right { text-align: right; }
.text-muted { color: var(--slate-500); }
