/* Estilo global gamer-corporativo para todo el sistema */
:root {
    --bg-1: #0b1220;
    --bg-2: #111a2f;
    --panel: rgba(18, 28, 49, 0.9);
    --panel-soft: rgba(22, 34, 58, 0.86);
    --line: rgba(78, 140, 235, 0.28);
    --line-strong: rgba(93, 186, 255, 0.5);
    --primary: #3ea1ff;
    --primary-2: #58bcff;
    --text-main: #e8f1ff;
    --text-soft: #9fb4d7;
    --danger: #ff5f8f;
    --warning: #ffd86c;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(62, 161, 255, 0.14), transparent 35%),
        radial-gradient(circle at 85% 15%, rgba(122, 240, 210, 0.08), transparent 30%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
    margin: 0;
    color: var(--text-main);
    overflow-x: hidden;
}

header {
    background: linear-gradient(120deg, rgba(37, 76, 140, 0.95), rgba(54, 129, 224, 0.92));
    color: #f3f8ff;
    padding: 1.5rem 1rem 1rem;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
    text-align: center;
    border-bottom: 1px solid var(--line-strong);
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 0.5em;
    letter-spacing: 0.2px;
}

.container {
    max-width: 1200px;
    width: min(96vw, 1200px);
    margin: 1.4rem auto;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.25rem;
    border: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: visible;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
    min-width: 760px;
    background: rgba(11, 18, 33, 0.7);
    border-radius: 10px;
    overflow: hidden;
}
.table th, .table td {
    padding: 0.66em 0.85em;
    border-bottom: 1px solid rgba(53, 87, 135, 0.5);
    text-align: left;
    vertical-align: middle;
}
.table th {
    background: linear-gradient(90deg, rgba(24, 54, 97, 0.95), rgba(45, 118, 201, 0.92));
    color: #f6fbff;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--line-strong);
}
.table td {
    white-space: nowrap;
    color: var(--text-main);
}
.table tr:nth-child(even) {
    background: rgba(22, 35, 60, 0.42);
}

.acciones {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.35em !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    max-width: 190px;
}

.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.45em 0.8em;
    font-size: 0.9rem;
    border-radius: 7px;
    white-space: nowrap;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    border: 1px solid rgba(102, 180, 255, 0.4);
    text-decoration: none;
    background: linear-gradient(90deg, #2f8fff, #53beff);
    color: #f4f9ff;
    box-shadow: 0 8px 18px rgba(37, 121, 219, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 10px 20px rgba(37, 121, 219, 0.36);
}

.btn-primary { background: linear-gradient(90deg, #2f8fff, #53beff); color: #fff; }
.btn-danger { background: linear-gradient(90deg, #f04878, #ff6d97); color: #fff; border-color: rgba(255, 158, 183, 0.35); }
.btn-warning { background: linear-gradient(90deg, #f0c655, #ffd86c); color: #1a2233; border-color: rgba(255, 236, 170, 0.35); }

.alert {
    background: rgba(255, 216, 108, 0.12);
    color: #ffe9b2;
    border: 1px solid rgba(255, 216, 108, 0.45);
    border-radius: 10px;
    padding: 0.9em 1em;
    margin-bottom: 1.2em;
    display: flex;
    align-items: center;
    gap: 0.6em;
}

label {
    color: var(--text-soft);
    font-size: 0.95rem;
}

input, select, textarea {
    padding: 0.56em 0.85em;
    border: 1px solid rgba(83, 149, 235, 0.5);
    border-radius: 8px;
    font-size: 0.96rem;
    margin-bottom: 0.9em;
    width: 100%;
    max-width: 100%;
    background: rgba(12, 22, 40, 0.95);
    color: var(--text-main);
    box-shadow: inset 0 0 10px rgba(62, 161, 255, 0.14);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(62, 161, 255, 0.18);
}

form { margin-bottom: 1.3em; }

.btn[title] { position: relative; }
.btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 120%;
    transform: translateX(-50%);
    background: #101a2d;
    color: #eaf3ff;
    padding: 0.3em 0.65em;
    border-radius: 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0.98;
    pointer-events: none;
    border: 1px solid var(--line);
}

@media (max-width: 900px) {
    header { padding: 1.2rem 0.8rem 0.8rem; }
    .container {
        padding: 0.8rem;
        width: 100vw;
        border-radius: 12px;
        margin: 1rem auto;
    }
    .table { min-width: 640px; font-size: 0.92rem; }
    .table td, .table th { padding: 0.45em 0.5em; }
    .acciones { flex-wrap: wrap !important; gap: 0.25em !important; }
    .btn { font-size: 0.84rem; padding: 0.44em 0.7em; }
}

@media (max-width: 520px) {
    h1 { font-size: 1.22rem; }
    .table { min-width: 560px; }
}
