/* =========================================================
   ELYSIUM 2400 — LCARS DATABASE HOME
   ========================================================= */

.ely-lcars-home {
    width: 100%;
    box-sizing: border-box;
    color: #edf7ff;
}


/* =========================================================
   LCARS HERO
   ========================================================= */

.ely-lcars-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 30px;

    margin-bottom: 22px;
    padding: 28px 32px;

    background:
        linear-gradient(
            135deg,
            rgba(10, 28, 43, .98),
            rgba(3, 12, 22, .98)
        );

    border: 1px solid rgba(50, 211, 255, .45);
    border-radius: 18px;

    overflow: hidden;
}


/* LCARS coloured left bar */
.ely-lcars-hero::before {
    content: "";
    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 12px;

    background:
        linear-gradient(
            to bottom,
            #7f86b5 0 22%,
            #d99b18 22% 43%,
            #438bc0 43% 100%
        );
}


.ely-lcars-hero-main {
    padding-left: 12px;
}


.ely-lcars-kicker {
    margin-bottom: 5px;

    color: #f3b52e;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}


.ely-lcars-hero h1 {
    margin: 0 0 18px;

    color: #32d3ff;

    font-size: clamp(30px, 4vw, 48px);
    line-height: 1;
    letter-spacing: .02em;
}


.ely-lcars-hero p {
    max-width: 650px;

    margin: 0 0 22px;

    color: #dbeaf3;

    font-size: 15px;
    line-height: 1.6;
}


/* =========================================================
   SEARCH
   ========================================================= */

.ely-lcars-search form {
    display: flex;
    width: 100%;
    max-width: 760px;
}


.ely-lcars-search input[type="text"] {
    flex: 1;

    min-width: 0;

    padding: 13px 16px !important;

    background: #020b14 !important;

    color: #edf7ff !important;

    border: 1px solid #c88913 !important;
    border-right: 0 !important;

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

    outline: none;
}


.ely-lcars-search input[type="text"]::placeholder {
    color: #6192ac;
}


.ely-lcars-search input[type="text"]:focus {
    border-color: #f3b52e !important;
    box-shadow: 0 0 12px rgba(243, 181, 46, .12);
}


.ely-lcars-search button {
    padding: 0 28px;

    background:
        linear-gradient(
            180deg,
            #f0b43b,
            #c88b13
        );

    color: #07111b;

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

    font-weight: 800;
    letter-spacing: .04em;

    cursor: pointer;
}


.ely-lcars-search button:hover {
    filter: brightness(1.12);
}


/* =========================================================
   DATABASE STATUS
   ========================================================= */

.ely-lcars-hero-status {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding-left: 25px;

    border-left: 1px solid rgba(50, 211, 255, .22);
}


.ely-lcars-hero-status strong {
    display: block;

    margin-bottom: 5px;

    color: #59cdec;

    font-size: 28px;
    letter-spacing: .04em;
}


.ely-lcars-hero-status > span {
    color: #7bd8ef;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
}


.ely-lcars-status-lines {
    display: flex;
    flex-direction: column;

    margin-top: 25px;

    font-size: 12px;
    line-height: 1.7;
}


.ely-lcars-status-lines span:first-child {
    color: #f3b52e;
}


.ely-lcars-status-lines span:nth-child(2) {
    color: #32d3ff;
}


.ely-lcars-status-lines span:last-child {
    color: #69c77a;
}


/* =========================================================
   SIX DATABASE CARDS
   ========================================================= */

.ely-lcars-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}


.ely-lcars-card {
    position: relative;

    min-height: 175px;

    padding: 23px 25px 25px;

    background:
        linear-gradient(
            145deg,
            rgba(8, 24, 38, .96),
            rgba(3, 13, 23, .98)
        );

    border: 1px solid rgba(117, 160, 185, .48);
    border-radius: 15px;

    overflow: hidden;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}


.ely-lcars-card:hover {
    transform: translateY(-2px);

    border-color: rgba(50, 211, 255, .75);

    background:
        linear-gradient(
            145deg,
            rgba(11, 34, 51, .98),
            rgba(4, 16, 27, .98)
        );
}


/* Small LCARS decorative line */
.ely-lcars-card::after {
    content: "";

    position: absolute;

    top: 34px;
    right: 22px;

    width: 50px;
    height: 4px;

    background:
        linear-gradient(
            to right,
            #438bc0 0 65%,
            transparent 65%
        );

    border-radius: 4px;
}


.ely-lcars-card-code {
    margin-bottom: 4px;

    color: #6b8798;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .1em;

    text-transform: uppercase;
}


.ely-lcars-card h2 {
    margin: 0 0 15px;

    color: #32d3ff;

    font-size: 26px;
    letter-spacing: .025em;
}


.ely-lcars-card a {
    display: block;

    width: fit-content;

    margin: 7px 0;

    color: #edf7ff !important;

    font-size: 14px;

    text-decoration: none !important;

    transition:
        color .15s ease,
        padding-left .15s ease;
}


.ely-lcars-card a::before {
    content: "›";

    margin-right: 7px;

    color: #f3b52e;

    opacity: 0;
}


.ely-lcars-card a:hover {
    padding-left: 4px;

    color: #32d3ff !important;
}


.ely-lcars-card a:hover::before {
    opacity: 1;
}


/* Give each database a subtle LCARS accent */

.ely-lcars-card:nth-child(1) {
    border-top-color: #32d3ff;
}

.ely-lcars-card:nth-child(2) {
    border-top-color: #69c77a;
}

.ely-lcars-card:nth-child(3) {
    border-top-color: #7e8fc8;
}

.ely-lcars-card:nth-child(4) {
    border-top-color: #f3b52e;
}

.ely-lcars-card:nth-child(5) {
    border-top-color: #8c83b8;
}

.ely-lcars-card:nth-child(6) {
    border-top-color: #438bc0;
}


/* =========================================================
   LCARS BOTTOM STATUS BAR
   ========================================================= */

.ely-lcars-bottom {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    margin-top: 18px;
    padding: 13px 28px;

    background: #061421;

    border: 1px solid rgba(50, 211, 255, .35);
    border-radius: 20px;

    overflow: hidden;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .08em;
    text-transform: uppercase;
}


.ely-lcars-bottom::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 18px;

    background: #438bc0;
}


.ely-lcars-bottom::after {
    content: "";

    position: absolute;

    right: 0;
    top: 0;
    bottom: 0;

    width: 18px;

    background: #d99b18;
}


.ely-lcars-bottom div:nth-child(1) {
    color: #32d3ff;
}


.ely-lcars-bottom div:nth-child(2) {
    color: #69c77a;

    text-align: center;
}


.ely-lcars-bottom div:nth-child(3) {
    color: #59cdec;

    text-align: right;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {

    .ely-lcars-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 760px) {

    .ely-lcars-hero {
        grid-template-columns: 1fr;

        padding: 24px 20px;
    }


    .ely-lcars-hero-status {
        padding: 18px 0 0;

        border-left: 0;
        border-top: 1px solid rgba(50, 211, 255, .22);
    }


    .ely-lcars-grid {
        grid-template-columns: 1fr;
    }


    .ely-lcars-search form {
        flex-direction: column;
    }


    .ely-lcars-search input[type="text"] {
        border-right: 1px solid #c88913 !important;

        border-radius: 8px !important;
    }


    .ely-lcars-search button {
        margin-top: 7px;
        padding: 12px;

        border-radius: 8px;
    }


    .ely-lcars-bottom {
        grid-template-columns: 1fr;

        gap: 6px;

        text-align: center;
    }


    .ely-lcars-bottom div:nth-child(2),
    .ely-lcars-bottom div:nth-child(3) {
        text-align: center;
    }

}
/* =========================================================
   LCARS HOME — USE FULL WIDTH
   Hide NOVA's right wiki navigation on dashboard only
   ========================================================= */

.ely-lcars-home ~ .nav-sub,
main:has(.ely-lcars-home) > .nav-sub {
    display: none !important;
}

/* Let the LCARS dashboard stretch across the available area */
main:has(.ely-lcars-home) .content {
    width: 100% !important;
    max-width: none !important;
}

main:has(.ely-lcars-home) {
    grid-template-columns: 1fr !important;
}

main:has(.ely-lcars-home) .ely-lcars-home {
    max-width: 100%;
}
/* =========================================================
   LCARS ADMIN STRIP
   ========================================================= */

.ely-lcars-admin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    margin-top: 18px;
    padding: 12px 18px;

    background: rgba(6, 20, 33, .92);

    border: 1px solid rgba(50, 211, 255, .25);
    border-radius: 12px;
}

.ely-lcars-admin-label {
    margin-right: 8px;

    color: #69c77a;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .08em;
}

.ely-lcars-admin a {
    display: inline-block;

    padding: 7px 12px;

    color: #32d3ff !important;

    border: 1px solid rgba(50, 211, 255, .28);
    border-radius: 6px;

    text-decoration: none !important;
}

.ely-lcars-admin a:hover {
    color: #f3b52e !important;

    border-color: #f3b52e;
}
/* =========================================================
   ELYSIUM 2400 — WIKI ARTICLE CONTENT
   Removes old white NOVA article background
   ========================================================= */

/* Main article/tab container */
.content #tabs {
    background: transparent !important;
    border: 0 !important;
    color: #edf7ff !important;
}


/* Individual wiki article panels */
.content #tabs .ui-tabs-panel {
    background: #081724 !important;
    color: #edf7ff !important;

    border: 1px solid rgba(50, 211, 255, .18) !important;
    border-radius: 8px !important;

    padding: 16px !important;
}


/* Actual wiki prose */
.content #tabs .prose {
    background: transparent !important;
    color: #dcecf5 !important;
}


/* General text inside wiki articles */
.content #tabs p,
.content #tabs li,
.content #tabs div,
.content #tabs span,
.content #tabs td,
.content #tabs th {
    color: #dcecf5;
}


/* Created by / metadata line */
.content #tabs .fontSmall.gray {
    color: #7f9bad !important;
}


/* Links */
.content #tabs a {
    color: #32d3ff !important;
}

.content #tabs a:hover {
    color: #f3b52e !important;
}


/* Article headings */
.content #tabs h1,
.content #tabs h2,
.content #tabs h3,
.content #tabs h4,
.content #tabs h5,
.content #tabs h6 {
    color: #32d3ff !important;
    border-color: rgba(50, 211, 255, .20) !important;
}


/* Keep large wiki images clean and responsive */
.content #tabs img {
    max-width: 100% !important;
    height: auto !important;
}


/* Tables inside wiki articles */
.content #tabs table {
    background: #0a1b29 !important;
    color: #edf7ff !important;
    border-color: rgba(50, 211, 255, .18) !important;
}

.content #tabs table td,
.content #tabs table th {
    background: transparent !important;
    color: #edf7ff !important;
    border-color: rgba(50, 211, 255, .16) !important;
}


/* Alternating table rows */
.content #tabs table tr:nth-child(even) {
    background: #102536 !important;
}

.content #tabs table tr:nth-child(odd) {
    background: #0b1a29 !important;
}


/* Bottom information area */
.content #tabs .info-full {
    background: transparent !important;
    color: #8ca6b5 !important;
    border-color: rgba(50, 211, 255, .16) !important;
}
/* More breathing room after large wiki images */
.content #tabs .prose img {
    margin-bottom: 18px !important;
}
/* =========================================================
   ELYSIUM 2400 — WIKI SIDE NAVIGATION
   LCARS-style control panel
   ========================================================= */

/* Main Wiki navigation box */
body:not(:has(.ely-lcars-home)) .nav-sub {
    background:
        linear-gradient(
            145deg,
            rgba(8, 24, 38, .98),
            rgba(3, 13, 23, .98)
        ) !important;

    border: 1px solid rgba(50, 211, 255, .35) !important;
    border-top: 3px solid #32d3ff !important;
    border-radius: 10px !important;

    padding: 14px 12px !important;
}


/* Wiki navigation links */
body:not(:has(.ely-lcars-home)) .nav-sub a {
    display: block !important;

    padding: 7px 10px !important;

    color: #dcecf5 !important;

    text-decoration: none !important;

    border-radius: 5px;

    transition:
        color .15s ease,
        background .15s ease,
        padding-left .15s ease;
}


body:not(:has(.ely-lcars-home)) .nav-sub a:hover {
    padding-left: 14px !important;

    color: #32d3ff !important;

    background: rgba(50, 211, 255, .07) !important;
}


/* First/main link gets LCARS cyan */
body:not(:has(.ely-lcars-home)) .nav-sub li:first-child a {
    color: #32d3ff !important;
    font-weight: 700;
}


/* Separate administration controls visually */
body:not(:has(.ely-lcars-home)) .nav-sub li:nth-last-child(3) {
    margin-top: 16px !important;
    padding-top: 12px !important;

    border-top: 1px solid rgba(50, 211, 255, .18);
}


/* Admin links */
body:not(:has(.ely-lcars-home)) .nav-sub li:nth-last-child(-n+3) a {
    color: #69c77a !important;
}


body:not(:has(.ely-lcars-home)) .nav-sub li:nth-last-child(-n+3) a:hover {
    color: #f3b52e !important;
}
/* Keep all Wiki management links consistent */
body:not(:has(.ely-lcars-home)) .nav-sub a[href*="manage"],
body:not(:has(.ely-lcars-home)) .nav-sub a[href*="create"] {
    color: #69c77a !important;
}

body:not(:has(.ely-lcars-home)) .nav-sub a[href*="manage"]:hover,
body:not(:has(.ely-lcars-home)) .nav-sub a[href*="create"]:hover {
    color: #f3b52e !important;
}
/* =========================================================
   ELYSIUM 2400 — LCARS DATABASE RECORD HEADER
   Individual Wiki articles
   ========================================================= */

/* Article page title */
body:not(:has(.ely-lcars-home)) .content > h1.page-head {
    position: relative;

    margin-bottom: 18px !important;
    padding: 32px 24px 18px 28px !important;

    background:
        linear-gradient(
            135deg,
            rgba(8, 26, 41, .98),
            rgba(3, 13, 23, .98)
        );

    color: #edf7ff !important;

    border: 1px solid rgba(50, 211, 255, .35) !important;
    border-left: 8px solid #438bc0 !important;
    border-bottom: 1px solid rgba(50, 211, 255, .35) !important;

    border-radius: 10px !important;

    font-size: 30px !important;
    line-height: 1.15 !important;
}


/* LCARS label above the article title */
body:not(:has(.ely-lcars-home)) .content > h1.page-head::before {
    content: "LCARS DATABASE RECORD";

    display: block;

    margin-bottom: 7px;

    color: #f3b52e;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .14em;

    text-transform: uppercase;
}


/* Database identity underneath title */
body:not(:has(.ely-lcars-home)) .content > h1.page-head::after {
    content: "USS ELYSIUM • NCC-89000 • STARFLEET DATABASE ACCESS";

    display: block;

    margin-top: 9px;

    color: #69c77a;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .1em;

    text-transform: uppercase;
}
/* =========================================================
   ELYSIUM 2400 — WIKI ARTICLE CONTROLS
   Add Comment / Edit buttons
   ========================================================= */

body:not(:has(.ely-lcars-home)) .content .wiki-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin: 10px 0 14px;
}

body:not(:has(.ely-lcars-home)) .content .wiki-subnav a {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    background: rgba(6, 20, 33, .95);

    color: #32d3ff !important;

    border: 1px solid rgba(50, 211, 255, .28);
    border-radius: 6px;

    text-decoration: none !important;

    font-size: 11px;
    font-weight: 700;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease;
}

body:not(:has(.ely-lcars-home)) .content .wiki-subnav a:hover {
    background: rgba(50, 211, 255, .08);

    color: #f3b52e !important;

    border-color: #f3b52e;
}
/* =========================================================
   ELYSIUM 2400 — RECORD INFORMATION
   Wiki article metadata
   ========================================================= */

body:not(:has(.ely-lcars-home)) .content #tabs .fontSmall.gray.bold {
    position: relative;

    display: block;

    margin: 0 0 16px !important;
    padding: 26px 14px 10px !important;

    background: rgba(10, 29, 44, .92) !important;

    color: #8ca6b5 !important;

    border-left: 3px solid #69c77a !important;
    border-bottom: 1px solid rgba(50, 211, 255, .15) !important;

    font-size: 10px !important;
    line-height: 1.4 !important;
}


/* RECORD INFORMATION label */
body:not(:has(.ely-lcars-home)) .content #tabs .fontSmall.gray.bold::before {
    content: "RECORD INFORMATION";

    position: absolute;

    top: 7px;
    left: 14px;

    color: #69c77a !important;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: .12em;

    text-transform: uppercase;
}


/* Keep author link prominent */
body:not(:has(.ely-lcars-home)) .content #tabs .fontSmall.gray.bold a {
    color: #32d3ff !important;
    font-weight: 700;
}

body:not(:has(.ely-lcars-home)) .content #tabs .fontSmall.gray.bold a:hover {
    color: #f3b52e !important;
}
body:not(:has(.ely-lcars-home)) .content #tabs .fontSmall.gray.bold {
    padding-bottom: 12px !important;
}
/* =========================================================
   ELYSIUM 2400 — WIKI MANAGEMENT TABLES
   Categories / management screens
   ========================================================= */

/* Add Wiki Category / similar management actions */
body:not(:has(.ely-lcars-home)) .content > p > a {
    display: inline-flex;
    align-items: center;

    margin: 6px 0 14px;
    padding: 7px 12px;

    background: rgba(6, 20, 33, .95);

    color: #32d3ff !important;

    border: 1px solid rgba(50, 211, 255, .28);
    border-radius: 6px;

    text-decoration: none !important;

    font-size: 11px;
    font-weight: 700;
}

body:not(:has(.ely-lcars-home)) .content > p > a:hover {
    color: #f3b52e !important;

    border-color: #f3b52e;

    background: rgba(50, 211, 255, .07);
}


/* Management tables */
body:not(:has(.ely-lcars-home)) .content table {
    width: 100% !important;

    margin-top: 10px;

    background: rgba(5, 20, 32, .95) !important;

    border: 1px solid rgba(50, 211, 255, .22) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;

    border-radius: 8px;
    overflow: hidden;
}


/* Table heading */
body:not(:has(.ely-lcars-home)) .content table th {
    padding: 10px 12px !important;

    background: #102c40 !important;

    color: #32d3ff !important;

    border-bottom: 1px solid rgba(50, 211, 255, .28) !important;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .08em;
    text-transform: uppercase;
}


/* Table cells */
body:not(:has(.ely-lcars-home)) .content table td {
    padding: 10px 12px !important;

    background: #081724 !important;

    color: #dcecf5 !important;

    border-bottom: 1px solid rgba(50, 211, 255, .10) !important;
}


/* Alternate records */
body:not(:has(.ely-lcars-home)) .content table tr:nth-child(even) td {
    background: #0c2030 !important;
}


/* Row hover */
body:not(:has(.ely-lcars-home)) .content table tbody tr:hover td {
    background: #102b3d !important;
}


/* Links inside management tables */
body:not(:has(.ely-lcars-home)) .content table a {
    color: #32d3ff !important;
    text-decoration: none !important;
}

body:not(:has(.ely-lcars-home)) .content table a:hover {
    color: #f3b52e !important;
}