/*====================
    GLOBAL
=====================*/

:root {
    color-scheme: dark;
    --bg1: #427080;
    --bg2: #14343f;
    --bg3: #04232e;
    --text-main: #e5edf0;
    --white50: #ffffffa2;
    --accent: #2a6df4;
    --accent-hover: #1f54c2;
    --SCOTgreen: #3ecf8e;
    --SCOTblue: #93a4c0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif !important;
    min-height: 100vh;
    background: radial-gradient(circle at top left,
        #427080 0%,
        #224653 30%,
        #102c36 60%,
        #02141a 100%
    );
    color: var(--text-main);
}


/*====================
    LAYOUT
=====================*/

.container {
    width: min(100% - 40px, 1280px);
    margin-inline: auto;
    padding-bottom: 40px;
}

.site-header {
    position: relative;
}

/*******************************
    STATUS BAR (SD-Card Style)
*******************************/

.status-msg {
    width: min(100%, 1280px);
    margin: 15px auto 0;
    padding: 12px 18px;
    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #151d2a 0%,
        #111827 40%,
        #182937 100%
    );

    color: var(--SCOTgreen) !important;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.45;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.4);

    position: relative;
}

/* Optional: Soft glossy top edge */
.status-msg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.06),
        transparent
    );
    pointer-events: none;
    border-radius: inherit;
}

/* Status bar links */
.status-msg a {
    color: var(--text-main);
    text-decoration: underline;
}

.status-msg a:hover {
    text-decoration: none;
}

/* Mobile layout */
@media (max-width: 600px) {
    .status-msg {
        font-size: 0.85rem;
        padding: 12px;
    }
}

/* =====================
SCOT back-navigation link
========================= */

.sd-back-link {
    margin: 1.5rem 0 1.2rem;
}

.sd-link-back {
    color: #ffdb4d;  /* SCOT yellow */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease, transform 0.15s ease;
}

.sd-link-back:hover {
    color: #ffe57a;  /* lighter SCOT yellow */
    transform: translateX(-2px);
}


/*====================
    SD CARD LAYOUT
=====================*/

.sd-cards {
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 1.5rem 0 2.5rem;
}

.sd-shell {
    max-width: 1200px;
    margin: 0 auto;
}

.sd-header {
    padding: 0.5rem 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.sd-title {
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #ffffffbd;
}

.sd-subtitle {
    font-size: 0.95rem;
    /*color: #93a4c0;*/
    color: #7799d1;
}

/* Two-column grid: main + side */
.sd-grid {
    display: grid;
    grid-template-columns: 2.1fr 1.2fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .sd-grid {
        grid-template-columns: 1fr;
    }
}

/* Base card */
.sd-card {
    background: linear-gradient(
        135deg,
        #151d2a 0%,
        #111827 40%,
        #182937 100%
    );
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    border: 1px solid #232c3b;
    padding: 1.25rem 1.5rem;
    color: #f7f9fc;
}
/* Any sd-card followed by another has a margin-top */
.sd-card + .sd-card {
    margin-top: 1.2rem;
}


.sd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.sd-card-title {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: #93a4c0;
}

.sd-card-meta {
    font-size: 0.8rem;
    color: #7799d1;
    text-align: end;
}

/* Welcome-style hero card */
.sd-welcome-card {
    position: relative;
    overflow: hidden;
}

.sd-welcome-highlight {
    font-size: 0.9rem;
    color: #3ecf8e;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.sd-welcome-main {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    align-items: flex-start;   /* FIXED */
    flex-wrap: wrap;
}

.sd-welcome-main-text {
    max-width: 480px;
}

.sd-welcome-main-text h2 {
    margin: 0 0 0.4rem;
    font-size: 1.4rem;
    font-weight: 400;
}

.sd-welcome-main-text p {
    margin: 0;
    font-size: 0.95rem;
    color: #93a4c0;
}

.sd-welcome-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sd-pill {
    background: rgba(3, 255, 157, 0.06);
    border: 1px solid rgba(62, 207, 142, 0.15);
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #93a4c0;
    white-space: nowrap;
}

.sd-pill strong {
    color: #3ecf8e;
    margin-right: 0.2rem;
}

/* Wrapper to keep spacing consistent */
.sd-action-wrap {
    margin-top: 1.5rem;
}

/*========================
        SD-BUTTON
=========================*/
.sd-btn-wrap {
    flex-basis: 100%;
    margin-top: 1.5rem;
}

/* Base button */
.sd-btn {
    border-radius: 999px;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;

    text-decoration: none;
    color: inherit;

    transition: 
        background 0.18s ease-out,
        border-color 0.18s ease-out,
        box-shadow 0.18s ease-out,
        transform 0.18s ease-out;
}

/* Primary – matches the pills */
.sd-btn-primary {
    background: rgba(3, 255, 157, 0.06);
    border: 1px solid rgba(62, 207, 142, 0.18);
    color: #3ecf8e;

    /* Subtle shadow */
    box-shadow: 0 3px 8px rgba(62, 207, 142, 0.15);
}

/* Hover – gentle highlight, not overpowering */
.sd-btn-primary:hover {
    background: rgba(3, 255, 157, 0.12);   
    border-color: rgba(62, 207, 142, 0.35);  
    color: #5fffb3;         

    /* Slight lift but not dramatic */
    box-shadow: 0 4px 12px rgba(62, 207, 142, 0.25);
    transform: translateY(-1px);
}

/* btn-disclaimer for 'start-exploring'  */
.sd-btn-disclaimer {
    font-size: 0.75rem;
    color: #93a4c0;      
    margin-top: 0.6rem;
    max-width: 420px;    
    text-align: center;
    line-height: 1.4;
}

.sd-btn-disclaimer a {
    color: #3ecf8e;
    text-decoration: none;
}

.sd-btn-disclaimer a:hover {
    text-decoration: underline; 
}

/*===========================================*/

/*   CARD 2   */
.sd-feature-list {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    list-style: disc;
    color: #93a4c0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.sd-feature-list li {
    margin-bottom: 0.4rem;
}

.sd-feature-list strong {
    color: #f7f9fcb2;
    font-weight: 500;
}

/*===========================================*/

/*   CARD 3   */
.sd-card-body {
    font-size: 0.9rem;
    color: #93a4c0;
    line-height: 1.55;
}

.sd-why-matters p {
    margin-bottom: 1rem;
}

.sd-why-matters p strong {
    color: #f7f9fcb2;
    font-weight: 500;
}

.sd-why-matters p:last-child {
    margin-bottom: 0;
    
}




/*   RIGHT COLUMN  */
/*========================
    METRIC CARDS (RIGHT)
=========================*/
.sd-metric-card .sd-card-title {
    text-transform: none;
}

.sd-metric-card .sd-card-header {
    display: flex;
    flex-direction: column;     /* title above meta */
    align-items: center;        /* centre horizontally */
    justify-content: center;
    gap: 0.25rem;               /* neat spacing */
    text-align: center;
}
.sd-metric-card .sd-card-meta {
    color: #7799d1;
}
.sd-metric-body {
    margin-top: 0.5rem;
    text-align: center;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(78, 90, 120, 0.4);
}

.sd-metric-value {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #3ecf8e;
    margin-bottom: 0.2rem;
}

.sd-metric-label {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    color: #93a4c0;
}

/* Changelog-style list (right column) */
.sd-changelog-list {
    margin: 0.2rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sd-changelog-item {
    display: flex;
    gap: 0.45rem;
}

.sd-changelog-dot {
    margin-top: 0.2rem;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: #3ecf8e;
    flex-shrink: 0;
}

.sd-changelog-text {
    color: #93a4c0;
}

.sd-changelog-text strong {
    color: #f7f9fc;
}

.sd-changelog-date {
    font-size: 0.7rem;
    color: #93a4c0;
}

/* Feedback / small body text */
.sd-feedback-body {
    font-size: 0.85rem;
    color: #93a4c0;
    margin-bottom: 0.7rem;
}

/* Right column informational card */
.sd-info-body {
    font-size: 0.85rem;
    color: #93a4c0;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.sd-info-body p {
    margin-bottom: 0.9rem;
}

.sd-info-body p:last-child {
    margin-bottom: 0;
}

.sd-info-body p a {
    text-decoration: none;
    color: #3ecf8e;
}

/* Footer area under cards */
.sd-footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #93a4c0;
    border-top: 1px solid rgba(78, 90, 120, 0.35);
    padding-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.sd-footer-right {
    text-align: right;
}

@media (max-width: 600px) {
    .sd-footer-right {
        text-align: left;
    }
}

/*========================
        DASHBOARD
=========================*/

/* Search */
.sd-search-card {
    margin-top: 1rem;
}

.sd-search-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.sd-search-input-wrap {
    flex: 1;
    position: relative;
}

.sd-search-input-wrap input[type="text"] {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #232c3b;
    background: #050812;
    color: #f7f9fc;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}

.sd-search-input-wrap input[type="text"]:focus {
    border-color: #3ecf8e;
    box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.15);
}

.sd-search-icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #93a4c0;
    pointer-events: none;
}

.sd-btn {
    border-radius: 999px;
    border: none;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.sd-btn-primary {
    background: #3ecf8e;
    color: #03100a;
    box-shadow: 0 7px 18px rgba(62, 207, 142, 0.4);
}

.sd-btn-primary:hover {
    background: #2ea06b;
    box-shadow: 0 10px 26px rgba(62, 207, 142, 0.55);
    transform: translateY(-1px);
}

/* Snapshots */
.sd-snapshots-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .sd-snapshots-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .sd-snapshots-grid {
        grid-template-columns: 1fr;
    }
}

.sd-snapshot {
    background: #181f2b;
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    border: 1px solid #232c3b;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.sd-snapshot-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.sd-snapshot-name {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.sd-snapshot-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.sd-snapshot-change.up {
    color: #3ecf8e;
}

.sd-snapshot-change.down {
    color: #ff7961;
}

.sd-snapshot-price {
    font-size: 1rem;
    color: #ccae4c;
}

.sd-snapshot-sub {
    font-size: 0.75rem;
    color: #93a4c0;
}

/* Actions */
.sd-actions-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 900px) {
    .sd-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .sd-actions-grid {
        grid-template-columns: 1fr;
    }
}

.sd-action-card {
    background: radial-gradient(circle at top left, #1b2736 0, #141b26 35%, #101622 100%);
    border-radius: 16px;
    border: 1px solid #232c3b;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.7rem;
    min-height: 120px;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out, background 0.18s ease-out;
    text-decoration: none;
}

.sd-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
    border-color: rgba(62, 207, 142, 0.15);
}

.sd-action-tag {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: #93a4c0;
    padding-bottom: 5px;
}

.sd-action-title {
    font-size: 1rem;
    font-weight: 500;
    color: white;
    padding-bottom: 5px;
}

.sd-action-text {
    font-size: 0.85rem;
    color: #93a4c0;
}

.sd-action-cta {
    font-size: 0.8rem;
    color: #3ecf8e;
}

/* Recent list */
.sd-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.sd-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(147, 164, 192, 0.15);
    font-size: 0.85rem;
}

.sd-recent-item:last-child {
    border-bottom: none;
}

.sd-recent-main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sd-recent-name {
    font-weight: 500;
}

.sd-recent-name a {
    text-decoration: none;
    color: white;
}

.sd-link-muted {
    color: #c2b43c;
}
.sd-recent-meta {
    font-size: 0.78rem;
    color: #93a4c0;
}

.sd-recent-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #232c3b;
    color: #93a4c0;
    white-space: nowrap;
}

/* What's new / changelog */
.sd-changelog-list {
    margin: 0.2rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sd-changelog-item {
    display: flex;
    gap: 0.45rem;
}

.sd-changelog-dot {
    margin-top: 0.2rem;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: #3ecf8e;
    flex-shrink: 0;
}

.sd-changelog-text {
    color: #93a4c0;
}

.sd-changelog-text strong {
    color: #f7f9fc;
    font-weight: 500;
}

.sd-changelog-date {
    font-size: 0.7rem;
    color: #93a4c0;
}

/* Feedback / support */
.sd-feedback-body {
    font-size: 0.85rem;
    color: #93a4c0;
    margin-bottom: 0.7rem;
}

.sd-feedback-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #3ecf8e;
    text-decoration: none;
}

/* Logout button */
.sd-logout-wrap {
    text-align: center;
    margin-top: 2rem;
}

.sd-logout-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    border: 1px solid #232c3b;
    background: transparent;
    color: #f7f9fc;
    cursor: pointer;
    font-size: 0.9rem;
}

.sd-logout-btn:hover {
    border-color: #3ecf8e;
    color: #3ecf8e;
}

/*========================
    CONTACT FORM (SD)
=========================*/

.sd-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.sd-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sd-form-label {
    font-size: 0.85rem;
    color: #93a4c0;
}

.sd-required {
    color: #ffb347;
    font-weight: 600;
}

/* Inputs / textarea to match SD search field */

.sd-input,
.sd-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #232c3b;
    background: #050812;
    color: #f7f9fc;
    font-size: 0.9rem;
    outline: none;
    transition:
        border-color 0.18s ease-out,
        box-shadow 0.18s ease-out,
        background 0.18s ease-out;
}

.sd-input::placeholder,
.sd-textarea::placeholder {
    color: #65738c;
}

.sd-input:focus,
.sd-textarea:focus {
    border-color: #3ecf8e;
    box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.18);
}

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

/* Helpers under each field */
.help-block.with-errors {
    font-size: 0.75rem;
    color: #ff7961;
    min-height: 1em;
}

/* Notes & footer */
.sd-form-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #93a4c0;
}

.sd-form-footer {
    margin-top: 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
}

.sd-form-submit {
    margin-top: 0.3rem;
}

.sd-form-wait-note {
    font-size: 0.8rem;
    color: #93a4c0;
    max-width: 320px;
}

/* Better spacing on small screens */
@media (max-width: 600px) {
    .sd-card-body {
        padding-bottom: 0.5rem;
    }

    .sd-form-footer {
        align-items: center;
    }
}

/*===========================
  Contact result bar
===========================*/

.contact-result-bar {
    width: min(100%, 1280px);
    margin: 10px auto 0;
    padding: 12px 18px;
    border-radius: 16px;

    font-size: 0.95rem;
    text-align: center;
    line-height: 1.45;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.4);

    animation: fadeSlideIn 0.35s ease-out forwards;
}

/* SUCCESS = SCOT green palette */
.contact-success {
    background: rgba(3, 255, 157, 0.10);
    border: 1px solid rgba(62, 207, 142, 0.35);
    color: #3ecf8e;
}

/* ERROR = warm SCOT warning tone */
.contact-error {
    background: rgba(255, 121, 97, 0.12);
    border: 1px solid rgba(255, 121, 97, 0.35);
    color: #ff7961;
}

/* Animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*========================
   Login form specifics
=========================*/

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .sd-input {
    padding-right: 2.4rem; /* room for the eye icon */
}

.toggle-password {
    position: absolute;
    right: 0.7rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #3ecf8e;
    opacity: 0.85;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.toggle-password:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.toggle-password.is-active {
    color: #93a4c0;
}

.toggle-password svg {
    display: block;
}

/* Register link under button */

.sd-login-register {
    font-size: 0.85rem;
    color: #93a4c0;
}

.sd-login-register a {
    color: #3ecf8e;
    text-decoration: none;
}

.sd-login-register a:hover {
    text-decoration: underline;
}

/*========================
    DISCLAIMER
=========================*/

.sd-legal-body p {
    padding-bottom: 15px;
}

/* ======================
     SCOT TABLE PAGES
======================= */

/* Remove the default white panel that DataTables adds */
.dataTables_wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Make sure the length + search controls don't bring their own white boxes */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0.8rem 0 0.7rem;  /* top, sides, bottom – gives gap above header */
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(2, 18, 26, 0.9);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.7rem;
    color: var(--white80, #f4f7ff);
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_filter label {
    color: var(--white60, #b5c4d7);
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info {
    color: var(--white50, #9fb2c7);
    font-size: 0.75rem;
}

/* Style the "Show entries" dropdown like the rest of the theme */
.dataTables_wrapper .dataTables_length select {
    background: rgba(2, 18, 26, 0.95);
    color: var(--white80, #f4f7ff);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.2rem 1.6rem 0.2rem 0.6rem;
    font-size: 0.8rem;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Optional: wrapper label next to it */
.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--white60, #b5c4d7);
    font-size: 0.8rem;
}

/* Style the built-in clear "x" on search inputs (Chrome, Edge, Safari) */
.dataTables_wrapper .dataTables_filter input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background-color: var(--SCOTgreen);
    mask: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.41 1.41L12 13.41l4.89 4.89a1 1 0 0 0 1.41-1.41L13.41 12l4.89-4.89a1 1 0 0 0 0-1.4z'/></svg>") center / contain no-repeat;
    cursor: pointer;
}


.sd-cards-tables {
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 0 0 2.5rem;
}

.sd-section-card {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.sd-section-header {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    margin-bottom: 1rem;
}

.sd-section-title {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--white80, #f4f7ff);
}

.sd-section-subtitle {
    font-size: 0.9rem;
    color: var(--SCOTblue);
}

/* Results + currency toggle row */
.sd-metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.sd-metric-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #153647, #071924);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sd-metric-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--white50, #9fb2c7);
}

.sd-metric-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3ecf8e;
}

/* Currency toggle – quiet secondary button */
.sd-button-ghost {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: var(--white80, #f4f7ff);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.sd-button-ghost:hover {
    background: rgba(11, 40, 56, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* Resource group filters (only on the big page) */
.sd-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sd-chip-button {
    font-family: inherit;
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 29, 39, 0.9);
    color: var(--white70, #c3d1e0);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.sd-chip-button:hover {
    background: rgba(27, 76, 101, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Table card */
.sd-table-card {
    margin-bottom: 2.5rem;
}

.sd-table-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0rem;
}

/* DataTables wrapper tweaks to match theme */
.sd-table-wrapper {
    width: 100%;
    overflow-x: auto;   /* horizontal only, let page scroll handle vertical */
}

/* Core table styling */
.sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--white80, #f4f7ff);
    background: transparent;
}

/* Header cells */
.sd-table thead th {
    background: linear-gradient(180deg, #174152, #0d2330);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.6rem 0.75rem 0.8rem;  /* gentle bottom space */
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--white70, #d2deeb);
    /* no sticky for now */
}

/* Body cells */
.sd-table tbody td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Row striping */
.sd-table tbody tr:nth-child(even) {
    background: rgba(6, 26, 37, 0.7);
}

.sd-table tbody tr:nth-child(odd) {
    background: rgba(5, 20, 29, 0.7);
}

/* Hover state – ties into your .row-hover logic */
.sd-table tbody tr.row-hover:hover {
    background: rgba(41, 108, 145, 0.95);
    transform: translateY(-1px);
}

/* Main resource column width */
.sd-table .col-main-resource {
    width: 15%;
    white-space: normal;
    word-break: break-word;
}

/* DataTables built-in chrome */
.dataTables_wrapper .dataTables_paginate a {
    color: var(--white70, #c3d1e0);
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_paginate .current {
    font-weight: 600;
    text-decoration: underline;
}

/* Empty state text */
.sd-empty-text {
    font-size: 0.9rem;
    color: var(--white60, #b5c4d7);
    margin-top: 0.5rem;
}

/* =========================
   COMPANY PROFILE HEADER
========================= */

.sd-company-header-card {
    margin-bottom: 1.5rem;
}

.sd-company-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sd-company-name {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #f7f9fc;
    margin-bottom: 0.5rem;
}

/* Meta chips row under company name */
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.0rem;
}

.chip {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(7, 29, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c3d1e0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chip.accent {
    border-color: rgba(62, 207, 142, 0.5);
    color: #3ecf8e;
}

/* Back link when used inside header card (no extra top margin) */
.sd-company-header-card .sd-link-back {
    font-size: 0.8rem;
}

/* =========================
   PROJECTS & NEWS CARD
========================= */

/* PROJECTS & NEWS styling (no tabs needed) */

.sd-projects-card .sd-card-body,
.sd-news-card .sd-card-body {
    padding-top: 0.5rem;
}

/* Project list styling */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.2rem;
}

.project-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.project-bullet {
    margin-top: 0.4rem;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #3ecf8e;
    flex-shrink: 0;
}

.project-text {
    line-height: 1.5;
}

/* News block */
.news-wrap {
    margin-top: 0.2rem;
}

.news-card {
    margin-top: 0.3rem;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    background: radial-gradient(circle at top left, #182334 0, #0c151f 60%, #060b11 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.news-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #f7f9fc;
    text-decoration: none;
}

.news-title:hover {
    text-decoration: underline;
}

.news-meta {
    font-size: 0.75rem;
    color: #7799d1;
    margin-top: 0.25rem;
}

.news-summary {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #93a4c0;
    line-height: 1.5;
}

/* Empty-state text */
.empty {
    font-size: 0.85rem;
    color: #93a4c0;
    margin-top: 0.4rem;
}

/* ===========================
   LATEST PRICE METRIC CARD
=========================== */

.sd-price-body {
    text-align: center;
    padding-top: 0.4rem;
}
.sd-price-value {
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--SCOTgreen);
    letter-spacing: 0.03em;
    margin-bottom: 0.55rem;
}

.sd-price-meta {
    font-size: 0.85rem;
    color: #93a4c0;
    letter-spacing: 0.05em;
}

.sd-price-sep {
    padding: 0 0.35rem;
    opacity: 0.55;
}

/*******************************
        ADMINISTRATION
*******************************/

/*******************************
        Admin - dashboard
*******************************/

    .sd-admin-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.85rem;
      margin-top: 0.75rem;
    }
    @media (max-width: 700px) {
      .sd-admin-actions { grid-template-columns: 1fr; }
    }
    .sd-admin-link {
      text-decoration: none;
    }
    .sd-admin-tile {
      background: radial-gradient(circle at top left, #1b2736 0, #141b26 35%, #101622 100%);
      border-radius: 16px;
      border: 1px solid #232c3b;
      padding: 0.9rem 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      min-height: 110px;
      transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
    }
    .sd-admin-tile:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 32px rgba(0,0,0,0.55);
      border-color: rgba(62,207,142,0.18);
    }
    .sd-admin-tile-title {
      font-size: 0.95rem;
      font-weight: 500;
      color: #f7f9fc;
    }
    .sd-admin-tile-meta {
      font-size: 0.85rem;
      color: #93a4c0;
      line-height: 1.4;
    }
    .sd-admin-chip {
      align-self: flex-start;
      margin-top: auto;
      font-size: 0.72rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #3ecf8e;
      padding: 0.22rem 0.6rem;
      border-radius: 999px;
      border: 1px solid rgba(62,207,142,0.18);
      background: rgba(3,255,157,0.06);
    }
    .sd-admin-footer-actions {
      margin-top: 1.25rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.6rem;
      justify-content: center;
    }

/*******************************
        Admin - records_new
*******************************/
.sd-grid-equal {
  align-items: stretch;
}
.sd-grid-equal > .sd-card {
  height: 100%;
}
.sd-grid > .sd-card + .sd-card { margin-top: 0 !important; }


/* Ensure admin inputs never change background colour */
.sd-input {
  background: #050812;
}

.sd-input:focus {
  background: #050812;
}
/* --- Fix Chrome autofill forcing light backgrounds --- */
input.sd-input:-webkit-autofill,
input.sd-input:-webkit-autofill:hover,
input.sd-input:-webkit-autofill:focus,
input.sd-input:-webkit-autofill:active,
textarea.sd-textarea:-webkit-autofill,
textarea.sd-textarea:-webkit-autofill:hover,
textarea.sd-textarea:-webkit-autofill:focus,
textarea.sd-textarea:-webkit-autofill:active,
select.sd-input:-webkit-autofill,
select.sd-input:-webkit-autofill:hover,
select.sd-input:-webkit-autofill:focus,
select.sd-input:-webkit-autofill:active {
  -webkit-text-fill-color: #f7f9fc !important;
  box-shadow: 0 0 0px 1000px #050812 inset !important;
  caret-color: #f7f9fc;
  transition: background-color 9999s ease-in-out 0s;
}
.sd-input,
.sd-input:focus {
  background: #050812 !important;
  color: #f7f9fc;
}

/*******************************
        Admin - resource_new
*******************************/
    /* Two-column form rows */
    .sd-form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    }

    @media (max-width: 900px) {
    .sd-form-grid-2col {
        grid-template-columns: 1fr;
    }
    }

    /* Small page helpers (admin-only) */
    .sd-inline-2 {
      display: grid;
      grid-template-columns: 1fr 180px;
      gap: 0.75rem;
      align-items: end;
    }
    @media (max-width: 700px) {
      .sd-inline-2 { grid-template-columns: 1fr; }
    }
    /* prevent side-by-side cards getting the stacked margin-top rule */
    .sd-grid > .sd-card + .sd-card { margin-top: 0 !important; }
