/* ============================================================
   Painel Anexos — Global Stylesheet
   ============================================================ */

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

:root {
  --bg:          #f4f5f7;
  --surface:     #ffffff;
  --border:      #e2e4e8;
  --accent:      #1a1d23;
  --accent-soft: #2c3140;
  --text-primary:   #1a1d23;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;
  --radius:      12px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --transition:  200ms ease;
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ---------- Header ---------- */
.site-header {
  background: var(--accent);
  color: #fff;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header .brand {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  opacity: .9;
}

.site-header .back-link {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: color var(--transition);
}

.site-header .back-link:hover { color: #fff; }

.site-header a.brand { text-decoration: none; opacity: .9; transition: opacity var(--transition); }
.site-header a.brand:hover { opacity: 1; }

.header-module {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  flex: 1;
  text-align: center;
}

.site-header .back-link svg {
  width: 14px;
  height: 14px;
}

/* ---------- Main wrapper ---------- */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ---------- Page hero ---------- */
.page-hero {
  margin-bottom: 2.5rem;
}

.page-hero .label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}

.page-hero p {
  margin-top: .5rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ---------- Index: card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.module-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.module-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.module-card p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.module-card .card-cta {
  margin-top: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  gap: .3rem;
  letter-spacing: .04em;
}

.module-card .card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.module-card:hover .card-cta svg { transform: translateX(4px); }

.module-card--disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.module-card--disabled:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}

.card-badge {
  margin-top: .5rem;
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- Module page content area ---------- */
.module-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder {
  text-align: center;
  color: var(--text-muted);
}

.placeholder .placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: .5;
}

.placeholder h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}

.placeholder p {
  font-size: .875rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .main { padding: 2rem 1rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .module-content { padding: 1.5rem; }
  .site-header { padding: 0 1rem; }
}
