/* Tables alignment improvements */
#documents-table {
    table-layout: fixed;
}
#documents-table th,
#documents-table td {
    vertical-align: middle;
}
#documents-table thead th {
    white-space: nowrap;
}
#documents-table td:first-child {
    word-wrap: break-word;
    word-break: break-word;
}
/* ========================================
   UI/UX IMPROVEMENTS - Simple Quality
   Design System Enhancements
   ======================================== */

/* ===== 1. TIPOGRAFIA E HIERARQUIA VISUAL ===== */

.main-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0b3b82;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.main-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #066BFA;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

.main-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0b3b82;
    margin-bottom: 16px;
}

.main-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 12px;
}

/* ===== 2. BOTÕES MODERNIZADOS ===== */

.sq-btn-primary, 
button[style*="background:#066BFA"],
button[style*="background: #066BFA"],
#btn-cadastrar-contrato,
.btn-cadastrar-empresa,
.sq-save-btn {
    background: linear-gradient(135deg, #066BFA 0%, #3a8df7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(6, 107, 250, 0.25) !important;
    position: relative;
    overflow: hidden;
}

.sq-btn-primary:hover,
button[style*="background:#066BFA"]:hover,
button[style*="background: #066BFA"]:hover,
#btn-cadastrar-contrato:hover,
.btn-cadastrar-empresa:hover,
.sq-save-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(6, 107, 250, 0.35) !important;
    background: linear-gradient(135deg, #044bb5 0%, #066BFA 100%) !important;
}

.sq-btn-primary:active,
.sq-save-btn:active {
    transform: translateY(0) !important;
}

/* Botão secundário */
.sq-btn-secondary,
button[data-bs-dismiss="modal"] {
    background: #f7fafc !important;
    color: #4a5568 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.sq-btn-secondary:hover {
    background: #edf2f7 !important;
    border-color: #cbd5e0 !important;
}

/* Botão de perigo */
.btn-danger,
.confirm-delete-contract {
    background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.25) !important;
    transition: all 0.3s ease !important;
}

.btn-danger:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.35) !important;
}

/* Ícone de botões */
.sq-icon-btn {
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
}

.sq-icon-btn:hover {
    background: #edf2f7 !important;
    transform: scale(1.1) !important;
}

/* ===== 3. INPUTS E FORMULÁRIOS ===== */

.main-content input[type="text"],
.main-content input[type="email"],
.main-content input[type="number"],
.main-content input[type="password"],
.main-content input[type="date"],
.main-content select,
.main-content textarea,
.form-control,
.form-select {
    background: #f7fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #2d3748 !important;
    transition: all 0.3s ease !important;
    width: 100%;
    box-sizing: border-box;
}

.main-content input:focus,
.main-content select:focus,
.main-content textarea:focus,
.form-control:focus,
.form-select:focus {
    outline: none !important;
    border-color: #066BFA !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(6, 107, 250, 0.1) !important;
}

.main-content input::placeholder,
.main-content textarea::placeholder {
    color: #a0aec0 !important;
}

/* Labels modernizados */
.form-label,
.main-content label {
    display: block;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 8px !important;
}

/* ===== 4. CARDS E CONTAINERS ===== */

.sq-card,
.form-card,
#form-cadastrar-contrato,
#form-cadastrar-empresa,
.sq-modal-panel {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(6, 107, 250, 0.08) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
    border: 1px solid rgba(6, 107, 250, 0.08) !important;
    transition: all 0.3s ease !important;
}

.sq-card:hover {
    box-shadow: 0 8px 24px rgba(6, 107, 250, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* ===== 5. TABELAS MELHORADAS ===== */

.main-content table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(6, 107, 250, 0.06) !important;
}

.main-content table thead {
    background: linear-gradient(135deg, #066BFA 0%, #3a8df7 100%) !important;
}

.main-content table thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 16px 12px !important;
    border: none !important;
}

.main-content table tbody tr {
    transition: all 0.2s ease !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.main-content table tbody tr:hover {
    background: #f7fafc !important;
    transform: scale(1.005) !important;
    box-shadow: 0 2px 8px rgba(6, 107, 250, 0.06) !important;
}

.main-content table tbody tr:last-child {
    border-bottom: none !important;
}

.main-content table tbody td {
    padding: 14px 12px !important;
    color: #2d3748 !important;
    font-size: 14px !important;
}

/* Zebra stripes */
.main-content table tbody tr:nth-child(even) {
    background: #f7fafc !important;
}

.main-content table tbody tr:nth-child(even):hover {
    background: #edf2f7 !important;
}

/* ===== 6. MODAIS MELHORADOS ===== */

.modal-content {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

.modal-header {
    background: linear-gradient(135deg, #066BFA 0%, #3a8df7 100%) !important;
    color: #ffffff !important;
    padding: 20px 24px !important;
    border-bottom: none !important;
}

.modal-header .modal-title {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1) !important;
    opacity: 0.8 !important;
}

.modal-header .btn-close:hover {
    opacity: 1 !important;
}

.modal-body {
    padding: 32px 24px !important;
}

.modal-footer {
    padding: 20px 24px !important;
    background: #f7fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* ===== 7. ALERTS E MENSAGENS ===== */

.sq-alert {
    padding: 16px 20px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    animation: slideInDown 0.4s ease-out !important;
}

.sq-alert-success {
    background: #f0fff4 !important;
    color: #22543d !important;
    border: 1px solid #9ae6b4 !important;
}

.sq-alert-error,
.sq-error {
    background: #fff5f5 !important;
    color: #c53030 !important;
    border: 1px solid #feb2b2 !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin-top: 12px !important;
}

.sq-alert-warning {
    background: #fffaf0 !important;
    color: #744210 !important;
    border: 1px solid #fbd38d !important;
}

.sq-alert-info {
    background: #ebf8ff !important;
    color: #2c5282 !important;
    border: 1px solid #90cdf4 !important;
}

/* ===== 8. BADGES E TAGS ===== */

.sq-badge {
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.sq-badge-active {
    background: #c6f6d5 !important;
    color: #22543d !important;
}

.sq-badge-inactive {
    background: #fed7d7 !important;
    color: #742a2a !important;
}

.sq-badge-pending {
    background: #feebc8 !important;
    color: #7c2d12 !important;
}

/* ===== 9. LOADING STATES ===== */

.sq-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 10. RESPONSIVIDADE MELHORADA ===== */

@media (max-width: 768px) {
    .main-content h1 {
        font-size: 24px !important;
    }
    
    .main-content h2 {
        font-size: 20px !important;
    }
    
    .sq-btn-primary,
    .sq-btn-secondary,
    .btn-danger {
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    
    .modal-body {
        padding: 20px 16px !important;
    }
}

/* ===== 11. MELHORIAS NA SIDEBAR ===== */

.sidebar-menu a {
    border-radius: 10px !important;
    margin-bottom: 4px !important;
    transition: all 0.3s ease !important;
}

.sidebar-menu a:hover {
    background: #edf2f7 !important;
    padding-left: 20px !important;
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, #066BFA 0%, #3a8df7 100%) !important;
    box-shadow: 0 4px 12px rgba(6, 107, 250, 0.25) !important;
}

/* ===== 12. SCROLL SUAVE ===== */

html {
    scroll-behavior: smooth !important;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #066BFA;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #044bb5;
}

/* ===== 13. TRANSIÇÕES GLOBAIS ===== */

* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform !important;
    transition-duration: 0.2s !important;
    transition-timing-function: ease !important;
}

button, a, input, select, textarea {
    transition-duration: 0.3s !important;
}
