/* assets/css/virginia.css */

:root {
    --brand-navy:    #1A2744;
    --brand-blue:    #2B5CE6;
    --brand-sky:     #E8F0FE;
    --brand-accent:  #F4A623;
    --text-primary:  #1C2B3A;
    --text-muted:    #6B7A8D;
    --bg-light:      #F7F9FC;
    --white:         #FFFFFF;
    --border:        #DDE3EE;
    --danger:        #E53E3E;
    --success:       #2F855A;
    --radius:        10px;
    --shadow-sm:     0 1px 4px rgba(0,0,0,.07);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --transition:    .18s ease;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
    background: var(--brand-navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.topbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--white);
}
.topbar-brand span { color: var(--brand-accent); }
.topbar-nav { display: flex; align-items: center; gap: .25rem; }
.topbar-nav a, .topbar-nav button {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: .4rem .8rem;
    border-radius: 6px;
    font-size: .875rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}
.topbar-nav a:hover, .topbar-nav button:hover { background: rgba(255,255,255,.12); color: var(--white); }
.topbar-nav a.active { background: rgba(255,255,255,.15); color: var(--white); }

/* ── Sidebar + Layout ── */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
    width: 230px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}
.sidebar-section {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 1rem 1.25rem .4rem;
}
.sidebar a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: .88rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar a:hover { background: var(--brand-sky); color: var(--brand-blue); }
.sidebar a.active {
    background: var(--brand-sky);
    color: var(--brand-blue);
    border-left-color: var(--brand-blue);
    font-weight: 600;
}

/* ── Main content ── */
.main { flex: 1; padding: 2rem; overflow-x: hidden; }
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--brand-navy); }
.page-subtitle { font-size: .875rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Cards ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 1.5rem; }

/* ── Stats cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-icon.blue { background: #EBF2FF; }
.stat-icon.green { background: #E6F9F0; }
.stat-icon.orange { background: #FFF4E5; }
.stat-icon.purple { background: #F3EEFF; }
.stat-num { font-size: 1.6rem; font-weight: 700; color: var(--brand-navy); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: 7px;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.4;
}
.btn-primary { background: var(--brand-blue); color: var(--white); }
.btn-primary:hover { background: #1e47d0; }
.btn-success { background: #2F855A; color: var(--white); }
.btn-success:hover { background: #276749; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #c53030; }
.btn-outline {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-light); }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }
.btn-icon { padding: .35rem .5rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: var(--text-primary); }
.form-label .req { color: var(--danger); }
.form-control {
    width: 100%;
    padding: .55rem .85rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: .9rem;
    color: var(--text-primary);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(43,92,230,.12); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
    background: var(--bg-light);
    padding: .7rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
tbody td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBFD; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}
.badge-success { background: #E6F9F0; color: #2F855A; }
.badge-danger  { background: #FEE8E8; color: #c53030; }
.badge-warning { background: #FFF4E5; color: #B7791F; }
.badge-info    { background: #EBF2FF; color: #2B5CE6; }
.badge-gray    { background: #EDF2F7; color: #718096; }

/* ── Alerts ── */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}
.alert-success { background: #E6F9F0; color: #2F855A; border-left: 4px solid #2F855A; }
.alert-danger  { background: #FEE8E8; color: #c53030; border-left: 4px solid #c53030; }
.alert-warning { background: #FFF4E5; color: #B7791F; border-left: 4px solid #F4A623; }
.alert-info    { background: var(--brand-sky); color: var(--brand-blue); border-left: 4px solid var(--brand-blue); }

/* ── Auth pages ── */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #243B6E 100%);
    padding: 1.5rem;
}
.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}
.auth-logo h1 { font-size: 1.75rem; font-weight: 800; color: var(--brand-navy); }
.auth-logo h1 span { color: var(--brand-blue); }
.auth-logo p { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }
.auth-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Question builder ── */
.question-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: .9rem;
    background: var(--white);
    position: relative;
}
.question-item .q-handle {
    color: var(--text-muted);
    cursor: grab;
    margin-right: .5rem;
}
.question-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.opcoes-lista { margin-top: .75rem; }
.opcao-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.opcao-row input { flex: 1; }
.add-opcao { font-size: .8rem; color: var(--brand-blue); cursor: pointer; border: none; background: none; padding: 0; margin-top: .25rem; }
.add-opcao:hover { text-decoration: underline; }

/* ── Formulário cliente ── */
.form-quest {
    max-width: 720px;
    margin: 0 auto;
}
.form-quest-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #243B6E 100%);
    color: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 2rem 2.25rem;
    margin-bottom: 0;
}
.form-quest-header h1 { font-size: 1.4rem; font-weight: 700; }
.form-quest-header p { opacity: .8; font-size: .9rem; margin-top: .4rem; }
.form-quest-body { background: var(--white); border-radius: 0 0 var(--radius) var(--radius); padding: 2rem 2.25rem; box-shadow: var(--shadow-md); }
.quest-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.quest-item:last-of-type { border-bottom: none; }
.quest-num {
    display: inline-block;
    background: var(--brand-sky);
    color: var(--brand-blue);
    font-weight: 700;
    font-size: .78rem;
    padding: .15rem .5rem;
    border-radius: 5px;
    margin-bottom: .5rem;
}
.quest-texto { font-weight: 600; font-size: .95rem; margin-bottom: .65rem; }
.scale-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.scale-btn {
    width: 40px; height: 40px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
    transition: var(--transition);
}
.scale-btn:hover, .scale-btn.selected {
    border-color: var(--brand-blue);
    background: var(--brand-sky);
    color: var(--brand-blue);
}

/* ── Misc ── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-1 { margin-top: .5rem; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); font-size: .875rem; }
.w-100 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
