/* ============================================
   MONOGRAFIS - Main CSS
   Cores: Laranja (#F97316), Azul (#1a73e8), Preto, Branco
   ============================================ */

:root {
  --orange: #F97316;
  --orange-dark: #ea6a08;
  --orange-light: #fff7ed;
  --orange-50: #fff7ed;
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --blue-light: #e8f0fe;
  --black: #1a1a1a;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 2px 8px rgba(0,0,0,.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.15);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { font-size: 16px; }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all .15s ease;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-orange { background: var(--orange); color: white; border-color: var(--orange); }
.btn-orange:hover { background: var(--orange-dark); }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); color: var(--gray-600); display: flex; align-items: center; }
.btn-icon:hover { background: var(--gray-100); color: var(--gray-900); }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 14px; color: var(--gray-900); background: white; font-family: var(--font);
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,115,232,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.input-xl { font-size: 15px !important; padding: 12px 14px !important; }
.input-lg { font-size: 15px !important; }
.input-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; display: block; }
.required { color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }

/* ---- Alerts ---- */
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }

/* ---- Modals ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 1000; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  animation: modalIn .2s ease;
}
.modal-sm { max-width: 400px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--gray-200);
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray-500); padding: 0 4px; line-height: 1; }
.modal-close:hover { color: var(--gray-900); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; justify-content: flex-end; }
.modal-desc { font-size: 14px; color: var(--gray-600); margin-bottom: 16px; }
@keyframes modalIn { from { opacity:0; transform:translateY(8px) scale(.97) } to { opacity:1; transform:none } }

/* ---- Logo ---- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { 
  width: 34px; height: 34px; border-radius: 8px; font-weight: 700; font-size: 18px; color: white;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange) 0%, #f59e0b 100%);
}
.logo-icon-sm {
  width: 28px; height: 28px; border-radius: 6px; font-weight: 700; font-size: 15px; color: white;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange) 0%, #f59e0b 100%);
  flex-shrink: 0;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--gray-900); letter-spacing: -.3px; }

/* ---- User menu ---- */
.user-avatar, .user-avatar-sm {
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue);
  color: white; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
}
.user-avatar-sm { width: 30px; height: 30px; font-size: 13px; }

/* ---- Flex ---- */
.flex-grow { flex: 1; }
