/* 
 * Estilo Premium para o Sistema de Pesquisa de Satisfação
 * Cores claras, tipografia moderna e transições suaves.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --accent: #0ea5e9;
    --border: #e2e8f0;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 650px;
}

.container-wide {
    width: 100%;
    max-width: 1000px;
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 35px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 30px;
}

.question-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: block;
}

.question-label .required {
    color: var(--danger);
    margin-left: 4px;
}

/* Radio Button Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background-color: var(--bg-primary);
    border-color: var(--primary-light);
}

.option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 14px;
    transition: all 0.2s ease;
}

.option-item:hover input ~ .checkmark {
    border-color: var(--primary);
}

.option-item input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.option-item input:checked ~ .checkmark:after {
    display: block;
}

.option-item .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.option-item .option-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.option-item input:checked ~ .option-text {
    color: var(--primary);
}

.option-item input:checked {
    border-color: var(--primary);
}
.option-item.selected-item {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Star/Rating Input */
.rating-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 10px;
}

.rating-container input {
    display: none;
}

.rating-container label {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 20px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.rating-container label:hover,
.rating-container label:hover ~ label,
.rating-container input:checked ~ label {
    background-color: var(--warning-light);
    border-color: var(--warning);
    color: var(--warning);
}

/* Text Inputs */
textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-primary);
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Alerts and Messages */
.alert {
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-success {
    background-color: var(--success-light);
    border: 1px solid var(--success);
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border: 1px solid var(--danger);
    color: #991b1b;
}

.alert-warning {
    background-color: var(--warning-light);
    border: 1px solid var(--warning);
    color: #92400e;
}

.message-card {
    text-align: center;
    padding: 50px 30px;
}

.message-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Reports/Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.chart-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 25px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

.chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 5px;
}

/* Navigation & Action bar in reports */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.tab-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.tab-link.active, .tab-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.comment-card {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent);
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.comment-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media(max-width: 600px) {
    body {
        padding: 15px 10px;
    }
    .card {
        padding: 25px 15px;
    }
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Character Counter */
.char-counter {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.char-counter.limit-exceeded {
    color: var(--danger);
    font-weight: 600;
}
