/* =====================================================================
   COMPONENTES COMPARTILHADOS - BOTÕES, CARDS, MODAIS, BADGES E TOASTS
===================================================================== */

/* Cards com Efeito Glassmorphism */
.card-glass {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

/* Botões Oficiais */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 53, 148, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 53, 148, 0.35);
}

/* Botão Ouro Metálico com Alto Contraste Escuro */
.btn-secondary {
    background: var(--secondary-gradient);
    color: #1E1300;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255, 184, 0, 0.35);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.5);
    filter: brightness(1.03);
}

.btn-success {
    background: var(--success-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: #FFFFFF;
}

.btn-outline {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Formulários e Inputs */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--surface);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 53, 148, 0.12);
}

/* Badges / Etiquetas */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--secondary-light);
    color: #9A6700;
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* Modais */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 21, 57, 0.65);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
}

.modal-backdrop.active,
.modal-backdrop[style*="display: flex"] {
    display: flex !important;
}

.modal-box {
    background: var(--surface);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalPop {
    0% { transform: scale(0.94); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 22px 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-muted);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toasts / Notificações Flutuantes */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-item {
    background: var(--surface-dark);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--secondary);
    animation: slideInRight 0.25s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}