* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    background: white;
    color: #073e70;
    min-height: 100vh;
}

.login-container-out {
    background: #073e70;
    border: 2px solid #00cfff;
    border-radius: 40px;
    padding: 40px 5px 40px 5px;
    width: 335px;
    height: 598px;
    margin: 8vh auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: radial-gradient(#00d0ffd0, #073d70da);
    border-radius: 38px;
    padding: 10px 5px 40px 5px;
    width: 330px;
    height: 585px;
    margin: 0; 
    text-align: center;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: #073e70;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #00cfff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    letter-spacing: -0.5px;
}

.logo-icon{
    width: 5px;
    height: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon-svg{
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon-svg img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text{
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    background: transparent;
    border: 1px solid #00cfff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    margin-left: 10px;
    font-size: 15px;
    color: white;
    border-radius: 40px;
}

.logout-btn-icon {
    width: 50px;
    height: 40px;
    font-size: 16px;
    color: #ffce00;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.1s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
}

.main-content {
    background: white;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-form {
    padding: 60px 40px;
    text-align: center;
}

.login-form h2 {
    margin-bottom: 40px;
    color: #333;
    font-size: 32px;
}

.form-group {
    margin-bottom: 20px;
    color: #073e70;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #073e70;
    font-weight: 500;
    font-size: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid white;
    border-radius: 10px;
    font-size: 15px;
    transition: 0.1s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #073e70;
}

input:hover, select:hover, textarea:hover {
    border-color: #073e70;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color:#073e70;
    cursor: pointer;
    transition: 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login {
    background: #ffce00;
    color: #073e70;
    font-weight: 600;
}

.btn-login:hover {
    background: #073e70;
    color: #00cfff;
}

.btn-success {
    color: #004085;
    background: #00cfff;
    border-radius: 25px;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-cancel {
    background: transparent;
    color: #073e70;
    border: 1px solid #073e70;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.1s;
}

.btn-cancel:hover{
    background: #073e70;
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #073e70;
    color:#073e70;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.1s;
}

.btn-secondary:hover{
    background: #073e70;
    color: white;
}

.btn-history{
    background: transparent;
    border: 1px solid #073e70;
    color:#073e70;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.1s;
}

.btn-history:hover{
    background: #073e70;
    color: #00cfff;
}

.btn-warning {
    background: #00cfff;
}

.btn-small {
    background: transparent;
    border: 1px solid #073e70;
    padding: 8px 16px;
    font-size: 15px;
    color:#073e70;
    border-radius: 30px;
    cursor: pointer;
}

.btn-small:hover{
    background: #073e70;
    color: white
}

.btn-new-order {
    background: #00cfff;
    color: #073e70;
    font-weight: 700;
}

/* ESTILO ESPECIAL PARA SEÇÃO DO DIRETOR */
.director-panel {
    background: #073e70;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(3, 28, 77, 0.2);
}

.director-search-wrap{
    margin: 14px 0 22px 0;
}   

#directorSearch{
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    transition: box-shadow .2s, border-color .2s;
}

#directorSearch:focus{
    border-color: #667eea;    
    box-shadow: 0 0 0 4px rgba(102,126,234,.12);
}

.director-title {
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.director-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.director-stat-card {
    padding: 20px;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.director-stat-value {
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-align: left;
    margin-bottom: 5px;
}

.director-stat-label {
    color:#073e70;
    font-size: 15px;
    text-align: left;
}

.stats-icon{
    background: #073e70;
    width: 40px;
    height: 40px;
    font-size: 25px;
    margin-bottom: 15px;
    border-radius: 13px;
    padding: 5px 5px 5px 5px;
    color: #073e70;
    text-align: center;
}

.dashboard {
    padding: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 32px;
    color: #333;
    font-weight: 700;
}

.action-buttons {
    text-align: right;
    margin-top: 40px;
    margin-bottom: 30px;
    padding-right: 30px;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;  
    gap: 15px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.orders-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.orders-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #f1f3f4;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

/* Estilo para destacar possíveis duplicatas */
.orders-table tr.potential-duplicate {
    background: rgba(231, 76, 60, 0.1) !important;
    font-weight: bold;
}

.orders-table tr.potential-duplicate:hover {
    background: rgba(231, 76, 60, 0.15) !important;
}

.duplicate-warning {
    color: #e74c3c;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pendente {
    background: #fff3cd;
    color: #856404;
}

.status-aguardando-financeiro {
    background: #e2e3e5;
    color: #495057;
}

.status-analise {
    background: #cce5ff;
    color: #004085;
}

.status-aprovada {
    background: #d4edda;
    color: #155724;
}

.status-liberada {
    background: #d1ecf1;
    color: #0c5460;
}

.status-rejeitada {
    background: #f8d7da;
    color: #721c24;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-normal {
    background: #d4edda;
    color: #155724;
}

.priority-urgente {
    background: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hidden {
    display: none !important;
}

.alert {
    font-size: 12px;
    padding: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgb(255, 255, 255, 0.9);
    color: #073e70;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.report-card {
    background: #073e70;
    width: 1020px;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.report-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #073e70;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Estilos para anexos */
.file-upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    background: #f9f9f9;
    transition: 0.1s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #073e70;
    background: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #073e70;
    background: #e8f0ff;
}

.file-list {
    margin-top: 15px;
    text-align: left;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 24px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.attachment-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: 0.1s;
}

.attachment-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.attachment-preview {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.attachment-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #667eea;
}

.attachment-name {
    font-size: 12px;
    color: #333;
    word-break: break-word;
}

.payment-proof-section {
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.payment-proof-section h4 {
    color: #2e7d32;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination button {
    background: transparent;
    border: 2px solid #e1e8ed;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.1s;
}

.pagination button:hover:not(:disabled) {
    background: #ffce00;
    color: #004085;
    border-color: #ffce00;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #ffce00;
    color: #073e70;
    border-color: #ffce00;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .director-stats {
        grid-template-columns: 1fr;
    }
}
    
/* ===== Patch de responsividade da tabela (sem afetar desktop) ===== */
.table-responsive{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.orders-table{
  min-width: 720px;
}
.orders-table th,
.orders-table td{
  white-space: nowrap;
}
@media (max-width: 768px){
  .orders-table td:nth-child(3),
  .orders-table th:nth-child(3){
    white-space: normal;
    word-break: break-word;
    max-width: 320px;
  }
  .orders-table td:last-child > div{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* clickable cards for director stats */
.clickable{ cursor: pointer; transition: transform .2s, box-shadow .2s; }
.clickable:hover{ box-shadow: 0 8px 25px rgba(0,0,0,0.12); transform: translateY(-5px); }