@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --gap-bg: #050814;
  --gap-surface: #0b1020;
  --gap-surface-muted: #131829;
  --gap-primary: #1f7aed;
  --gap-primary-hover: #265faf;
  --gap-border: #252a3c;
  --gap-text: #f5f7fb;
  --gap-text-muted: #a3adc2;
  --gap-danger: #e5484d;
}

html, body { height: 100%; margin: 0; }
body {
  background: var(--gap-bg);
  color: var(--gap-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Login */
.gap-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gap-bg); }
.gap-login-card { width: 100%; max-width: 28rem; padding: 2.5rem 2rem; background: var(--gap-surface); border: 1px solid var(--gap-border); border-radius: 0.75rem; }
.gap-login-title { font-size: 1.5rem; font-weight: 600; color: var(--gap-text); margin: 0 0 0.25rem 0; }
.gap-login-subtitle { font-size: 0.875rem; color: var(--gap-text-muted); margin: 0 0 2rem 0; }
.gap-form-group { margin-bottom: 1.5rem; }
.gap-form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gap-text-muted); margin-bottom: 0.5rem; }
.gap-form-input {
  width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem;
  background: var(--gap-surface-muted); border: 1px solid var(--gap-border); border-radius: 0.375rem;
  color: var(--gap-text); outline: none; box-sizing: border-box;
}
.gap-form-input::placeholder { color: rgba(163, 173, 194, 0.6); }
.gap-form-input:focus { border-color: var(--gap-primary); box-shadow: 0 0 0 1px var(--gap-primary); }
.gap-btn-primary {
  width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500;
  background: var(--gap-primary); color: white; border: none; border-radius: 0.375rem;
  cursor: pointer; transition: background 0.15s;
}
.gap-btn-primary:hover:not(:disabled) { background: var(--gap-primary-hover); }
.gap-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.gap-error-msg { font-size: 0.875rem; color: var(--gap-danger); background: rgba(229, 72, 77, 0.1); border: 1px solid rgba(229, 72, 77, 0.4); border-radius: 0.375rem; padding: 0.5rem 0.75rem; margin-bottom: 1rem; }

/* Shell / Painel */
.gap-shell { min-height: 100vh; display: flex; background: var(--gap-bg); color: var(--gap-text); }
.gap-sidebar { width: 16rem; background: var(--gap-surface); border-right: 1px solid var(--gap-border); display: flex; flex-direction: column; }
.gap-sidebar-brand { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gap-border); }
.gap-sidebar-brand-title { font-size: 0.875rem; font-weight: 600; color: var(--gap-text); }
.gap-sidebar-brand-sub { font-size: 0.75rem; color: var(--gap-text-muted); margin-top: 0.25rem; }
.gap-sidebar-nav { flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.gap-sidebar-link { display: block; padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--gap-text-muted); text-decoration: none; border-radius: 0.375rem; transition: background 0.15s; }
.gap-sidebar-link:hover { background: var(--gap-surface-muted); color: var(--gap-text); }
.gap-sidebar-footer { padding: 1rem; border-top: 1px solid var(--gap-border); font-size: 0.75rem; color: var(--gap-text-muted); }
.gap-sidebar-user { font-weight: 500; color: var(--gap-text); }
.gap-sidebar-user-email { font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gap-btn-outline { padding: 0.25rem 0.5rem; font-size: 0.6875rem; background: transparent; border: 1px solid var(--gap-border); border-radius: 0.375rem; color: var(--gap-text-muted); cursor: pointer; margin-left: 0.75rem; }
.gap-btn-outline:hover { background: var(--gap-surface-muted); }
.gap-main { flex: 1; background: var(--gap-bg); }
.gap-header { height: 3.5rem; border-bottom: 1px solid var(--gap-border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; background: rgba(5, 8, 20, 0.6); }
.gap-header-title { font-size: 0.875rem; font-weight: 500; }
.gap-header-version { font-size: 0.75rem; color: var(--gap-text-muted); }
.gap-content { padding: 1.5rem; }
.gap-page-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.25rem 0; }
.gap-page-desc { font-size: 0.875rem; color: var(--gap-text-muted); margin: 0 0 1.5rem 0; max-width: 42rem; }
.gap-card { background: var(--gap-surface); border: 1px solid var(--gap-border); border-radius: 0.75rem; padding: 1rem; margin-bottom: 1rem; }
.gap-card-label { font-size: 0.75rem; color: var(--gap-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.gap-card-text { font-size: 0.875rem; color: var(--gap-text); }
.gap-cards-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .gap-cards-grid { grid-template-columns: repeat(3, 1fr); } }
.gap-cards-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .gap-cards-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Tables */
.gap-table-wrap { background: var(--gap-surface); border: 1px solid var(--gap-border); border-radius: 0.75rem; overflow: hidden; }
.gap-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.gap-table th { text-align: left; padding: 0.5rem 1rem; background: var(--gap-surface-muted); color: var(--gap-text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.gap-table td { padding: 0.5rem 1rem; border-top: 1px solid rgba(37, 42, 60, 0.6); color: var(--gap-text); }
.gap-table tr:hover td { background: rgba(19, 24, 41, 0.6); }
.gap-table .gap-badge { display: inline-flex; padding: 0.125rem 0.5rem; font-size: 0.75rem; border-radius: 9999px; }
.gap-badge-success { background: rgba(44, 197, 111, 0.15); color: #2cc56f; border: 1px solid rgba(44, 197, 111, 0.3); }
.gap-badge-muted { background: rgba(37, 42, 60, 0.2); color: var(--gap-text-muted); border: 1px solid var(--gap-border); }
.gap-btn-sm { display: inline-flex; padding: 0.25rem 0.5rem; font-size: 0.75rem; background: transparent; border: 1px solid var(--gap-border); border-radius: 0.375rem; color: var(--gap-text); cursor: pointer; margin-right: 0.5rem; }
.gap-btn-sm:hover { background: var(--gap-surface-muted); }
.gap-btn-sm:disabled { opacity: 0.6; cursor: not-allowed; }

