/* ==========================================================================
   Identificador Norma ANSI/ISA-S5.1 - ElectroWeb
   ========================================================================== */

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

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

.container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 30px;
    margin: 20px auto;
}

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

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

h1 {
    color: #003366;
    font-size: 2rem;
    border-left: 6px solid #0066b3;
    padding-left: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitle {
    color: #2c5f7a;
    font-size: 0.95rem;
    margin-left: 26px;
    margin-bottom: 25px;
    font-weight: 400;
}

.search-section {
    background: #f5f8fa;
    padding: 20px 25px;
    border-radius: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 25px;
    border: 1px solid #d0dce8;
}

.search-section label {
    font-weight: 600;
    color: #003366;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section label span {
    background: #003366;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

#codeInput {
    flex: 1;
    min-width: 180px;
    padding: 14px 22px;
    border: 2px solid #b8ccdb;
    border-radius: 40px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: white;
    transition: 0.3s;
    outline: none;
    color: #003366;
}

#codeInput:focus {
    border-color: #0066b3;
    box-shadow: 0 0 0 4px rgba(0, 102, 179, 0.15);
}

#searchBtn {
    background: #003366;
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #003366;
    letter-spacing: 0.5px;
}

#searchBtn:hover {
    background: #004d99;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

#searchBtn:active {
    transform: scale(0.97);
}

.result-panel {
    background: #f9fcff;
    border-radius: 20px;
    padding: 25px;
    min-height: 180px;
    border: 1px solid #dbe6f0;
    transition: 0.3s;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #dbe6f0;
    padding-bottom: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-header span:first-child {
    font-weight: 700;
    color: #003366;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-isa {
    background: #003366;
    color: white;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#resultContent {
    padding: 5px 0;
}

.instrument-display {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.instrument-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #002244;
    line-height: 1.3;
    margin-bottom: 6px;
}

.instrument-code-badge {
    display: inline-block;
    background: #e1edf7;
    color: #003366;
    padding: 6px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-top: 4px;
}

.instrument-detail {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 25px;
    padding-top: 14px;
    border-top: 1px solid #e8f0f7;
}

.instrument-detail .tag {
    font-weight: 600;
    color: #2c5f7a;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.instrument-detail .value {
    font-weight: 500;
    color: #003366;
}

.not-found {
    background: #fff5f5;
    padding: 20px 25px;
    border-radius: 16px;
    border-left: 5px solid #cc3333;
}

.not-found .title {
    font-weight: 700;
    color: #cc3333;
    font-size: 1.3rem;
}

.not-found .suggestion {
    margin-top: 12px;
    color: #2c5f7a;
    font-size: 0.95rem;
}

.hint-box {
    background: #f0f6fc;
    padding: 18px 22px;
    border-radius: 14px;
    margin-top: 16px;
    border: 1px solid #dce8f2;
}

.hint-box strong {
    color: #003366;
}

.hint-box .code-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 8px;
}

.hint-box .code-examples span {
    background: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #004d99;
    border: 1px solid #c5d7e6;
    font-size: 0.9rem;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dce6ef;
    text-align: center;
    color: #4a6f88;
    font-size: 0.85rem;
}

.footer span {
    background: #eaf1f8;
    padding: 3px 14px;
    border-radius: 20px;
    margin: 0 4px;
}

@media (max-width: 600px) {
    .container { padding: 18px; }
    .search-section { border-radius: 30px; padding: 16px; }
    #codeInput { min-width: 120px; font-size: 1rem; }
    .instrument-name { font-size: 1.6rem; }
}
