:root {
    /* Colors - Modern Indigo/Violet Palette */
    --primary-color: #4f46e5; /* Indigo 600 */
    --primary-hover: #4338ca;
    --secondary-color: #f3f4f6;
    --secondary-hover: #e5e7eb;
    
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --bg-color: #f9fafb;
    --surface-color: #ffffff;
    
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #ffffff;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Mode temporariamente desativado para forçar o fundo claro especificado */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: url('../img/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Mobile viewport height fix */
    overflow: hidden;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Typography Helpers */
h1, h2, h3 { font-weight: 600; }
p { line-height: 1.5; }

/* Buttons */
button {
    font-family: var(--font-family);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: var(--text-light);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    transition: var(--transition);
}
.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}


.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-main);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}


.icon-button {
    background: transparent;
    color: var(--text-main);
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-button:hover, .icon-button:active {
    background: var(--secondary-color);
}

/* Splash Screen */
#splash-screen {
    background: transparent;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.splash-content {
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.brand-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.kodey-logo {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    z-index: 20;
}

.glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}



/* Menu Layout */
.menu-content {
    padding: 2rem 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.menu-card.hidden {
    display: none;
}

.menu-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.menu-card span {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.menu-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.menu-card.primary-card {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white;
}
.menu-card.primary-card p { color: rgba(255, 255, 255, 0.8); }

.menu-card.secondary-card {
    border: 1px solid var(--secondary-color);
}
.menu-card.secondary-card i { color: var(--primary-color); }

.menu-card.success-card {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
}
.menu-card.success-card p { color: rgba(255, 255, 255, 0.8); }

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.menu-card:active { transform: translateY(0) scale(0.98); }

#survey-list-screen .app-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 1.5rem;
}

#survey-list-screen .app-header h2 {
    margin-left: 1rem;
    font-size: 1.25rem;
}

.list-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.list-item-card {
    background: var(--surface-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.list-item-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.list-item-content h3 {
    font-size: 1.125rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.list-item-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-extra-info {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-top: 0.25rem;
}

.card-extra-info strong {
    font-weight: 600;
}

/* Status Panel */
.status-panel {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-align: center;
}

.status-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-success .status-label, .status-success .status-value {
    color: var(--success-color);
}

.status-warning .status-label, .status-warning .status-value {
    color: var(--warning-color);
}

.status-danger .status-label, .status-danger .status-value {
    color: var(--danger-color);
}

/* Modals & Glassmorphism */
.modal-glass {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 100;
}

.auth-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.auth-card .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.auth-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
}

.auth-card h2 { margin-bottom: 0.5rem; }
.auth-card p { color: var(--text-muted); margin-bottom: 1.5rem; }

.input-group {
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Survey Engine */
.survey-header-container {
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.survey-header-main {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
}

.survey-titles {
    flex: 1;
    margin: 0 1rem;
    overflow: hidden;
}

#survey-header-title {
    font-size: 1.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 0.1rem;
}

#survey-header-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    min-width: 220px;
    z-index: 100;
    border: 1px solid var(--secondary-color);
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--secondary-color);
    cursor: pointer;
}

.dropdown-menu button:hover {
    background: var(--secondary-color);
}

.progress-container {
    height: 4px;
    background: var(--secondary-color);
    width: 100%;
}

.progress-container.hidden {
    display: none;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.survey-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Question Content Styles */
.question-label {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.text-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--secondary-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 1.125rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Radio Options List */
.options-list {
    display: grid;
    gap: 0.25rem 0.5rem; /* Menor espaçamento vertical e horizontal */
    margin-top: 0.5rem;
    width: 100%;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 0.4rem 0.25rem; /* Padding bem menor, apenas para dar área de clique */
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.option-item:hover {
    background: var(--secondary-color);
}

.option-item.selected {
    background: rgba(79, 70, 229, 0.1);
}

/* Opções com resposta auxiliar (Outros) - Estilo aplicado apenas ao texto/label */
.option-item.has-other:hover,
.option-item.has-other.selected {
    background: transparent; /* Remove o fundo do container externo */
}

.option-item.has-other .option-label {
    border: 1px dashed rgba(79, 70, 229, 0.35);
    background: rgba(79, 70, 229, 0.02);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.option-item.has-other:hover .option-label {
    border-color: rgba(79, 70, 229, 0.6);
    background: rgba(79, 70, 229, 0.05);
}

.option-item.has-other.selected .option-label {
    border-color: var(--primary-color);
    border-style: solid;
    background: rgba(79, 70, 229, 0.1);
}

.option-item.has-other input[type="radio"],
.option-item.has-other input[type="checkbox"] {
    margin-top: 0.45rem; /* Alinha com a primeira linha de texto que possui padding */
}



.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    margin-top: 0.2rem;
    margin-right: 0.75rem;
    transform: scale(1.2);
    accent-color: var(--primary-color);
    cursor: pointer;
}

.option-label {
    font-size: 1rem;
    color: var(--text-main);
    flex: 1;
    line-height: 1.4;
    user-select: none;
}

.other-input {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-main);
}
.other-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.survey-footer {
    padding: 1rem 1.5rem;
    background: var(--surface-color);
    border-top: 1px solid var(--secondary-color);
    display: flex;
    gap: 1rem;
}

.survey-footer button {
    flex: 1;
}

.survey-footer button.hidden {
    display: none;
}

/* Utilities */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
