/* =========================================================
   Sistema de Anfitriãs - PIB do Brasil
   Identidade: Espresso escuro + Cobre/Âmbar
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Playfair+Display:ital,wght@1,600&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #10142a;
    --bg-surface: #161b38;
    --bg-surface-alt: #1c2244;
    --bg-elevated: #242b54;

    --border-subtle: #2b3157;
    --border-strong: #383f6b;

    --accent: #c9a24d;
    --accent-hover: #dab566;
    --accent-soft: rgba(201, 162, 77, 0.15);

    --text-primary: #f5f0e4;
    --text-secondary: #b9bcd690;
    --text-secondary-solid: #9ea3c4;
    --text-muted: #6e7295;

    --success: #7a9b6e;
    --success-soft: rgba(122, 155, 110, 0.15);
    --danger: #c15f4f;
    --danger-soft: rgba(193, 95, 79, 0.15);
    --warning: #d4a355;
    --warning-soft: rgba(212, 163, 85, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);

    --font-display: 'Fraunces', serif;
    --font-script: 'Playfair Display', serif;
    --font-body: 'Work Sans', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Textura sutil de fundo - remete a grãos/café */
.bg-texture {
    background-image: radial-gradient(circle at 1px 1px, rgba(242, 232, 220, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ---------------------------------------------------------
   Botões
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--accent);
    color: #1a1512;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary-solid);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------
   Formulários
   --------------------------------------------------------- */
.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary-solid);
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.field-radio-group {
    display: flex;
    gap: 10px;
}

.field-radio-option {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

.field-radio-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

/* ---------------------------------------------------------
   Layout Dashboard
   --------------------------------------------------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    flex-shrink: 0;
}

.sidebar.collapsed { width: 76px; }

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(201,162,77,0.25);
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-logo-img {
    width: 32px;
    height: 32px;
}

.sidebar-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-user-info {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 16px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary-solid);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-item svg { flex-shrink: 0; width: 18px; height: 18px; }

.nav-item:hover {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 100%;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
}

.page-subtitle {
    color: var(--text-secondary-solid);
    font-size: 14px;
    margin-top: 4px;
}

/* Badges de status */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }

/* Mobile */
@media (max-width: 860px) {
    .sidebar { position: fixed; z-index: 40; height: 100vh; left: -260px; }
    .sidebar.mobile-open { left: 0; }
    .main-content { padding: 20px; }
}
