/* Theme name: eis-stellar  */
/* Primary palette: Purples with neon accents
   Accent greens supplied: B2FF00 (astro green), A0E401 (dark astro green)
   Core purple: #4c2775
*/

/****************************
 * THEME VARIABLES (scoped) *
 ****************************/
:root[data-theme="eis-stellar"] {
    --stellar-plum: #4c2775;
    --stellar-violet: #6a36a6;
    --stellar-amethyst: #8b5ccf;
    --stellar-lavender: #d9ccf3;
    --stellar-lavender-2: #efe8fb;
    --astro-green: #B2FF00;
    --astro-green-dark: #A0E401;
    --stellar-ink: #1b102b;
    --stellar-cloud: #cfc7e6;
    --stellar-silver: #bfb7d8;
    --white: #ffffff;
    --lavender-rgb: 217, 204, 243;
    --lavender2-rgb: 239, 232, 251;
    --plum-rgb: 76, 39, 117;
    --color-text: var(--stellar-ink);
    --color-background: var(--stellar-lavender-2);
    --color-surface: var(--stellar-lavender);
    --color-primary: var(--stellar-plum);
    --color-secondary: var(--stellar-amethyst);
    --color-accent: var(--astro-green);
    --color-border: var(--stellar-cloud);
    --color-muted-text: var(--stellar-silver);
    /* single source of truth for fixed navbar height */
    --nav-h: 10px;
}

/********************************
 * TYPOGRAPHY & GLOBAL SCAFFOLD *
 ********************************/
html[data-theme="eis-stellar"] {
    font-size: 14px;
}

@media (min-width: 768px) {
    html[data-theme="eis-stellar"] {
        font-size: 16px;
    }
}

.eis-stellar {
    position: relative;
    min-height: 100%;
    background: radial-gradient( circle at 20% -10%, rgba(255,255,255,1) 0%, rgba(var(--lavender2-rgb), .25) 28%, rgba(var(--lavender-rgb), .12) 52%, rgba(var(--plum-rgb), .06) 78%, rgba(255,255,255,1) 100% ) fixed no-repeat center;
    color: var(--color-text);
}

    .eis-stellar main {
        min-height: 80vh;
    }

/**********************
 * BRANDING ACCENTS   *
 **********************/
.app-name {
    color: var(--stellar-cloud);
    font-weight: 300;
}

.app-name-alt {
    color: var(--stellar-amethyst);
    font-weight: 300;
}

.role-badge {
    display: inline-block;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    background: #dfdafb;
    color: #6c53a0;
    padding: 0.35em 0.6em;
    border-radius: 0.5rem;
}

/**********************
 * FOCUS RING & FORMS *
 **********************/
.eis-stellar .btn:focus,
.eis-stellar .btn:active:focus,
.eis-stellar .btn-link.nav-link:focus,
.eis-stellar .form-control:focus,
.eis-stellar .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--white), 0 0 0 0.25rem var(--stellar-amethyst);
}

/***********
 * BUTTONS *
 ***********/
.eis-stellar .btn-outline {
    display: inline-block;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border: 2px solid currentColor;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
}

.eis-stellar .btn-sm {
    font-size: .8rem;
    padding: .2rem .75rem;
}

.eis-stellar .btn-pill {
    border-radius: 999rem;
}

.eis-stellar .btn-outline-primary {
    color: var(--color-primary);
}

    .eis-stellar .btn-outline-primary:hover {
        background: var(--color-primary);
        color: var(--white);
    }

.eis-stellar .btn-outline-secondary {
    color: var(--color-secondary);
}

    .eis-stellar .btn-outline-secondary:hover {
        background: var(--color-secondary);
        color: var(--white);
    }

.eis-stellar .btn-outline-accent {
    color: var(--color-accent);
}

    .eis-stellar .btn-outline-accent:hover {
        background: var(--color-accent);
        color: #172012;
    }

/***********
 * LAYOUT  *
 ***********/
.eis-stellar main.container {
    padding-top: 1rem;
    min-height: 80vh;
}

/* IMPORTANT: no sidebar offset here anymore */
.eis-stellar .content {
    margin-left: 0;
    padding: 1rem 1rem 4rem;
    margin-top: var(--nav-h);
}

.eis-stellar .page-section {
    border-radius: .75rem;
    background-color: var(--color-surface);
    padding: 1.5rem 1rem 2rem;
}

/***********
 * NAVBAR  *
 ***********/
.eis-stellar .navbar-custom {
    background-color: var(--color-primary);
}

    .eis-stellar .navbar-custom .nav-link,
    .eis-stellar .navbar-custom .navbar-brand,
    .eis-stellar .navbar-custom .btn {
        color: var(--white);
    }

.eis-stellar .navbar {
    z-index: 1001;
    min-height: var(--nav-h);
}

/****************
 * TABLE STYLES *
 ****************/
.eis-stellar .stellar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    border-radius: .5rem;
    overflow: hidden;
    color: var(--color-text);
    font-family: system-ui, sans-serif;
    margin: 1rem 0;
}

    .eis-stellar .stellar-table th,
    .eis-stellar .stellar-table td {
        padding: .75rem 1rem;
    }

    .eis-stellar .stellar-table th {
        background: var(--color-primary);
        color: var(--white);
        text-align: left;
        font-weight: 600;
    }

    .eis-stellar .stellar-table tr:nth-child(odd) {
        background: var(--white);
    }

    .eis-stellar .stellar-table tr:nth-child(even) {
        background: rgba(var(--lavender-rgb), .4);
    }

    .eis-stellar .stellar-table tbody tr:hover {
        background: rgba(var(--lavender-rgb), .3);
    }

    .eis-stellar .stellar-table caption {
        caption-side: bottom;
        padding: .5rem;
        font-size: .85rem;
        color: var(--color-muted-text);
    }

/*********
 * FOOTER *
 *********/
.eis-stellar footer {
    position: relative;
    bottom: 0;
    width: 100%;
    z-index: 1 !important;
}

/************************
 * UTILITIES (optional) *
 ************************/
.eis-stellar .text-accent {
    color: var(--color-accent) !important;
}

.eis-stellar .text-accent-dark {
    color: var(--astro-green-dark) !important;
}

.eis-stellar .border-primary {
    border-color: var(--color-primary) !important;
}

.eis-stellar .border-secondary {
    border-color: var(--color-secondary) !important;
}

.eis-stellar .border-accent {
    border-color: var(--color-accent) !important;
}

.eis-stellar .bg-primary {
    background-color: var(--color-primary) !important;
    color: var(--white);
}

.eis-stellar .bg-secondary {
    background-color: var(--color-secondary) !important;
    color: var(--white);
}

.eis-stellar .bg-surface {
    background-color: var(--color-surface) !important;
}

.eis-stellar .bg-accent {
    background-color: var(--color-accent) !important;
    color: #0d1200;
}

/* General EIS form information copy */
.eis-form-copy {
    max-width: 1180px;
    color: #160824;
    font-size: 1.05rem;
    line-height: 1.7;
}

    .eis-form-copy p {
        margin-bottom: 1rem;
    }

.eis-form-intro {
    max-width: 980px;
    margin-bottom: 2rem;
    font-size: 1.08rem;
}

.eis-form-section {
    margin: 2rem 0;
}

.eis-form-section-title {
    margin-bottom: 1rem;
    color: #4b126f;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

    .eis-form-section-title.is-uppercase {
        text-transform: uppercase;
        letter-spacing: 0.035em;
    }

.eis-form-subheading {
    margin-top: 1.25rem;
    margin-bottom: 0.45rem;
    color: #2f0f48;
    font-size: 1rem;
    font-weight: 800;
}

.eis-form-copy ol,
.eis-form-copy ul {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.eis-form-copy li {
    margin-bottom: 0.45rem;
}

.eis-form-copy strong {
    color: #2f0f48;
}

.eis-form-copy .pi-btn {
    margin-top: 1rem;
}

/* Personal Effects item cards */
.pe-items-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pe-item-card {
    background: #fff;
    border: 1px solid #e7ddf3;
    border-radius: 20px;
    padding: 1.35rem;
    box-shadow: 0 8px 24px rgba(45, 18, 79, 0.05);
}

.pe-item-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #efe7f8;
}

.pe-item-card-title {
    margin: 0;
    color: #2d124f;
    font-size: 1.2rem;
    font-weight: 800;
}

.pe-item-card-subtitle {
    margin-top: 0.25rem;
    color: #6b6077;
    font-size: 0.95rem;
}

.pe-item-section {
    margin-top: 1.25rem;
}

    .pe-item-section:first-of-type {
        margin-top: 0;
    }

.pe-item-section-title {
    margin-bottom: 0.75rem;
    color: #5b2485;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.pe-add-row {
    display: flex;
    justify-content: center;
}

.pe-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 190px;
    padding: 0.95rem 1.25rem;
    border: 2px dashed #c8acd9;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: #5b2485;
    font-weight: 800;
    transition: all 0.2s ease;
}

    .pe-add-btn:hover,
    .pe-add-btn:focus {
        background: #f7f0fb;
        border-color: #5b2485;
        color: #421867;
    }

.pe-add-btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #c8acd9;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
}

.pe-add-btn-text {
    line-height: 1;
}

/* Review output */
.pe-review-table th {
    color: #2d124f;
    font-weight: 800;
}

.pe-review-items-table {
    background: #fff;
    border-color: #e7ddf3;
}

    .pe-review-items-table thead th {
        background: #c8acd9;
        color: #2d124f;
        border-color: #b998d0;
        font-weight: 800;
        vertical-align: middle;
    }

    .pe-review-items-table td {
        vertical-align: top;
    }

.pe-review-signature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 420px;
    padding: 0.75rem;
    border: 1px solid #e5d9ee;
    border-radius: 14px;
    background: #fff;
}

    .pe-review-signature img {
        display: block;
        max-width: 100%;
        max-height: 160px;
        object-fit: contain;
    }

@media (max-width: 767.98px) {
    .pe-item-card {
        padding: 1rem;
    }

    .pe-item-card-header {
        align-items: flex-start;
    }

    .pe-add-btn {
        width: 100%;
    }
}

/* Reusable EIS data/admin layout */
.eis-data-page {
    max-width: 1320px;
}

/* Stat cards */
.eis-stat-card {
    height: 100%;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #eadff4;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(45, 18, 79, 0.045);
}

.eis-stat-label {
    color: #6b6077;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.eis-stat-value {
    color: #2d124f;
    font-size: 1.8rem;
    font-weight: 850;
    line-height: 1.1;
}

.eis-stat-value-small {
    font-size: 1.15rem;
}

/* Data panel */
.eis-data-panel {
    background: #fff;
    border: 1px solid #eadff4;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(45, 18, 79, 0.055);
    overflow: hidden;
}

.eis-data-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    background: linear-gradient(180deg, rgba(78, 29, 118, 0.06), rgba(78, 29, 118, 0));
    border-bottom: 1px solid #eadff4;
}

/* Data table */
.eis-data-table {
    color: #21142f;
}

    .eis-data-table thead th {
        padding: 1rem 1.1rem;
        background: #f6f1fb;
        color: #3a145a;
        border-bottom: 1px solid #e6d9f1;
        font-weight: 800;
        white-space: nowrap;
    }

    .eis-data-table tbody td {
        padding: 1rem 1.1rem;
        border-top: 1px solid #f0e8f7;
        vertical-align: middle;
    }

    .eis-data-table tbody tr:hover td {
        background: #fbf8fe;
    }

/* Data typography */
.eis-data-strong {
    color: #21142f;
    font-weight: 800;
}

.eis-data-link {
    color: #4e1d76;
    font-weight: 600;
    text-decoration: none;
}

    .eis-data-link:hover {
        color: #3a145a;
        text-decoration: underline;
    }

.eis-data-date {
    display: block;
    color: #21142f;
    font-weight: 700;
    white-space: nowrap;
}

.eis-data-time {
    display: block;
    color: #6b6077;
    font-size: 0.86rem;
}

/* Reusable badges */
.eis-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

    .eis-status-badge.is-purple {
        background: rgba(78, 29, 118, 0.09);
        color: #4e1d76;
        border: 1px solid rgba(78, 29, 118, 0.18);
    }

    .eis-status-badge.is-violet {
        background: rgba(139, 92, 207, 0.11);
        color: #4c2775;
        border: 1px solid rgba(139, 92, 207, 0.2);
    }

    .eis-status-badge.is-green {
        background: rgba(25, 135, 84, 0.10);
        color: #146c43;
        border: 1px solid rgba(25, 135, 84, 0.22);
    }

    .eis-status-badge.is-red {
        background: rgba(220, 53, 69, 0.09);
        color: #b42318;
        border: 1px solid rgba(220, 53, 69, 0.22);
    }

    .eis-status-badge.is-grey {
        background: #f1f3f5;
        color: #495057;
        border: 1px solid #dee2e6;
    }

/* Actions */
.eis-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.eis-link-danger {
    color: #b42318;
}

    .eis-link-danger:hover {
        color: #8f1c13;
    }

/* Small PI button helper */
.pi-btn-sm {
    padding: 0.42rem 0.65rem;
    border-radius: 0.65rem;
    font-size: 0.86rem;
}

/* Empty state */
.eis-empty-state {
    max-width: 760px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
    background: #fff;
    border: 1px solid #eadff4;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(45, 18, 79, 0.055);
}

.eis-empty-state-icon {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 1rem;
    color: #4e1d76;
    background: rgba(78, 29, 118, 0.08);
    border: 1px solid rgba(78, 29, 118, 0.18);
    border-radius: 16px;
    font-size: 1.8rem;
}

/* ============================================================
   EIS FORMS LAYOUT
   ============================================================ */

.eis-forms-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


    /* ============================================================
   HEADER
   ============================================================ */

    .eis-forms-page .pi-header {
        flex: 0 0 auto;
    }


.eis-forms-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-decoration: none;
}


.eis-forms-logo {
    width: 82px;
    height: auto;
    display: block;
}


.eis-forms-header-copy {
    min-width: 0;
}


.eis-forms-organisation {
    margin-bottom: 0.15rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.015em;
}


.eis-forms-header-copy .pi-hero-title {
    color: #fff;
    font-weight: 800;
}


.eis-forms-header-copy .pi-hero-subtitle {
    color: rgba(255, 255, 255, 0.88);
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */

.eis-forms-main {
    flex: 1 0 auto;
    width: 100%;
}


/* ============================================================
   FOOTER
   ============================================================ */

.eis-forms-footer {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 3rem;
    padding: 2.1rem 1rem 1.8rem;
    background: #321050;
    color: #fff;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}


.eis-forms-footer-tagline {
    margin-bottom: 0.4rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}


.eis-forms-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.55rem;
    font-size: 0.9rem;
    font-weight: 700;
}


    .eis-forms-footer-links a,
    .eis-forms-footer-credit a {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: 2px;
    }


        .eis-forms-footer-links a:hover,
        .eis-forms-footer-links a:focus,
        .eis-forms-footer-credit a:hover,
        .eis-forms-footer-credit a:focus {
            color: #e8d8f5;
        }


.eis-forms-footer-separator {
    color: rgba(255, 255, 255, 0.68);
}


.eis-forms-footer-copyright {
    margin-bottom: 0.45rem;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}


.eis-forms-footer-legal {
    max-width: 960px;
    margin: 0 auto 0.5rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    line-height: 1.5;
}


.eis-forms-footer-credit {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    line-height: 1.5;
}


    .eis-forms-footer-credit a {
        font-weight: 700;
    }


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767.98px) {

    .eis-forms-page .pi-header .container {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }


    .eis-forms-logo {
        width: 64px;
    }


    .eis-forms-organisation {
        font-size: 0.75rem;
    }


    .eis-forms-header-copy .pi-hero-title {
        font-size: 1.3rem;
    }


    .eis-forms-header-copy .pi-hero-subtitle {
        font-size: 0.88rem;
    }


    .eis-forms-footer {
        margin-top: 2rem;
        padding: 1.75rem 1rem 1.5rem;
    }


    .eis-forms-footer-tagline {
        font-size: 0.95rem;
    }


    .eis-forms-footer-links {
        margin-bottom: 1.25rem;
        font-size: 0.86rem;
    }


    .eis-forms-footer-legal,
    .eis-forms-footer-credit {
        font-size: 0.78rem;
    }
}

/* Responsive data tables */
@media (max-width: 991.98px) {
    .eis-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .eis-data-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .eis-stat-card {
        padding: 1rem;
    }

    .eis-data-table thead {
        display: none;
    }

    .eis-data-table,
    .eis-data-table tbody,
    .eis-data-table tr,
    .eis-data-table td {
        display: block;
        width: 100%;
    }

        .eis-data-table tbody tr {
            padding: 1rem;
            border-top: 1px solid #eadff4;
        }

        .eis-data-table tbody td {
            padding: 0.45rem 0;
            border: 0;
        }

            .eis-data-table tbody td::before {
                content: attr(data-label);
                display: block;
                margin-bottom: 0.15rem;
                color: #6b6077;
                font-size: 0.78rem;
                font-weight: 800;
                text-transform: uppercase;
                letter-spacing: 0.04em;
            }
}