/* =========================================================
   PRAXIS FILES
   ========================================================= */

:root {
    color-scheme: dark;
}

/* ---------------------------------------------------------
   BASE
   --------------------------------------------------------- */

html,
body {
    background:
        radial-gradient(
            circle at 18% 10%,
            rgba(38, 125, 220, 0.12),
            transparent 32%
        ),
        radial-gradient(
            circle at 82% 12%,
            rgba(255, 115, 35, 0.055),
            transparent 25%
        ),
        linear-gradient(
            145deg,
            #060a11 0%,
            #09111b 45%,
            #060a10 100%
        ) !important;

    color: #eaf0f7 !important;
}

/* ---------------------------------------------------------
   LOGIN
   --------------------------------------------------------- */

body:has(input[type="password"]) {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 22%,
            rgba(61, 142, 235, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 76% 18%,
            rgba(255, 113, 29, 0.07),
            transparent 22%
        ),
        linear-gradient(
            160deg,
            #07101a 0%,
            #0a131d 48%,
            #05080d 100%
        ) !important;
}

/* Logo del login */

body:has(input[type="password"]) img {
    width: 96px !important;
    height: 96px !important;

    object-fit: contain;

    filter:
        drop-shadow(0 0 10px rgba(66, 155, 255, 0.24))
        drop-shadow(0 0 18px rgba(255, 116, 27, 0.09));
}

/* Formulario de login */

form:has(input[type="password"]) {
    width: min(390px, calc(100vw - 40px)) !important;

    padding: 28px 28px 30px !important;

    background:
        linear-gradient(
            145deg,
            rgba(13, 22, 33, 0.80),
            rgba(7, 13, 21, 0.76)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 18px !important;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.40),
        0 0 0 1px rgba(77, 160, 245, 0.035) inset !important;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Inputs del login */

form:has(input[type="password"]) input {
    min-height: 50px;

    background: rgba(3, 8, 14, 0.78) !important;

    border:
        1px solid rgba(255, 255, 255, 0.10) !important;

    border-radius: 10px !important;

    color: #edf4fb !important;
}

form:has(input[type="password"]) input:focus {
    border-color: rgba(83, 169, 250, 0.75) !important;

    box-shadow:
        0 0 0 3px rgba(67, 157, 242, 0.11) !important;
}

/* Botón login */

form:has(input[type="password"]) button[type="submit"] {
    min-height: 50px;

    border: 0 !important;
    border-radius: 10px !important;

    background:
        linear-gradient(
            100deg,
            #168dea 0%,
            #3a8ee8 48%,
            #dc6b26 130%
        ) !important;

    color: white !important;

    font-weight: 600;

    box-shadow:
        0 8px 24px rgba(16, 114, 198, 0.18) !important;

    transition:
        filter 160ms ease,
        transform 160ms ease;
}

form:has(input[type="password"]) button[type="submit"]:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

header {
    background:
        linear-gradient(
            90deg,
            rgba(4, 9, 16, 0.98),
            rgba(7, 13, 22, 0.96)
        ) !important;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.065) !important;

    box-shadow:
        0 8px 26px rgba(0, 0, 0, 0.22) !important;
}

/* Logo pequeño del header */

header img {
    filter:
        drop-shadow(0 0 7px rgba(53, 151, 246, 0.18));
}

/* ---------------------------------------------------------
   BUSCADOR
   --------------------------------------------------------- */

header input {
    background:
        rgba(5, 11, 18, 0.85) !important;

    border:
        1px solid rgba(255, 255, 255, 0.085) !important;

    border-radius: 10px !important;

    color: #eef5fb !important;
}

header input:focus {
    border-color:
        rgba(82, 165, 244, 0.56) !important;

    box-shadow:
        0 0 0 3px rgba(61, 145, 225, 0.08) !important;
}

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

aside,
.sidebar {
    background:
        linear-gradient(
            180deg,
            rgba(5, 10, 17, 0.99),
            rgba(6, 12, 20, 0.97)
        ) !important;

    border-right:
        1px solid rgba(255, 255, 255, 0.055) !important;
}

aside a,
.sidebar a {
    color:
        rgba(237, 244, 251, 0.83) !important;

    border-radius: 9px !important;

    transition:
        background 150ms ease,
        color 150ms ease;
}

aside a:hover,
.sidebar a:hover {
    background:
        rgba(72, 157, 237, 0.09) !important;

    color: #ffffff !important;
}

/* ---------------------------------------------------------
   CONTENIDO
   --------------------------------------------------------- */

main,
.main {
    background: transparent !important;
}

/* ---------------------------------------------------------
   TARJETAS / CARPETAS
   --------------------------------------------------------- */

.card,
.panel {
    background:
        linear-gradient(
            145deg,
            rgba(24, 34, 45, 0.87),
            rgba(17, 25, 35, 0.88)
        ) !important;

    border:
        1px solid rgba(255, 255, 255, 0.06) !important;

    border-radius: 12px !important;

    box-shadow:
        0 9px 26px rgba(0, 0, 0, 0.14) !important;

    transition:
        border-color 150ms ease,
        background 150ms ease,
        transform 150ms ease;
}

.card:hover,
.panel:hover {
    background:
        rgba(28, 41, 54, 0.94) !important;

    border-color:
        rgba(76, 162, 244, 0.17) !important;

    transform: translateY(-1px);
}

/* ---------------------------------------------------------
   TABLAS
   --------------------------------------------------------- */

table {
    background: transparent !important;
}

tr {
    border-color:
        rgba(255, 255, 255, 0.055) !important;
}

tbody tr:hover {
    background:
        rgba(68, 153, 235, 0.065) !important;
}

td,
th {
    color:
        rgba(235, 242, 249, 0.89) !important;
}

/* ---------------------------------------------------------
   INPUTS
   --------------------------------------------------------- */

input,
textarea,
select {
    background:
        rgba(4, 9, 16, 0.78) !important;

    color: #edf3f9 !important;

    border:
        1px solid rgba(255, 255, 255, 0.10) !important;

    border-radius: 9px !important;

    outline: none !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color:
        rgba(93, 178, 255, 0.72) !important;

    box-shadow:
        0 0 0 3px rgba(74, 160, 240, 0.10) !important;
}

input::placeholder,
textarea::placeholder {
    color:
        rgba(222, 234, 244, 0.39) !important;
}

/* ---------------------------------------------------------
   BOTONES
   --------------------------------------------------------- */

button {
    border-radius: 9px !important;
}

button:not(:disabled):hover {
    filter: brightness(1.07);
}

/* ---------------------------------------------------------
   ENLACES
   --------------------------------------------------------- */

a {
    color: #78bef8;
}

a:hover {
    color: #a9d9ff;
}

/* ---------------------------------------------------------
   MODALES
   --------------------------------------------------------- */

dialog,
.modal,
[role="dialog"] {
    background:
        rgba(9, 16, 25, 0.97) !important;

    color: #edf3f9 !important;

    border:
        1px solid rgba(255, 255, 255, 0.09) !important;

    border-radius: 15px !important;

    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.58) !important;
}

/* ---------------------------------------------------------
   SCROLLBAR
   --------------------------------------------------------- */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background:
        rgba(2, 5, 10, 0.55);
}

::-webkit-scrollbar-thumb {
    background:
        rgba(100, 155, 202, 0.28);

    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background:
        rgba(104, 164, 215, 0.44);
}

/* ---------------------------------------------------------
   TEXTO SELECCIONADO
   --------------------------------------------------------- */

::selection {
    background:
        rgba(59, 153, 241, 0.38);

    color: white;
}
/* =========================================================
   PRAXIS FILES — FINAL POLISH
   ========================================================= */

/* ---------- LOGIN ---------- */

/* Un poco más de anchura para evitar que Praxis Files se parta */
body:has(input[type="password"]) form {
    width: min(430px, calc(100vw - 32px)) !important;
}

/* Título del login */
body:has(input[type="password"]) h1 {
    font-size: 42px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 34px !important;
}

/* Logo */
body:has(input[type="password"]) img {
    width: 112px !important;
    height: 112px !important;
    margin-bottom: 18px !important;
}

/* Botón real del login */
body:has(input[type="password"]) button {
    min-height: 50px !important;

    background:
        linear-gradient(
            100deg,
            #168dea 0%,
            #347fd9 55%,
            #b65e2c 125%
        ) !important;

    color: #ffffff !important;

    border: 1px solid rgba(255,255,255,0.07) !important;

    box-shadow:
        0 8px 28px rgba(25, 126, 215, 0.18),
        0 0 18px rgba(255, 118, 34, 0.05) !important;
}

body:has(input[type="password"]) button:hover {
    filter: brightness(1.10) !important;
}

/* ---------- FILE VIEW ---------- */

/* Tarjetas algo menos grises */
.card {
    background:
        linear-gradient(
            145deg,
            rgba(22, 34, 47, 0.94),
            rgba(14, 24, 35, 0.94)
        ) !important;
}

.card:hover {
    background:
        linear-gradient(
            145deg,
            rgba(28, 44, 59, 0.97),
            rgba(17, 30, 43, 0.97)
        ) !important;

    border-color: rgba(58, 156, 245, 0.20) !important;
}

/* Logo de cabecera */
header img {
    margin-left: 4px !important;

    filter:
        drop-shadow(0 0 7px rgba(25, 145, 255, 0.30))
        drop-shadow(0 0 6px rgba(255, 106, 28, 0.10)) !important;
}
/* =========================================================
   PRAXIS FILES — EXTRA POLISH
   ========================================================= */

/* ---------- FONDO GENERAL MÁS MATIZADO ---------- */

html,
body {
    background:
        radial-gradient(
            circle at 14% 12%,
            rgba(48, 128, 214, 0.13),
            transparent 28%
        ),
        radial-gradient(
            circle at 82% 14%,
            rgba(255, 113, 29, 0.05),
            transparent 20%
        ),
        radial-gradient(
            circle at 50% 55%,
            rgba(32, 82, 145, 0.06),
            transparent 34%
        ),
        linear-gradient(
            160deg,
            #060a10 0%,
            #08111b 38%,
            #050910 72%,
            #04070c 100%
        ) !important;
}

/* ---------- ZONA PRINCIPAL CON MÁS PROFUNDIDAD ---------- */

main,
.main {
    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(43, 119, 210, 0.05),
            transparent 22%
        ),
        radial-gradient(
            circle at 78% 18%,
            rgba(255, 115, 35, 0.03),
            transparent 18%
        ),
        radial-gradient(
            circle at 60% 72%,
            rgba(34, 89, 161, 0.04),
            transparent 24%
        ) !important;
}

/* ---------- SIDEBAR TAMBIÉN UN POCO MÁS VIVA ---------- */

aside,
.sidebar {
    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(38, 116, 210, 0.08),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            rgba(5, 10, 17, 0.99),
            rgba(7, 12, 19, 0.98)
        ) !important;
}

/* ---------- CONTENEDOR DEL BUSCADOR ---------- */

header form,
header .search {
    background:
        linear-gradient(
            145deg,
            rgba(58, 67, 79, 0.88),
            rgba(48, 57, 69, 0.84)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 12px !important;

    padding: 8px 12px !important;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.14) !important;
}

/* ---------- INPUT DEL BUSCADOR ---------- */

header input,
header .search input,
header form input {
    min-height: 40px !important;

    padding: 0 18px !important;

    background: rgba(4, 9, 16, 0.92) !important;

    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 999px !important;

    color: #eef5fb !important;
}

/* si el icono de búsqueda está visualmente muy pegado */
header svg,
header .search svg,
header form svg {
    margin-right: 10px !important;
}

/* placeholder algo más limpio */
header input::placeholder,
header .search input::placeholder,
header form input::placeholder {
    color: rgba(224, 235, 246, 0.42) !important;
}
/* =========================================================
   PRAXIS FILES — CORRECCIONES FINALES
   ========================================================= */

/* ---------------------------------------------------------
   LOGIN: DEGRADADO REAL
   FileBrowser cubre el body con #login
   --------------------------------------------------------- */

#login {
    background:
        radial-gradient(
            circle at 35% 20%,
            rgba(35, 112, 190, 0.18),
            transparent 32%
        ),
        radial-gradient(
            circle at 72% 28%,
            rgba(255, 105, 30, 0.07),
            transparent 24%
        ),
        radial-gradient(
            circle at 50% 80%,
            rgba(25, 68, 115, 0.10),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #172630 0%,
            #111d27 42%,
            #0b141d 72%,
            #080e15 100%
        ) !important;
}


/* ---------------------------------------------------------
   INTERIOR: FONDO CON PROFUNDIDAD
   --------------------------------------------------------- */

#app {
    min-height: calc(100vh - 4em);

    background:
        radial-gradient(
            circle at 18% 15%,
            rgba(31, 103, 180, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 82% 20%,
            rgba(255, 111, 35, 0.035),
            transparent 22%
        ),
        radial-gradient(
            circle at 55% 75%,
            rgba(23, 75, 135, 0.055),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            #07101a 0%,
            #08121d 45%,
            #050b13 100%
        ) !important;
}


/* La barra de navegación no debe tapar el degradado */

.breadcrumbs {
    background:
        rgba(18, 29, 38, 0.72) !important;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* ---------------------------------------------------------
   BUSCADOR
   --------------------------------------------------------- */

/*
   Quitamos nuestro padding anterior del contenedor exterior.
*/

header form,
header .search {
    padding: 0 !important;

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;
}


/*
   Este es el contenedor REAL del buscador de FileBrowser.
*/

#search #input {
    padding: 0 10px !important;

    background:
        rgba(9, 15, 23, 0.92) !important;

    border:
        1px solid rgba(255, 255, 255, 0.07) !important;

    border-radius: 10px !important;
}


/*
   Un poquito de aire solo para el texto.
   Nada de los 18px anteriores.
*/

#search input {
    padding: 0 6px !important;
}


/*
   Separación icono → input.
*/

#search #input > i,
#search #input > .action {
    margin-right: 5px !important;
}


/* Placeholder */

#search input::placeholder {
    color:
        rgba(220, 231, 241, 0.42) !important;
}
