@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #090909;
    --panel: #151414;
    --panel2: #191716;
    --line: #302a28;
    --text: #fff9f5;
    --muted: #ada39f;
    --fire: #ff785f;
    --orange: #ffad64;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px 'DM Sans', sans-serif; }
a { color: #ffae95; text-decoration: none; }
a:hover { color: #ffcfbb; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: 257px; flex: 0 0 257px; height: 100vh; padding: 30px 18px 22px; display: flex; flex-direction: column; background: #100f0e; border-right: 1px solid var(--line); z-index: 22; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; color: var(--text); font: 800 19px 'Outfit', sans-serif; letter-spacing: -.5px; }
.brand svg { height: 46px; width: 46px; flex-shrink: 0; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font: 700 9px 'DM Sans', sans-serif; letter-spacing: 2.4px; }
.nav-label { margin: 48px 14px 15px; color: #8e807b; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 13px; border: 1px solid transparent; border-radius: 12px; padding: 14px 13px; background: transparent; color: #c4bab4; text-align: left; cursor: pointer; font-weight: 700; }
.nav-link.active { color: #fff; background: #2e1e19; border-color: #794032; }
.nav-link:hover { color: white; background: #231b18; }
.nav-ico { font-size: 21px; width: 23px; text-align: center; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 19px; }
.who { padding: 9px 12px 21px; display: grid; gap: 4px; }
.who span { color: var(--muted); font-size: 12px; }
.exit { color: #ffb5a4; }
.main-shell { width: 100%; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 76px; padding: 0 clamp(20px, 3vw, 46px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.breadcrumb { font-weight: 700; color: #c6bbb6; }
.breadcrumb span { padding: 0 7px; color: var(--fire); }
.topuser { color: #d9cec7; white-space: nowrap; font-size: 13px; }
.dot { display: inline-block; width: 7px; height: 7px; background: #45d58c; border-radius: 50%; margin-right: 9px; }
.page-content { flex: 1; width: 100%; max-width: 1640px; margin: 0 auto; padding: 36px clamp(20px, 3vw, 46px) 65px; }
.page-head { margin-bottom: 27px; }
.eyebrow { color: var(--fire); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: 'Outfit', sans-serif; }
h1 { font-size: clamp(30px, 3vw, 41px); margin: 9px 0 0; letter-spacing: -.7px; }
h2 { margin: 0 0 13px; font-size: 19px; }
.muted, .section-head p { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.stat { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,#211714,#141313 70%); padding: 25px; }
.stat span { display: block; color: #d8aaa0; font-weight: 800; font-size: 10px; letter-spacing: 1.5px; }
.stat strong { display: block; font: 800 43px 'Outfit', sans-serif; margin: 12px 0; }
.stat small { color: var(--muted); }
.surface { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 25px; margin-bottom: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { margin-bottom: 0; font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; min-width: 650px; }
th { color: #a49a96; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
th, td { padding: 16px 12px; border-bottom: 1px solid #302b29; }
tbody tr:hover { background: #ffffff06; }
td { font-size: 13px; }
.table-link { color: #ffac91; white-space: nowrap; font-weight: 800; }
.chip { display: inline-flex; padding: 6px 10px; border-radius: 99px; color: #ffd3c4; background: #5b322540; border: 1px solid #89513a50; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 18px; min-height: 44px; border-radius: 12px; cursor: pointer; font-weight: 800; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: linear-gradient(110deg,var(--orange),var(--fire)); color: #21120c; }
.btn.outline { background: transparent; border-color: #55433b; color: #f1dbd1; }
.btn:hover { filter: brightness(1.09); color: inherit; }
.full { width: 100%; }
.searchbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.searchbar input { flex: 1; min-width: 200px; }
input:not([type=checkbox]), select, textarea { color: white; background: #211d1b; border: 1px solid #4b3c35; border-radius: 11px; padding: 12px 14px; outline: 0; min-height: 46px; }
input:focus, textarea:focus, select:focus { border-color: var(--fire); box-shadow: 0 0 0 3px #ff785f22; }
input::placeholder, textarea::placeholder { color: #968881; }
.pagination { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 20px; color: var(--muted); }
.pagination > div { display: flex; gap: 10px; }
.backrow { margin-bottom: 24px; }
.profile-intro { display: flex; gap: 17px; align-items: center; margin-bottom: 22px; }
.profile-intro h2 { margin: 5px 0; font-size: 27px; }
.profile-intro p { margin-bottom: 0; color: var(--muted); }
.avatar { height: 74px; width: 74px; border-radius: 20px; background: linear-gradient(135deg,#fb915d,#c7412d); display: grid; place-items: center; font: 800 32px 'Outfit',sans-serif; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.data-list { display: grid; }
.data-row { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #302a27; overflow-wrap: anywhere; }
.data-row span { color: var(--muted); font-size: 12px; }
.data-row strong { font-size: 13px; font-weight: 600; white-space: pre-wrap; }
.note-form { display: grid; gap: 12px; max-width: 620px; }
.note-form label { font-weight: 700; }
.note-form textarea { resize: vertical; }
.note-form .btn { justify-self: start; }
.alert { border-radius: 12px; padding: 13px 17px; margin: 15px 0 22px; }
.alert.error { color: #ffbab2; background: #52251d; border: 1px solid #a64a3f; }
.alert.success { color: #a6e2c8; background: #18382a; border: 1px solid #345e48; }
.alert.info { color: #dfcfc2; background: #271f1b; border: 1px solid #574235; }
.history-item { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.history-item > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.history-item span { color: var(--muted); font-size: 12px; }
.history-item p { line-height: 1.7; margin-top: 14px; white-space: normal; overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); padding: 20px 45px; color: #877d79; font-size: 11px; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.menu-toggle { display: none; color: #fff; border: 1px solid var(--line); background: #221a16; border-radius: 10px; font-size: 20px; padding: 7px 12px; }
.sidebar-backdrop { display: none; }

.login-body { display: grid; min-height: 100dvh; place-items: center; padding: 25px; background: radial-gradient(circle at 50% 10%,#6b2b1b44, transparent 40%),radial-gradient(circle at 100% 100%,#48231533,transparent 43%), #090909; }
.login-card { width: min(100%,430px); padding: 42px; border: 1px solid #49362c; border-radius: 26px; background: #151210ed; box-shadow: 0 25px 100px #0008; }
.login-mark { margin-bottom: 25px; }
.login-mark svg { width: 70px; height: 70px; }
.login-card h1 { font-size: 35px; margin: 9px 0; }
.accent { color: var(--fire); }
.login-card > p { line-height: 1.65; }
.login-card form { display: grid; gap: 12px; margin-top: 24px; }
.login-card form label { font-weight: 700; margin-top: 7px; }
.login-card .btn { margin-top: 11px; }
.login-foot { margin-top: 25px; text-align: center; color: #9e918b; font-size: 11px; }

@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; transform: translateX(-101%); transition: transform .2s ease; }
    .menu-open .sidebar { transform: translateX(0); }
    .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #0009; z-index: 21; }
    .menu-toggle { display: inline-block; }
    .topbar { justify-content: flex-start; }
    .topuser { margin-left: auto; }
    .stats { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .page-content { padding: 26px 15px 45px; }
    .surface { padding: 18px 13px; }
    .topbar { padding: 0 15px; }
    .topuser { display: none; }
    .login-card { padding: 30px 23px; }
    .searchbar > * { width: 100%; }
    .pagination { flex-direction: column; align-items: stretch; }
    .pagination > div { justify-content: space-between; }
    .footer { padding-inline: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/*
|--------------------------------------------------------------------------
| QUIMIKA ADMIN - Tablas compactas y profesionales
|--------------------------------------------------------------------------
*/

.table-scroll table {
    width: 100%;
    border-collapse: collapse;
}

.table-scroll table th,
.table-scroll table td {
    padding: 10px 14px;
    line-height: 1.4;
    vertical-align: middle;
    height: auto;
}

.table-scroll table th {
    font-size: 12px;
    font-weight: 700;
}

.table-scroll table td {
    font-size: 13px;
}

.table-scroll table tbody tr {
    height: auto;
}

.table-scroll table tbody tr:hover {
    background: rgba(255, 120, 95, 0.05);
}

/*
|--------------------------------------------------------------------------
| QUIMIKA ADMIN - Datos de los perfiles más compactos
|--------------------------------------------------------------------------
*/

.data-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.data-row {
    display: grid;
    grid-template-columns: minmax(130px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    min-height: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.data-row:last-child {
    border-bottom: none;
}

.data-row > span {
    color: #a9a19c;
    font-size: 13px;
    line-height: 1.4;
}

.data-row > strong {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .data-row {
        grid-template-columns: minmax(105px, 40%) minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
    }
}