:root {
    --bg: #032c4c;
    --panel: #001f33;
    --accent: #007bff;
    --text: #ffffff;
    --muted: #cccccc;
    --table-text: #333333;
    --btn-gray: #888888;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrap {
    max-width: 480px;
    margin: 18px auto;
    padding: 16px;
    box-sizing: border-box;
}

h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 18px;
}

.card {
    background: linear-gradient(180deg, var(--panel), #022a42);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

label {
    display: block;
    font-size: 40px;
    margin-bottom: 10px;
    text-align: center;
}

input[type="number"] {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 12px;
    display: block;
    font-size: 56px;
    color: #fff;
    background: transparent;
    border: 2px solid var(--muted);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    outline: none;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn {
    font-size: 22px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    width: 100%;
    max-width: 140px;
    display: block;
}

.botones-buscar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.resultado {
    margin-top: 12px;
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    padding: 10px;
}

.mensaje {
    margin-top: 10px;
    text-align: center;
    font-size: 16px;
    color: #ffcc00;
}

.acciones {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center; /* centra los botones en cada fila */
}

.acciones button {
    flex: 1 1 calc(33.333% - 12px); /* hasta 3 por fila */
    max-width: 140px;
    font-size: 18px;
    padding: 10px 6px;
    border-radius: 10px;
    border: none;
    background: var(--btn-gray);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.acciones button.selected {
    background: var(--accent);
}

.acciones button:active {
    transform: translateY(1px);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

table.wide {
    width: 100%;
    table-layout: fixed;
    font-size: 14px;
    background: #fff;
    color: var(--table-text);
    border-collapse: collapse;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

table.wide th, table.wide td {
    padding: 8px 6px;
    word-wrap: break-word;
    text-align: center;
}

table.wide th {
    background:#007bff;
    color:#fff;
    font-weight:bold;
    text-transform:uppercase;
    letter-spacing:0.5px;
}

table.wide th:last-child,
table.wide td:last-child {
    width: 60px;
    text-align: center;
}

table.wide tr:nth-child(even) {
    background:#f9f9f9;
}

table.wide tr:hover {
    background:#f1f7ff;
}

table.wide td button img {
    width: 24px;
    height: 24px;
    border: none;
    vertical-align: middle;
}

@media (max-width: 480px) {
    label { font-size: 36px; }
    input[type="number"] { font-size: 48px; max-width: 220px; }
    .resultado { font-size: 30px; }
    .btn { font-size: 20px; max-width: 120px; }
    .acciones button { font-size: 16px; padding: 8px 4px; }
    table.wide th, table.wide td { padding: 6px 4px; font-size: 12px; }
}
