/* ==========================================================================
   Calculadora de Sección de Cables (AWG / mm²) - ElectroWeb
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 180px;
    height: auto;
}

.version-badge {
    background: #10b981;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

h1 {
    font-size: 26px;
    font-weight: 600;
    color: #1a2634;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.subhead {
    color: #4a5b6e;
    font-size: 15px;
    border-left: 4px solid #3b82f6;
    padding-left: 14px;
    margin: 6px 0 24px 0;
    background: #f0f4ff;
    border-radius: 0 12px 12px 0;
    line-height: 1.5;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input,
.input-group select {
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    font-weight: 500;
    transition: 0.15s;
    background: white;
    width: 100%;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-group .unit {
    font-size: 12px;
    color: #6b7f94;
    margin-top: 2px;
}

.conversion-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.conversion-box h3 {
    font-size: 16px;
    color: #1a2634;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-box {
    background: #0b1e2f;
    border-radius: 18px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px 24px;
    margin: 16px 0 8px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8aa3c0;
}

.result-item .value {
    font-size: 22px;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
}

.result-item .value.awg-color {
    color: #60a5fa;
}
.result-item .value.mm2-color {
    color: #fbbf24;
}
.result-item .value.success {
    color: #6ee7b7;
}

.result-item .sub {
    font-size: 12px;
    color: #b0c7df;
}

.status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.status-badge.ok {
    background: #1a3a2a;
    color: #6ee7b7;
}
.status-badge.warning {
    background: #4a3a1a;
    color: #fcd34d;
}
.status-badge.danger {
    background: #4a1a1a;
    color: #fca5a5;
}
.status-badge.info {
    background: #1a2a4a;
    color: #60a5fa;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.btn {
    padding: 10px 28px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.15s;
    background: #eef2f6;
    color: #1e2a3a;
}

.btn-primary {
    background: #1e2a3a;
    color: white;
}

.btn-primary:hover {
    background: #2d3f55;
    transform: scale(1.02);
}

.btn-secondary {
    background: #e2e8f0;
}

.btn-secondary:hover {
    background: #d0d8e4;
}

.btn-warning {
    background: #fbbf24;
    color: #1a2634;
}

.btn-warning:hover {
    background: #f59e0b;
}

.footer-note {
    margin-top: 24px;
    font-size: 13px;
    color: #5a6f84;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

.reference-table {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    overflow-x: auto;
}

.reference-table table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.reference-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1a2634;
    position: sticky;
    top: 0;
}

.reference-table .highlight-awg {
    background: #dbeafe;
}

.reference-table .highlight-mm {
    background: #fef3c7;
}

.method-info {
    background: #e8f4f8;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    font-size: 13px;
    border-left: 4px solid #3b82f6;
}

.method-info strong {
    color: #1a2634;
}

.correction-note {
    background: #d1fae5;
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #065f46;
    font-weight: 600;
}

.selected-info {
    background: #f0f4ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    color: #1a2634;
}

.comparison-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.comparison-item {
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.comparison-item.awg {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.comparison-item.mm2 {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.comparison-item .title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 5px;
}

.comparison-item .value-display {
    font-size: 24px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    .grid-2col {
        grid-template-columns: 1fr;
    }
    .result-box {
        grid-template-columns: 1fr 1fr;
    }
    .result-item .value {
        font-size: 18px;
    }
    .comparison-box {
        grid-template-columns: 1fr;
    }
}
