/* ============================================
   styles.css — Global / Base
   ============================================ */

/* --- Variáveis --- */
:root {
    --clr-primary: #3a7bd5;
    --clr-primary-dark: #2a5fa8;
    --clr-secondary: #f0a500;
    --clr-bg: #f5f7fa;
    --clr-surface: #ffffff;
    --clr-text: #2d3748;
    --clr-text-muted: #718096;
    --clr-border: #e2e8f0;
    --clr-danger: #e53e3e;
    --clr-success: #38a169;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --transition: .2s ease;
    --font-main: 'Segoe UI', sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background: var(--clr-bg);
    color: var(--clr-text);
    min-height: 100vh;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--clr-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Layout base --- */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Botões --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    user-select: none;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--clr-primary);
    color: #fff;
}

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

.btn-secondary {
    background: var(--clr-border);
    color: var(--clr-text);
}

.btn-secondary:hover {
    background: #d4dbe5;
}

.btn-danger {
    background: var(--clr-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-full {
    width: 100%;
}

/* --- Inputs --- */
.input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    background: var(--clr-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(58,123,213,.2);
}

.input::placeholder {
    color: var(--clr-text-muted);
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--clr-text-muted);
}

.form-group {
    margin-bottom: 18px;
}

/* --- Cards --- */
.card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* --- Mensagens / Alertas --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 16px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-error {
    background: #fff0f0;
    color: var(--clr-danger);
    border: 1px solid #fcc;
}

.alert-success {
    background: #f0fff4;
    color: var(--clr-success);
    border: 1px solid #c6f6d5;
}

/* --- Loading spinner --- */
.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--clr-border);
    border-top-color: var(--clr-primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Utilitários --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }


