@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap");

:root {
    --bg-a: #f3f7ff;
    --bg-b: #eef9f4;
    --ink: #0f172a;
    --muted: #475569;
    --line: #dbe2ea;
    --card: #ffffff;
    --primary: #0b57d0;
    --primary-2: #1d4ed8;
    --danger: #dc2626;
    --warning: #f59e0b;
    --success: #16a34a;
    --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 18px 50px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 420px at 12% -8%, #dcecff 0, transparent 65%),
        radial-gradient(1000px 420px at 92% -10%, #d8f7e8 0, transparent 65%),
        linear-gradient(130deg, var(--bg-a), var(--bg-b));
}

a {
    text-decoration: none;
}

.header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(219, 226, 234, 0.9);
}

.brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px 6px;
}

.tab {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.75);
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab:hover {
    transform: translateY(-1px);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
    background: #fff;
}

.tab.active {
    color: #fff;
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 24px rgba(11, 87, 208, 0.35);
}

.container {
    max-width: 1160px;
    margin: 10px auto 40px;
    padding: 0 20px;
}

.card {
    background: linear-gradient(180deg, #ffffff, #fdfefe);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-soft);
    animation: rise-in 0.45s ease both;
}

.container .card:nth-child(2) {
    animation-delay: 0.08s;
}

.container .card:nth-child(3) {
    animation-delay: 0.14s;
}

.card-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
}

.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    align-items: center;
}

.grid-form label,
.form-vertical label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.grid-form input,
.grid-form select,
.form-vertical input,
.textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 11px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.grid-form input:focus,
.grid-form select:focus,
.form-vertical input:focus,
.textarea:focus {
    outline: none;
    border-color: #6ea8ff;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.16);
}

.textarea {
    resize: vertical;
    min-height: 110px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn {
    border: none;
    border-radius: 11px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    box-shadow: 0 9px 22px rgba(11, 87, 208, 0.35);
}

.btn-secondary {
    color: #1f2937;
    background: #e9eef5;
}

.btn-ghost {
    color: #111827;
    background: #fff;
    border: 1px solid var(--line);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(120deg, #ef4444, var(--danger));
}

.btn-info {
    color: #fff;
    background: linear-gradient(120deg, #2563eb, #1d4ed8);
}

.btn-warning {
    color: #1f2937;
    background: linear-gradient(120deg, #fcd34d, var(--warning));
}

.btn-block {
    width: 100%;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e8edf3;
    text-align: left;
    vertical-align: middle;
}

.data-table thead th {
    background: #f4f8fc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #334155;
}

.data-table tbody tr {
    transition: background 0.18s ease;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.acciones {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e5e7eb;
}

.pill.success {
    background: #dcfce7;
    color: #166534;
}

.pill.warning {
    background: #fef3c7;
    color: #92400e;
}

.alert {
    margin-bottom: 12px;
    border-radius: 12px;
    padding: 10px 13px;
    border: 1px solid transparent;
    font-weight: 600;
    animation: rise-in 0.35s ease both;
}

.alert-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.alert-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.table-header small {
    color: var(--muted);
}

.thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.helper-text {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--muted);
}

.link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 700;
}

.error {
    grid-column: 1 / -1;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: var(--shadow-strong);
    animation: pop-in 0.38s ease both;
}

.login-card .card-title {
    text-align: center;
    margin-bottom: 12px;
}

.avatar {
    width: 110px;
    height: 110px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(140deg, #dbeafe, #bfdbfe);
    position: relative;
    overflow: hidden;
}

.avatar::before {
    content: "";
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: #7aa1f0;
    top: 10px;
    left: 21px;
}

.avatar::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 46px;
    border-radius: 0 0 50px 50px;
    background: #507dd7;
    left: 10px;
    bottom: 8px;
}

.form-vertical .form-group {
    margin-bottom: 12px;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 920px) {
    .grid-form {
        grid-template-columns: 1fr;
    }
    .tabs {
        padding-top: 10px;
    }
}

@media (max-width: 640px) {
    .header {
        padding: 12px 14px;
    }
    .brand {
        font-size: 13px;
    }
    .container {
        padding: 0 12px;
    }
    .card {
        padding: 16px;
        border-radius: 14px;
    }
    .tab {
        width: 100%;
        text-align: center;
    }
}
