/* Panel de precios SegurosWS - estilos 100% locales, sin dependencias externas. */

:root {
    --bg: #0f1115;
    --surface: #1a1d24;
    --surface-2: #21252e;
    --border: #2c313c;
    --text: #e7e9ee;
    --muted: #9aa3b2;
    --accent: #4f8cff;
    --accent-soft: #1e2a44;
    --error: #ff6b6b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

.logout {
    margin-left: auto;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.8rem;
}

.logout:hover {
    color: var(--text);
    background: var(--surface-2);
}

.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.tab {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.tab:hover {
    color: var(--text);
    background: var(--surface-2);
}

.tab--active {
    color: var(--text);
    background: var(--bg);
    border-color: var(--border);
}

.content {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.subtab {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
}

.subtab:hover {
    color: var(--text);
    background: var(--surface-2);
}

.subtab--active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
}

.panel h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.meta {
    margin: 0 0 0.9rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.error {
    margin: 0.5rem 0 0;
    color: var(--error);
    font-size: 0.85rem;
    word-break: break-word;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    text-align: left;
    background: var(--surface-2);
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.72rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.filter-row th {
    position: sticky;
    top: 33px;
    z-index: 1;
    padding: 0.3rem 0.5rem;
    text-transform: none;
}

.col-filter {
    width: 100%;
    min-width: 90px;
    padding: 0.3rem 0.45rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
}

.col-filter:focus {
    outline: none;
    border-color: var(--accent);
}

tbody td {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

tbody tr:hover {
    background: var(--accent-soft);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Pantalla de acceso */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.login__hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.login input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.login input[type="password"]:focus {
    outline: none;
    border-color: var(--accent);
}

.login button {
    margin-top: 0.25rem;
    padding: 0.65rem 0.8rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.login button:hover {
    filter: brightness(1.08);
}
