/* ========================================
   ESTILOS PADRONIZADOS - CondoTake
   ======================================== */

:root {
    --primary: #065f46;
    --primary-dark: #043d2b;
    --primary-light: #d1fae5;
    
    --secondary: #6b7280;
    --secondary-dark: #4b5563;
    --secondary-light: #f3f4f6;
    
    --danger: #dc2626;
    --danger-dark: #b91c1c;
    --danger-light: #fee2e2;
    
    --success: #10b981;
    --success-light: #d1fae5;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    
    --border: #0d7a54;
    --border-light: #e5e7eb;
    
    --bg: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    
    --radius: 16px;
    --radius-sm: 12px;
    --radius-md: 14px;
    
    --max-width: 560px;
}

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ========================================
   BOTÕES PADRONIZADOS
   ======================================== */

.btn {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Botão Primário (Verde) */
.btn-primary,
.btn.primary,
.btn.dark,
.btn.final {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.btn.primary:hover,
.btn.dark:hover,
.btn.final:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

/* Botão Secundário (Cinza) */
.btn-secondary,
.btn.secondary,
.btn.gray {
    background: var(--secondary-light);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover,
.btn.secondary:hover,
.btn.gray:hover {
    background: #e5e7eb;
    border-color: var(--secondary);
}

/* Botão Perigo (Vermelho) */
.btn-danger,
.btn.danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover,
.btn.danger:hover {
    background: var(--danger-dark);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Botão Sucesso (Verde claro) */
.btn-success,
.btn.success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover,
.btn.success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Botão Pequeno */
.btn-sm {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Botão Ícone */
.btn-icon {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
}

/* ========================================
   ALERTAS E MENSAGENS
   ======================================== */

.alert {
    width: 100%;
    max-width: var(--max-width);
    padding: 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 16px;
}

.alert-success,
.msg.ok {
    background: var(--success-light);
    color: var(--primary);
    border: 2px solid var(--success);
}

.alert-error,
.alert-danger,
.msg.err {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 2px solid #fecaca;
}

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

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
}

/* ========================================
   CARDS E CONTAINERS
   ======================================== */

.card,
.block {
    width: 100%;
    max-width: var(--max-width);
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    border: 2px solid var(--border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.card-sm,
.block {
    padding: 20px;
    border: 2px solid var(--border-light);
}

/* ========================================
   FORMULÁRIOS
   ======================================== */

.form,
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group,
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    background: #f9fafb;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

textarea {
    height: 80px;
    resize: none;
}

/* ========================================
   TIPOGRAFIA
   ======================================== */

h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--primary);
    text-align: center;
}

h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--primary);
}

h3 {
    margin: 0 0 16px 0;
    color: var(--primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========================================
   LOADING E SPINNER
   ======================================== */

.loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading.active {
    display: flex;
}

.loading .box {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.spin {
    width: 40px;
    height: 40px;
    border: 4px solid var(--secondary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading .t {
    font-weight: 900;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 4px;
}

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

body.is-loading {
    overflow: hidden;
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 12px;
}

.gap-lg {
    gap: 16px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
