@import url('../lib/inter/inter.css');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    padding: 30px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.header a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 12px;
    background: #eff6ff;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header a:hover {
    background: #2563eb;
    color: #fff;
}

.folio-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.form-section {
    margin-bottom: 26px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group input[readonly] {
    background: #f8fafc;
    color: #64748b;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 42px;
    flex-wrap: wrap;
}

.radio-group label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #475569;
    text-transform: none;
    letter-spacing: 0;
}

.tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #2563eb;
    background: #f8fafc;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 18px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 12px;
    font-size: 13px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

table th {
    background: #f8fafc;
    color: #64748b;
    padding: 16px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
}

table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
}

table tbody tr {
    transition: background 0.15s;
}

table tbody tr:hover {
    background: #f8fafc;
}

table tbody tr:last-child td {
    border-bottom: none;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.status-badge.pendiente {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.status-badge.aprobado {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.status-badge.rechazado {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.status-badge.con_orden {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-select-pill {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    appearance: none;
    text-align: center;
    width: 140px;
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 12px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

.status-select-pill.pendiente {
    background-color: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.status-select-pill.aprobado {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.status-select-pill.cancelado {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.status-select-pill.con_orden {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-select-pill:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.status-select-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.table-state-selector {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.state-dot-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    filter: grayscale(1);
    opacity: 0.5;
}

.state-dot-btn:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

.state-dot-btn.active {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.state-dot-btn.active.pendiente {
    border-color: #f59e0b;
    background: #fffbeb;
}

.state-dot-btn.active.aprobado {
    border-color: #10b981;
    background: #f0fdf4;
}

.state-dot-btn.active.cancelado {
    border-color: #ef4444;
    background: #fef2f2;
}

.state-dot-btn.active.con_orden {
    border-color: #3b82f6;
    background: #eff6ff;
}

.state-selector {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.state-btn {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.state-btn span {
    font-size: 20px;
    filter: grayscale(0.4);
    transition: all 0.2s;
}

.state-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.state-btn:active {
    transform: scale(0.96);
}

.state-btn.active span {
    filter: grayscale(0);
    transform: scale(1.1);
}

.state-btn.active.pendiente {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.state-btn.active.aprobado {
    border-color: #10b981;
    background: #f0fdf4;
    color: #15803d;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.state-btn.active.cancelado {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.action-btns {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btns button {
    padding: 6px 14px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    white-space: nowrap;
}

.action-btns button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.btn-approve {
    background: #10b981;
}

.btn-reject {
    background: #ef4444;
}

.btn-view {
    background: #3b82f6;
}

.btn-order {
    background: #8b5cf6;
}

.filter-section {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 22px;
    display: flex;
    gap: 14px;
    align-items: flex-end;
    border: 1px solid #e2e8f0;
}

.filter-section .form-group {
    margin-bottom: 0;
}

.filter-section select {
    padding: 9px 36px 9px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #475569;
    background: #fff;
    min-width: 200px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
}


.btn-add-partida {
    background: linear-gradient(135deg, #0f172a, #334155);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-add-partida:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.btn-add-partida:active {
    transform: translateY(0);
}

.btn-add-partida i {
    font-size: 14px;
}

.select-premium {
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.select-premium:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-section .btn-submit {
    width: auto;
    margin-top: 0;
    padding: 9px 20px;
    font-size: 12px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    overflow-y: auto;
    padding: 30px 15px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #fff;
    max-width: 920px;
    margin: 0 auto;
    border-radius: 14px;
    padding: 34px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    transition: all 0.15s;
    line-height: 1;
}

.modal-close:hover {
    background: #ef4444;
    color: #fff;
}

.cotizacion-ref {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 22px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cotizacion-ref strong {
    color: #2563eb;
}

.modal-propuesta-oficial {
    background-color: #fff !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-radius: 0 !important;
    border-top: 8px solid #0f172a !important;
    color: #1e293b !important;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.modal-propuesta-oficial::before {
    content: "MASCONTROLCI";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 120px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.02);
    pointer-events: none;
    z-index: 1;
}

.prop-content {
    position: relative;
    z-index: 2;
    font-family: 'Times New Roman', Times, serif;
}

.prop-header-info {
    text-align: right;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.prop-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.prop-value-important {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.prop-table-professional {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.prop-table-professional th {
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 12px 15px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.prop-table-professional td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    font-size: 14px;
}

.prop-table-professional tr:last-child td {
    border-bottom: none;
}

.prop-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

.prop-box-gray {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.prop-bank-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.bank-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
    display: block;
}

.bank-value {
    font-weight: 600;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    z-index: 100;
}

.modal-actions .btn-submit {
    flex: 1;
    margin-top: 0;
}

.btn-cancel {
    flex: 1;
    padding: 12px 24px;
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.modal-rechazo-inner {
    background: #fff;
    width: 440px;
    max-width: 95%;
    margin: 80px auto;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: modalIn 0.3s ease;
}

.modal-rechazo-inner h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 17px;
}

.modal-rechazo-inner p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 14px;
}

.modal-rechazo-inner textarea {
    width: 100%;
    margin-bottom: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 90px;
}

.modal-rechazo-inner textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-rechazo-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-rechazo-actions button {
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.modal-rechazo-actions .btn-rechazo-cancel {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
}

.modal-rechazo-actions .btn-rechazo-cancel:hover {
    background: #f8fafc;
}

.modal-rechazo-actions .btn-rechazo-confirm {
    background: #ef4444;
    color: #fff;
    border: none;
}

.modal-rechazo-actions .btn-rechazo-confirm:hover {
    background: #dc2626;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

.ot-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ot-detail-item {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ot-detail-item label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.ot-detail-item span {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 20px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-section select {
        min-width: 100%;
    }

    .modal-content {
        padding: 22px 18px;
    }

    .ot-detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .radio-group {
        flex-direction: column;
        height: auto;
        align-items: flex-start;
    }
}

.ot-page-container {
    background: #64748b;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    overflow-y: auto;
}

.ot-page {
    background: #ffffff !important;
    width: 950px;
    padding: 60px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif !important;
    color: #000000 !important;
}

.ot-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.ot-logo img {
    height: 90px;
}

.ot-title h1 {
    font-size: 32px;
    font-weight: 900;
    margin: 0;
    color: #000;
}

.ot-folio-box {
    border: 3px solid #000;
    width: 250px;
    text-align: center;
}

.ot-folio-box label {
    display: block;
    border-bottom: 2px solid #000;
    font-weight: bold;
    font-size: 16px;
    padding: 5px;
    margin: 0;
}

.folio-num {
    font-size: 24px;
    font-weight: bold;
    padding: 15px;
    min-height: 50px;
}

.ot-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.ot-field {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.full-width {
    grid-column: span 2;
}

.ot-field label {
    font-weight: bold;
    white-space: nowrap;
    font-size: 15px;
}

.underline-field {
    border-bottom: 2.5px solid #000;
    flex: 1;
    min-height: 24px;
    padding-left: 10px;
    font-size: 16px;
}

.ot-service-section {
    margin-bottom: 25px;
}

.service-title {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
}

.service-box {
    border: 3px solid #000;
    min-height: 280px;
    padding: 20px;
    font-size: 16px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.ot-costs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.cost-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.cost-box {
    border: 3px solid #000;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    min-height: 45px;
    font-size: 19px;
}

.ot-bottom-area {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.5fr;
    gap: 20px;
    margin-bottom: 30px;
}

.facturacion-options {
    margin-top: 15px;
}

.facturacion-options .opt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: bold;
}

.check {
    width: 26px;
    height: 26px;
    border: 3px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check.active::after {
    content: 'X';
    color: #000;
    font-weight: bold;
    font-size: 20px;
}

.stamp-box {
    border: 3px solid #000;
    min-height: 160px;
}

.date-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.date-footer {
    border-top: 3.5px solid #000;
    padding: 10px;
    display: flex;
    gap: 10px;
}

.date-footer label {
    font-weight: bold;
    font-size: 15px;
}

.ot-footer-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
}

@media print {

    body>*:not(.modal-overlay) {
        display: none !important;
    }

    .modal-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: #fff !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #modalVerOT,
    #modalPropuesta {
        display: block !important;
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #printableOT,
    #printablePropuesta {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .prop-page {
        min-height: auto !important;
        margin: 0 !important;
        page-break-after: auto !important;
        break-after: auto !important;
    }

    #pdf-generation-container {
        display: block !important;
        visibility: visible !important;
    }

    .no-print,
    .modal-close,
    .modal-actions {
        display: none !important;
    }
}

.prop-page {
    width: 850px;
    min-height: 1100px;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    box-sizing: border-box;
    margin: 0 auto 30px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.prop-page p,
.prop-page table,
.prop-page tr,
.prop-page div,
.prop-bank-card,
.prop-signature-block {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

.prop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.prop-header-info {
    text-align: right;
}

.prop-folio-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 10px 20px;
    border-radius: 8px;
    border-left: 4px solid #0f172a;
    font-weight: 800;
    font-size: 18px;
    color: #0f172a;
    margin-top: 5px;
}

.prop-section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #64748b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.prop-table-professional {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.prop-table-professional th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.prop-table-professional td {
    padding: 15px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    line-height: 1.5;
}

.prop-bank-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.bank-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bank-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
}

.bank-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.prop-footer-info {
    margin-top: 30px;
    border-top: 1px solid #f1f5f9;
    padding-top: 25px;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
}

.prop-signature-block {
    text-align: center;
    margin-top: auto;
    padding-bottom: 40px;
}

.watermark-santos {
    position: fixed;
    bottom: 12px;
    right: 20px;
    font-size: 9px;
    color: #94a3b8;
    opacity: 0.6;
    pointer-events: none;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: opacity 0.3s;
}

.watermark-santos:hover {
    opacity: 1;
}

@media print {
    .watermark-santos {
        display: none !important;
    }
}


.count-badge {
    background: #1e40af;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.table-scroll-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
    background: #fff;
}

.form-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, .03);
}

.form-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2.5px solid #f1f5f9;
    color: #1e293b;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-gen {
    background: #3b82f6;
}

.dot-est {
    background: #0ea5e9;
}

.dot-con {
    background: #f59e0b;
}

.dot-tip {
    background: #10b981;
}

.grid-form-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.grid-form-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    display: block;
    margin-bottom: 6px;
}

.input-auto {
    background: #eff6ff !important;
    color: #1e40af !important;
    font-weight: 800 !important;
    cursor: default !important;
    border-color: #bfdbfe !important;
}

.badge-tipo {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.badge-evento {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-poliza {
    background: #d1fae5;
    color: #065f46;
}

.badge-ambos {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-ninguno {
    background: #f1f5f9;
    color: #94a3b8;
}

.tipo-checks {
    display: flex;
    gap: 25px;
    padding-top: 10px;
}

.tipo-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

.main-table thead th.sep-r {
    border-right: 2px solid #e2e8f0 !important;
}

.th-gen {
    background: #eff6ff;
    color: #1e40af;
}

.th-est {
    background: #f0f9ff;
    color: #0369a1;
}

.th-con {
    background: #fffbeb;
    color: #92400e;
}

.th-tip {
    background: #f0fdf4;
    color: #065f46;
}

.th-acc {
    background: #fef2f2;
    color: #7f1d1d;
}


.main-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    white-space: normal;
    word-wrap: break-word;
    vertical-align: middle;
    font-size: 13px;
}

.main-table tbody tr:hover td {
    background: #f8fafc !important;
}

.main-table tbody tr:last-child td {
    border-bottom: none;
}

.td-gen {
    background: #fff;
}

.td-est {
    background: #f8fbff;
}

.td-con {
    background: #fffdf5;
}

.td-tip {
    background: #f8fffe;
}

.btn-view {
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}

.btn-view:hover {
    opacity: 0.8;
}

.btn-del {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.btn-del:hover {
    background: #fecaca;
}


.listbox-no-check {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    margin-top: 5px;
}

.item-no-check {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.1s;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.item-no-check:hover {
    background: #f1f5f9;
}

.item-no-check.selected {
    background: #2563eb !important;
    color: #fff !important;
}

.item-no-check.selected b {
    color: #fff !important;
}

.item-no-check.selected small {
    color: #dbeafe !important;
}

.item-no-check:last-child {
    border-bottom: none;
}

.item-no-check b {
    display: block;
    color: #1e293b;
}

.item-no-check small {
    color: #64748b;
    font-size: 10px;
}

#global_user_panel {
    position: fixed !important;
    top: 15px !important;
    right: 20px !important;
    z-index: 99999 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    padding: 8px 18px !important;
    border-radius: 50px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05) !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#global_user_panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05) !important;
}

@media (max-width: 900px) {
    #global_user_panel {
        top: 10px !important;
        right: 10px !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    }
}


.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 10px;
}
.btn-pag {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-pag:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.btn-pag:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-info {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

/* --- NORMALIZACIÓN DE DATOS A MAYÚSCULAS --- */
input[type="text"], 
input[type="email"], 
input[type="tel"], 
textarea,
table td,
.underline-field,
.service-box,
[id^="det_"],
[id^="ver_"] {
    text-transform: uppercase;
}

/* Excepciones para elementos que NO deben estar en mayúsculas (etiquetas, botones, etc que ya tienen su estilo) */
label, 
button, 
.tab-btn, 
.header h1, 
.section-title {
    text-transform: none;
}

/* --- ESTILOS PARA PARTIDAS DE OC --- */
.table-partidas {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}
.table-partidas th {
    background: #f1f5f9;
    padding: 10px;
    text-align: left;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}
.table-partidas td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.table-partidas input, .table-partidas textarea, .table-partidas select {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 5px;
    font-size: 13px;
}
.table-partidas input:focus {
    border-color: #3b82f6;
    outline: none;
}
.btn-del {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-del:hover {
    background: #ef4444;
    color: #fff;
}
.totals-area span {
    color: #64748b;
    font-size: 13px;
}

/* --- ESTILOS PREMIUM OC (ESTILO OT) --- */
.oc-header-info {
    display: grid;
    grid-template-columns: 120px 100px;
    gap: 0;
    border: 1px solid #000;
}
.oc-box-header {
    background: #0f172a;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-bottom: 1px solid #000;
}
.oc-box-value {
    background: #fff;
    color: #000;
    font-size: 11px;
    padding: 4px 8px;
    border-bottom: 1px solid #000;
    display: flex;
    align-items: center;
}
.oc-box-header:last-of-type, .oc-box-value:last-of-type {
    border-bottom: none;
}

.oc-table-premium {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}
.oc-table-premium th {
    background: #0f172a;
    color: #fff;
    font-size: 10px;
    padding: 8px 5px;
    border: 1px solid #000;
    text-align: center;
}
.oc-table-premium td {
    border: 1px solid #000;
    padding: 6px 5px;
    font-size: 11px;
    text-align: center;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
/* Columnas con anchos fijos para el PDF */
.oc-table-premium th:nth-child(1), .oc-table-premium td:nth-child(1) { width: 40px; }
.oc-table-premium th:nth-child(3), .oc-table-premium td:nth-child(3) { width: 45px; }
.oc-table-premium th:nth-child(4), .oc-table-premium td:nth-child(4) { width: 70px; }
.oc-table-premium th:nth-child(5), .oc-table-premium td:nth-child(5) { width: 70px; }
.oc-table-premium th:nth-child(6), .oc-table-premium td:nth-child(6) { width: 60px; }
/* Descripción y Uso son los que se expanden */
.oc-table-premium td:nth-child(2), .oc-table-premium td:nth-child(7) {
    text-align: left;
}

.oc-comments-box {
    width: 60%;
}

.oc-totals-box {
    border: 1px solid #000;
}
.oc-total-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    font-size: 11px;
    border-bottom: 1px solid #000;
}
.oc-total-row:last-child {
    border-bottom: none;
}
.oc-total-main {
    background: #0f172a;
    color: #fff;
    font-weight: bold;
}
.oc-total-main span {
    color: #fff !important;
}
