/**
 * CSS para Área do Cliente - Santec Docs - Design Laranja Moderno
 */

/* Importa fonte Lato se não estiver disponível */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

.santec-client-area {
    max-width: 1600px;
    margin: 0 auto;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.santec-area-title {
    text-align: center;
    color: #DC5217;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === LOGIN CONTAINER === */
.santec-login-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(220, 82, 23, 0.1);
    overflow: hidden;
    max-width: 550px;
    margin: 0 auto;
    border: 1px solid #ffeee5;
    position: relative;
}

.santec-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #DC5217 0%, #FF601C 100%);
}

.santec-login-tabs {
    display: flex;
    background: linear-gradient(135deg, #fff5f0 0%, #ffeee5 100%);
    border-bottom: 1px solid #ffeee5;
}

.santec-tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.santec-tab-btn.active {
    background: #fff;
    color: #DC5217;
    border-bottom: 2px solid #DC5217;
    font-weight: 600;
}

.santec-tab-btn:hover {
    color: #FF601C;
}

.santec-tab-content {
    display: none;
    padding: 30px;
}

.santec-tab-content.active {
    display: block;
}

/* === FORMS === */
.santec-form {
    margin: 0;
}

.santec-form-group {
    margin-bottom: 20px;
}

.santec-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.santec-form-group input[type="email"],
.santec-form-group input[type="password"],
.santec-form-group input[type="text"] {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #ffeee5;
    border-radius: 30px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.santec-form-group input:focus {
    outline: none;
    border-color: #DC5217;
    box-shadow: 0 0 0 3px rgba(220, 82, 23, 0.1);
    background: white;
}

.santec-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* === BUTTONS === */
.santec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 25px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    text-transform: uppercase;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    white-space: normal;
}

.santec-btn-primary {
    background: #DC5217;
    color: #fff;
    border: 1px solid #DC5217;
}

.santec-btn-primary:hover {
    background: #FF601C;
    border-color: #FF601C;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 82, 23, 0.3);
}

.santec-btn-secondary {
    background: transparent;
    color: #DC5217;
    border: 1px solid #DC5217;
}

.santec-btn-secondary:hover {
    background: #DC5217;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 82, 23, 0.2);
}

.santec-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === MESSAGES === */
.santec-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.santec-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.santec-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.santec-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* === SERIAL SEARCH === */
.santec-serial-search-form {
    margin-bottom: 20px;
}

.santec-search-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.santec-search-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 1px solid #ffeee5;
    border-radius: 30px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.santec-search-input:focus {
    outline: none;
    border-color: #DC5217;
    box-shadow: 0 0 0 3px rgba(220, 82, 23, 0.1);
    background: white;
}

.santec-search-group .santec-btn {
    width: auto;
    min-width: 120px;
    flex-shrink: 0;
}

.santec-serial-search-results {
    margin-top: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #e9ecef;
    animation: santec-fadeIn 0.3s ease;
}

.santec-serial-search-results h5 {
    color: #DC5217;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #ffeee5;
    padding-bottom: 10px;
}

.santec-serial-info {
    background: #fff3f0;
    border: 1px solid #ffeee5;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.santec-serial-info strong {
    color: #DC5217;
}

.santec-product-search-result {
    background: #fff;
    border: 1px solid #ffeee5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #DC5217;
}

.santec-product-search-result h5 {
    color: #DC5217;
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.santec-product-search-result .santec-date {
    color: #666;
    font-size: 14px;
    margin: 10px 0 0 0;
    font-style: italic;
}

.santec-no-items {
    background: #fff3f0;
    border: 1px solid #ffeee5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #DC5217;
    font-weight: 500;
    margin: 20px 0;
}

.santec-no-items::before {
    content: "📄";
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

@keyframes santec-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes responsivos para busca */
@media (max-width: 768px) {
    .santec-search-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .santec-search-input {
        min-width: 100%;
        width: 100%;
    }
    
    .santec-search-group .santec-btn {
        width: 100%;
        min-width: 100%;
    }
    
    .santec-serial-search-results {
        padding: 20px 15px;
    }
}

/* === DASHBOARD === */
.santec-dashboard {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(220, 82, 23, 0.1);
    overflow: hidden;
    border: 1px solid #ffeee5;
}

.santec-welcome {
    background: linear-gradient(135deg, #DC5217, #FF601C);
    color: #fff;
    padding: 35px;
    text-align: center;
    position: relative;
}

.santec-welcome h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.santec-welcome p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.santec-logout-link {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.santec-logout-link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: #fff;
}

/* === SECTIONS === */
.santec-section {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
}

.santec-section:last-child {
    border-bottom: none;
}

.santec-section h4 {
    margin: 0 0 20px 0;
    color: #DC5217;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ffeee5;
    padding-bottom: 10px;
}

.santec-no-items {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background: #fff5f0;
    border-radius: 15px;
    border: 1px solid #ffeee5;
}

/* === PRODUCTS GRID === */
.santec-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.santec-product-card {
    background: #fff5f0;
    border: 1px solid #ffeee5;
    border-radius: 15px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.santec-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(220, 82, 23, 0.12);
}

.santec-product-card h5 {
    margin: 0 0 15px 0;
    color: #DC5217;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.santec-serial {
    margin: 10px 0;
    font-size: 14px;
}

.santec-serial strong {
    color: #333;
}

.santec-date {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #6c757d;
}

/* === DOCUMENTS === */
.santec-documents-list {
    space-y: 30px;
}

.santec-product-docs {
    margin-bottom: 30px;
}

.santec-product-docs h5 {
    margin: 0 0 15px 0;
    color: #DC5217;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffeee5;
}

.santec-docs-table {
    overflow-x: auto;
}

.santec-docs-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(220, 82, 23, 0.08);
    border: 1px solid #ffeee5;
    table-layout: fixed;
}

/* Padronização das larguras das colunas */
.santec-docs-table th:nth-child(1),
.santec-docs-table td:nth-child(1) {
    width: 40%; /* Documento */
}

.santec-docs-table th:nth-child(2),
.santec-docs-table td:nth-child(2) {
    width: 15%; /* Versão */
    text-align: center;
}

.santec-docs-table th:nth-child(3),
.santec-docs-table td:nth-child(3) {
    width: 15%; /* Tamanho */
    text-align: center;
}

.santec-docs-table th:nth-child(4),
.santec-docs-table td:nth-child(4) {
    width: 30%; /* Download */
    text-align: center;
}

.santec-docs-table th {
    background: linear-gradient(135deg, #fff5f0 0%, #ffeee5 100%);
    padding: 15px 12px;
    text-align: left;
    font-weight: 400;
    color: #DC5217;
    border-bottom: 1px solid #ffeee5;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.santec-docs-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #fff5f0;
    vertical-align: top;
}

.santec-docs-table tr:last-child td {
    border-bottom: none;
}

.santec-docs-table tr:hover {
    background: #fff5f0;
}

.santec-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #DC5217;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid #DC5217;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.santec-download-btn:hover {
    background: #FF601C;
    border-color: #FF601C;
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 82, 23, 0.3);
}

.santec-download-btn:active {
    transform: translateY(0);
}

.santec-download-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* === LOADING STATES === */
.santec-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.santec-download-btn.santec-loading {
    background: #6c757d;
    color: transparent;
}

.santec-download-btn.santec-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: santec-spin 1s linear infinite;
}

.santec-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffeee5;
    border-top: 2px solid #DC5217;
    border-radius: 50%;
    animation: santec-spin 1s linear infinite;
}

/* === TOAST NOTIFICATIONS === */
.santec-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.santec-toast.show {
    transform: translateX(0);
}

.santec-toast-success {
    background: #DC5217;
}

.santec-toast-error {
    background: #dc3545;
}

.santec-toast-info {
    background: #FF601C;
}

@keyframes santec-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (min-width: 1601px) {
    .santec-client-area {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .santec-client-area {
        margin: 0 15px;
    }
    
    /* Ajusta larguras das colunas em mobile */
    .santec-docs-table th:nth-child(1),
    .santec-docs-table td:nth-child(1) {
        width: 45%; /* Documento */
    }
    
    .santec-docs-table th:nth-child(2),
    .santec-docs-table td:nth-child(2) {
        width: 12%; /* Versão */
    }
    
    .santec-docs-table th:nth-child(3),
    .santec-docs-table td:nth-child(3) {
        width: 15%; /* Tamanho */
    }
    
    .santec-docs-table th:nth-child(4),
    .santec-docs-table td:nth-child(4) {
        width: 28%; /* Download */
    }
    
    .santec-login-container {
        margin: 0 15px;
    }
    
    .santec-tab-content {
        padding: 20px;
    }
    
    .santec-section {
        padding: 20px;
    }
    
    .santec-welcome {
        padding: 20px;
    }
    
    .santec-welcome h3 {
        font-size: 20px;
    }
    
    .santec-products-grid {
        grid-template-columns: 1fr;
    }
    
    .santec-docs-table {
        font-size: 14px;
    }
    
    .santec-docs-table th,
    .santec-docs-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .santec-area-title {
        font-size: 24px;
    }
    
    .santec-tab-btn {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .santec-tab-content {
        padding: 15px;
    }
    
    .santec-section {
        padding: 15px;
    }
    
    .santec-welcome {
        padding: 15px;
    }
}

/* === STYLES VARIATIONS === */
.santec-style-compact .santec-section {
    padding: 20px;
}

.santec-style-compact .santec-welcome {
    padding: 20px;
}

.santec-style-minimal .santec-dashboard {
    box-shadow: none;
    border: 1px solid #ffeee5;
}

.santec-style-minimal .santec-product-card {
    background: #fff;
    border: 1px solid #ffeee5;
}

/* === PRINT STYLES === */
@media print {
    .santec-logout-link,
    .santec-download-btn {
        display: none;
    }
    
    .santec-dashboard {
        box-shadow: none;
    }
    
    .santec-welcome {
        background: #fff5f0 !important;
        color: #DC5217 !important;
    }
}

.santec-client-area .santec-login-container,
.santec-client-area .santec-dashboard {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    max-width: 800px;
    margin: 1rem auto;
}

.santec-form-switcher {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9em;
    color: #555;
}

.santec-form-switcher a {
    color: #DC5217;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.santec-form-switcher a:hover {
    color: #FF601C;
    text-decoration: underline;
}

.santec-client-area .santec-login-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
} 