.isw-er-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.isw-er-overlay.active {
    display: flex;
}
.isw-er-modal {
    background: #fff;
    width: 820px;
    max-width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow: hidden;
}
.isw-er-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2c3e50;
    color: #fff;
    padding: 10px 16px;
    flex-shrink: 0;
}
.isw-er-header-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.isw-er-header-title span {
    color: #f1c40f;
    margin-right: 6px;
}
.isw-er-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.isw-er-close:hover {
    color: #e74c3c;
}
.isw-er-tabs {
    display: flex;
    gap: 2px;
    margin-left: 16px;
}
.isw-er-tab {
    background: rgba(255,255,255,0.15);
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 0;
}
.isw-er-tab:hover {
    background: rgba(255,255,255,0.25);
}
.isw-er-tab-active {
    background: rgba(255,255,255,0.95);
    color: #2c3e50;
}
.isw-er-ultimas-item {
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.1s;
}
.isw-er-ultimas-item:hover {
    background: #f0f4ff;
}
.isw-er-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.isw-er-section {
    margin-bottom: 14px;
}
.isw-er-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7f8c8d;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.isw-er-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.isw-er-row > * {
    flex: 1;
}
.isw-er-field {
    position: relative;
}
.isw-er-field input,
.isw-er-field textarea,
.isw-er-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.isw-er-field input:focus,
.isw-er-field textarea:focus {
    border-color: #3498db;
    background: #fffde7;
}
.isw-er-field textarea {
    resize: vertical;
    min-height: 70px;
}
.isw-er-cliente-info {
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    padding: 6px 10px;
    font-size: 12px;
    color: #555;
    margin-top: 6px;
}
.isw-er-cliente-info .nombre {
    font-weight: 700;
    color: #2c3e50;
}
.isw-er-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 180px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}
.isw-er-dropdown.visible {
    display: block;
}
.isw-er-dropdown-item {
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.isw-er-dropdown-item:hover {
    background: #eaf2f8;
}
.isw-er-dropdown-item .ref {
    color: #999;
    font-size: 11px;
}
.isw-er-dropdown-item .price {
    float: right;
    font-weight: 700;
    color: #27ae60;
}
.isw-er-prod-search {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.isw-er-prod-search input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 7px 10px;
    font-size: 13px;
    outline: none;
}
.isw-er-prod-search input:focus {
    border-color: #3498db;
}
.isw-er-btn-add-manual {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 0;
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    color: #555;
}
.isw-er-btn-add-manual:hover {
    background: #dfe6e9;
}
.isw-er-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.isw-er-lines-table th {
    background: #34495e;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.4px;
    padding: 7px 6px;
    text-align: left;
    border: none;
}
.isw-er-lines-table th.r {
    text-align: right;
}
.isw-er-lines-table th.c {
    text-align: center;
}
.isw-er-lines-table td {
    padding: 5px 6px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.isw-er-lines-table td.r {
    text-align: right;
    font-weight: 600;
}
.isw-er-lines-table td.c {
    text-align: center;
}
.isw-er-lines-table input {
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 4px 6px;
    font-size: 12px;
    outline: none;
    font-family: inherit;
}
.isw-er-lines-table input:focus {
    border-color: #3498db;
}
.isw-er-lines-table input.concepto-input {
    width: 100%;
    box-sizing: border-box;
}
.isw-er-lines-table input.num-input {
    width: 70px;
    text-align: right;
}
.isw-er-lines-table input.qty-input {
    width: 50px;
    text-align: center;
}
.isw-er-lines-table input.igic-input {
    width: 45px;
    text-align: center;
}
.isw-er-lines-table .btn-del {
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
}
.isw-er-lines-table .btn-del:hover {
    color: #e74c3c;
}
.isw-er-lines-empty {
    text-align: center;
    padding: 20px;
    color: #bbb;
    font-size: 13px;
    font-style: italic;
}
.isw-er-dto-global {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 0 0;
    margin-top: 6px;
}
.isw-er-dto-global label {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
}
.isw-er-dto-global input {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 12px;
    text-align: right;
}
.isw-er-totals {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0 0;
    border-top: 2px solid #2c3e50;
    margin-top: 6px;
}
.isw-er-totals-detail {
    text-align: right;
    font-size: 12px;
    color: #777;
    margin-right: 20px;
}
.isw-er-totals-detail span {
    font-weight: 600;
    color: #333;
}
.isw-er-total-big {
    font-size: 20px;
    font-weight: 800;
    color: #e74c3c;
}
.isw-er-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.isw-er-footer-hint {
    font-size: 11px;
    color: #999;
}
.isw-er-actions {
    display: flex;
    gap: 8px;
}
.isw-er-btn {
    border: none;
    border-radius: 0;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.15s;
}
.isw-er-btn:hover {
    opacity: 0.85;
}
.isw-er-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.isw-er-btn-pre  { background: #3498db; }
.isw-er-btn-st   { background: #27ae60; }
.isw-er-btn-pro  { background: #9b59b6; }
.isw-er-btn-ot   { background: #e67e22; }
.isw-er-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    z-index: 5;
}
.isw-er-loading.active {
    display: flex;
}
.isw-er-instalacion-row {
    margin-top: 8px;
}
.isw-er-instalacion-row select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 7px 10px;
    font-size: 13px;
}
.isw-er-btn-trigger {
    background: #8E44AD;
    border: none;
    border-radius: 0;
    color: #fff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
}
.isw-er-btn-trigger:hover {
    background: #7d3c98;
}
