* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3269d8;
    --primary-dark: #0044d8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #475569;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--surface-light);
    color: var(--text);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
}

/* Cards */
.card, .form-card, .detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Forms */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-item {
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 8px;
}

.question-item label {
    display: block;
    margin-bottom: 0.5rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-actions {
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--border);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
}

/* Search */
.search-section {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
}

/* Clients List */
.clients-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.client-item:hover,
.client-item.active {
    border-color: var(--primary);
    background: var(--surface-light);
}

.client-info span {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Score Badge */
.score-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.score-muito-baixo { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.score-baixo { background: rgba(132, 204, 22, 0.2); color: #84cc16; }
.score-moderado { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.score-alto { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.score-muito-alto { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid;
}

.score-circle.score-muito-baixo { border-color: #22c55e; }
.score-circle.score-baixo { border-color: #84cc16; }
.score-circle.score-moderado { border-color: #eab308; }
.score-circle.score-alto { border-color: #f97316; }
.score-circle.score-muito-alto { border-color: #ef4444; }

.score-value {
    font-size: 2rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.perfil-info h2 {
    font-size: 1.5rem;
}

.perfil-info p {
    color: var(--text-muted);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.detail-card h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.detail-card p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.detail-card strong {
    color: var(--text);
}

/* CSS do Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--surface);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 10;
}

.dropdown-content a {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--surface-light);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .btn-primary {
    background-color: var(--primary-dark);
}