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

body {
    background: #090B10;
    color: #F2F5F7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Top Bar ---------- */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:22px 40px;

    border-bottom:1px solid #232832;
}

.brand{
    display:flex;
    align-items:center;
    gap:18px;
}

.logo{
    width:56px;
    height:56px;

    border-radius:14px;

    background:#1E8FFF;

    display:flex;
    align-items:center;
    justify-content:center;

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

.brand h1{
    font-size:28px;
}

.brand p{
    color:#8D95A3;
}

.account{
    display:flex;
    gap:18px;
}

.account-card{

    background:#12161D;

    border:1px solid #242A34;

    padding:14px 18px;

    border-radius:14px;

    min-width:150px;
}

.account-card span{
    color:#8D95A3;
    font-size:13px;
}

.account-card strong{

    display:block;
    margin-top:8px;

    font-size:20px;
}

.green strong{

    color:#29D17C;
}

/* ---------- Navigation ---------- */

nav{

    display:flex;

    gap:26px;

    padding:18px 40px;

    border-bottom:1px solid #232832;
}

nav a{

    color:#BFC8D4;

    text-decoration:none;

    font-weight:600;

    transition:.25s;
}

nav a:hover{

    color:white;
}

/* ---------- Main ---------- */

main{

    padding:40px;
}

/* ---------- Heading ---------- */

.page-heading{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    margin-bottom:35px;
}

.eyebrow{

    color:#5BA6FF;

    letter-spacing:2px;

    font-size:12px;

    margin-bottom:8px;
}

.page-heading h2{

    font-size:38px;

    margin-bottom:10px;
}

.page-subtitle{

    color:#9097A4;
}

.status-pill{

    background:#13261A;

    color:#31D87F;

    padding:10px 16px;

    border-radius:999px;

    border:1px solid #245A3C;

    display:flex;

    align-items:center;

    gap:8px;
}

.status-dot{

    width:10px;
    height:10px;

    border-radius:50%;

    background:#31D87F;
}

/* ---------- Metric Cards ---------- */

.metrics-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

    margin-bottom:32px;
}

.metric-card{

    background:#12161D;

    border:1px solid #242A34;

    border-radius:16px;

    padding:24px;
}

.metric-card p{

    color:#9097A4;

    margin-bottom:10px;
}

.metric-card h3{

    font-size:34px;

    margin-bottom:8px;
}

.metric-card span{

    color:#6E7785;
}

/* ---------- Panels ---------- */

.overview-grid{

    display:grid;

    grid-template-columns:2fr 1fr;

    gap:22px;
}

.panel{

    background:#12161D;

    border:1px solid #242A34;

    border-radius:16px;

    padding:24px;
}

.panel-large{

    min-height:380px;
}

.panel-header{

    display:flex;

    justify-content:space-between;

    margin-bottom:22px;
}

.panel-label{

    color:#5BA6FF;

    font-size:11px;

    letter-spacing:2px;

    margin-bottom:8px;
}

.panel-note{

    color:#7F8896;
}

.placeholder-chart{

    height:270px;

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    border:2px dashed #303745;

    border-radius:14px;

    color:#7F8896;
}

.chart-line{

    width:220px;

    height:3px;

    background:#29D17C;

    transform:rotate(-12deg);

    margin-bottom:20px;
}

.health-row,
.config-list div{

    display:flex;

    justify-content:space-between;

    padding:12px 0;

    border-bottom:1px solid #232832;
}

.health-good{

    color:#29D17C;
}

.empty-state{

    color:#8D95A3;
}

/* ==========================================================
   WICK DROPS V2
========================================================== */

.header-status{
    display:flex;
    align-items:center;
    gap:20px;
}

.system-chips{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.system-chip{
    display:flex;
    align-items:center;
    gap:12px;

    background:#12161D;

    border:1px solid #242A34;

    border-radius:14px;

    padding:12px 16px;

    min-width:210px;
}

.chip-dot{
    width:12px;
    height:12px;

    border-radius:50%;
    background:#29D17C;

    box-shadow:0 0 12px #29D17C;
}

.system-chip small{
    color:#8D95A3;
}

.main-nav a.active{
    color:white;
    position:relative;
}

.main-nav a.active::after{

    content:"";

    position:absolute;

    left:0;
    right:0;
    bottom:-18px;

    height:3px;

    background:#3399FF;

    border-radius:10px;
}

/* ---------- Daily Briefing ---------- */

.daily-briefing{

    margin-bottom:34px;
}

.daily-briefing h2{

    font-size:40px;

    margin-bottom:10px;
}

.briefing-date{

    color:#8D95A3;

    margin-bottom:22px;
}

.confidence-row{

    display:flex;

    align-items:center;

    gap:12px;

    margin-bottom:14px;

    font-weight:600;
}

.confidence-icon{

    font-size:20px;

    color:#3399FF;
}

.confidence-badge{

    margin-left:10px;

    padding:7px 14px;

    border-radius:999px;

    font-size:13px;

    font-weight:700;
}

.confidence-building{

    background:#1B2C45;

    color:#79B7FF;

    border:1px solid #305E96;
}

.confidence-description{

    color:#8D95A3;

    max-width:600px;

    line-height:1.6;
}

/* ---------- Metric Cards ---------- */

.metric-change{

    margin-top:18px;

    font-size:14px;

    font-weight:700;
}

.metric-change small{

    color:#8D95A3;

    font-weight:500;

    margin-left:6px;
}

.positive{

    color:#29D17C;
}

/* ---------- Win Rate ---------- */

.win-rate-card{

    display:flex;

    justify-content:space-between;

    align-items:center;
}

.win-rate-ring{

    width:72px;
    height:72px;

    border-radius:50%;

    border:7px solid #29D17C;

    display:flex;

    align-items:center;

    justify-content:center;
}

.win-rate-ring-center{

    width:28px;
    height:28px;

    border-radius:50%;

    background:#090B10;
}

/* ---------- Buttons ---------- */

.panel-button{

    background:#1A212B;

    border:1px solid #2C3440;

    color:#D9E2EC;

    padding:8px 14px;

    border-radius:10px;

    cursor:pointer;

    transition:.2s;
}

.panel-button:hover{

    background:#252F3D;
}

.negative {
    color: #FF5E63;
}

.recent-trades-list {
    display: flex;
    flex-direction: column;
}

.recent-trade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 0;
    border-bottom: 1px solid #232832;
}

.recent-trade-row > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-trade-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.recent-trade-meta span {
    color: #8D95A3;
    font-size: 13px;
}

.trade-direction {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.trade-direction.long {
    color: #29D17C;
    background: rgba(41, 209, 124, 0.12);
}

.trade-direction.short {
    color: #FF7277;
    background: rgba(255, 94, 99, 0.12);
}

.health-bad {
    color: #FF5E63;
}


.config-row-stacked {
    align-items: center;
}

.config-value-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.rule-status {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.rule-status-open {
    color: #29D17C;
    background: rgba(41, 209, 124, 0.12);
    border: 1px solid rgba(41, 209, 124, 0.35);
}

.rule-status-waiting {
    color: #F4B942;
    background: rgba(244, 185, 66, 0.12);
    border: 1px solid rgba(244, 185, 66, 0.35);
}

.rule-status-closed {
    color: #FF7277;
    background: rgba(255, 114, 119, 0.12);
    border: 1px solid rgba(255, 114, 119, 0.35);
}

.rule-status-complete {
    color: #8D95A3;
    background: rgba(141, 149, 163, 0.12);
    border: 1px solid rgba(141, 149, 163, 0.30);
}

.rule-status-neutral {
    color: #8D95A3;
    background: rgba(141, 149, 163, 0.12);
    border: 1px solid rgba(141, 149, 163, 0.30);
}


.rules-panel .config-list > div {
    padding: 10px 0;
}

.rules-panel .config-row-stacked {
    gap: 12px;
}

.rules-panel .config-value-group {
    gap: 8px;
}

.rules-panel .rule-status {
    margin-left: 2px;
}


.health-good {
    color: #29D17C;
}

.health-warning {
    color: #F4B942;
}

.health-bad {
    color: #FF5E63;
}


.equity-chart-container {
    position: relative;
    width: 100%;
    height: 285px;
}


.equity-empty-state {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;
    text-align: center;
}

.equity-empty-state[hidden] {
    display: none;
}

.equity-empty-state strong {
    color: #F4F7FB;
    font-size: 17px;
}

.equity-empty-state span {
    color: #8D95A3;
    font-size: 14px;
}


/* ==========================================================
   NOTIFICATION CENTER
========================================================== */

.notification-center {
    position: relative;
    flex-shrink: 0;
}

.notification-button {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    padding: 0;

    color: #dce3ec;
    background: #12161d;

    border: 1px solid #252c36;
    border-radius: 14px;

    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.notification-button:hover {
    background: #19202a;
    border-color: #344052;
}

.notification-button:active {
    transform: scale(0.96);
}

.notification-button[aria-expanded="true"] {
    color: #5aa9ff;
    border-color: rgba(51, 153, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(51, 153, 255, 0.1);
}

.notification-icon {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 19px;
    height: 19px;

    padding: 0 5px;

    color: #ffffff;
    background: #ff5e63;

    border: 2px solid #090b10;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.notification-badge[hidden] {
    display: none;
}

.notification-panel {
    position: absolute;
    z-index: 1000;

    top: calc(100% + 14px);
    right: 0;

    width: min(380px, calc(100vw - 32px));

    color: #f4f7fb;
    background: #11161d;

    border: 1px solid #29313c;
    border-radius: 16px;

    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.02);

    overflow: hidden;
}

.notification-panel[hidden] {
    display: none;
}

.notification-panel::before {
    content: "";

    position: absolute;
    top: -7px;
    right: 17px;

    width: 12px;
    height: 12px;

    background: #11161d;
    border-top: 1px solid #29313c;
    border-left: 1px solid #29313c;

    transform: rotate(45deg);
}

.notification-panel-header {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    padding: 20px;

    border-bottom: 1px solid #252c35;
}

.notification-panel-header h3 {
    margin: 4px 0 0;
    font-size: 18px;
}

.notification-eyebrow {
    color: #5aa9ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.notification-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    padding: 0;

    color: #8d95a3;
    background: transparent;

    border: 0;
    border-radius: 8px;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.notification-close:hover {
    color: #ffffff;
    background: #1b222c;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 42px 28px 38px;

    text-align: center;
}

.notification-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    margin-bottom: 16px;

    color: #5aa9ff;
    background: rgba(51, 153, 255, 0.1);

    border: 1px solid rgba(51, 153, 255, 0.24);
    border-radius: 50%;
}

.notification-empty-icon svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-empty strong {
    margin-bottom: 7px;
    font-size: 16px;
}

.notification-empty span {
    max-width: 270px;

    color: #8d95a3;
    font-size: 13px;
    line-height: 1.55;
}

.notification-panel-footer {
    padding: 12px 20px;

    color: #6f7886;
    background: #0e1319;

    border-top: 1px solid #252c35;

    font-size: 11px;
    text-align: center;
}

@media (max-width: 900px) {
    .notification-panel {
        position: fixed;
        top: 84px;
        right: 16px;
        left: 16px;

        width: auto;
    }

    .notification-panel::before {
        display: none;
    }
}

/* ==========================================================
   DYNAMIC MARKET STATUS
========================================================== */

.system-chip.market-open .chip-dot {
    background: #29d17c;
    box-shadow: 0 0 12px rgba(41, 209, 124, 0.75);
}

.system-chip.market-opening .chip-dot {
    background: #f4b942;
    box-shadow: 0 0 12px rgba(244, 185, 66, 0.65);
}

.system-chip.market-closed .chip-dot {
    background: #ff5e63;
    box-shadow: 0 0 12px rgba(255, 94, 99, 0.62);
}

.system-chip.market-open strong {
    color: #29d17c;
}

.system-chip.market-opening strong {
    color: #f4b942;
}

.system-chip.market-closed strong {
    color: #ff7277;
}


.activity-relative-time {
    color: #697382 !important;
    font-size: 11px !important;
}


.recent-trade-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.recent-trade-meta > span:first-child {
    color: #8d95a3;
    font-size: 12px;
}

.activity-relative-time {
    color: #697382;
    font-size: 11px;
}

.recent-trade-meta strong {
    margin-top: 2px;
    font-size: 15px;
}


.notification-panel {
    width: min(340px, calc(100vw - 32px));
}

.notification-empty-icon {
    width: 60px;
    height: 60px;
}

.notification-empty-icon svg {
    width: 26px;
    height: 26px;
}

.notification-list {
    max-height: 430px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 13px;
    padding: 16px 18px;
    border-bottom: 1px solid #252c35;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    border-radius: 50%;
    font-size: 20px;
    font-weight: 800;
}

.notification-trade-win {
    color: #29d17c;
    background: rgba(41, 209, 124, 0.12);
    border: 1px solid rgba(41, 209, 124, 0.35);
}

.notification-trade-loss {
    color: #ff5e63;
    background: rgba(255, 94, 99, 0.12);
    border: 1px solid rgba(255, 94, 99, 0.35);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-heading,
.notification-item-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-item-heading {
    margin-bottom: 6px;
}

.notification-item-heading strong {
    color: #f4f7fb;
    font-size: 14px;
}

.notification-item-heading span {
    flex-shrink: 0;
    color: #697382;
    font-size: 11px;
}

.notification-item-detail span {
    overflow: hidden;
    color: #8d95a3;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-detail strong {
    flex-shrink: 0;
    font-size: 13px;
}


/* ---------- App Footer ---------- */

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 22px 24px 28px;

    color: #505966;
    font-size: 11px;
}

.app-footer span + span::before {
    content: "•";
    margin-right: 8px;
}


/* Notification drawer polish */

.notification-panel {
    width: min(375px, calc(100vw - 32px));
}

/* Recent Activity P&L polish */

.recent-trade-meta strong {
    font-size: 16px;
    font-weight: 800;
}


/* ==========================================================
   CALENDAR PAGE
========================================================== */

.calendar-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.calendar-page-header h2 {
    margin: 5px 0 8px;
    font-size: 34px;
}

.calendar-page-header > div:first-child > p:last-child {
    color: #8d95a3;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 8px;

    background: #11161d;
    border: 1px solid #252c35;
    border-radius: 14px;
}

.calendar-navigation strong {
    min-width: 130px;
    text-align: center;
}

.calendar-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    color: #dce3ec;
    background: #1a212b;

    border: 1px solid #2c3440;
    border-radius: 9px;

    font-size: 24px;
    text-decoration: none;
}

.calendar-nav-button:hover {
    color: #ffffff;
    background: #252f3d;
}

.calendar-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.calendar-panel {
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));

    border-bottom: 1px solid #252c35;
}

.calendar-weekdays span {
    padding: 14px 12px;

    color: #697382;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-height: 130px;

    padding: 14px;

    color: #dce3ec;
    background: #11161d;

    border: 0;
    border-right: 1px solid #252c35;
    border-bottom: 1px solid #252c35;

    text-align: left;
    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day:not(:disabled):hover {
    z-index: 2;
    background: #18202a;
    transform: translateY(-2px);
}

.calendar-day:disabled {
    cursor: default;
}

.calendar-day.outside-month {
    opacity: 0.25;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px #3399ff;
}

.calendar-day-profit {
    background:
        linear-gradient(
            180deg,
            rgba(41, 209, 124, 0.09),
            rgba(17, 22, 29, 1) 72%
        );
}

.calendar-day-loss {
    background:
        linear-gradient(
            180deg,
            rgba(255, 94, 99, 0.09),
            rgba(17, 22, 29, 1) 72%
        );
}

.calendar-day-number {
    color: #8d95a3;
    font-size: 13px;
    font-weight: 700;
}

.calendar-day strong {
    margin-top: 18px;
    font-size: 22px;
}

.calendar-day-record {
    margin-top: 7px;
    color: #dce3ec;
    font-size: 12px;
    font-weight: 700;
}

.calendar-day-trades,
.calendar-no-trades {
    margin-top: auto;
    color: #697382;
    font-size: 11px;
}

.calendar-no-trades {
    align-self: center;
    margin-bottom: auto;
    opacity: 0.55;
}

@media (max-width: 1000px) {
    .calendar-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-day {
        min-height: 105px;
        padding: 10px;
    }

    .calendar-day strong {
        font-size: 17px;
    }
}

@media (max-width: 700px) {
    .calendar-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-summary-grid {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays span {
        padding: 10px 3px;
        font-size: 9px;
    }

    .calendar-day {
        min-height: 78px;
        padding: 7px;
    }

    .calendar-day strong {
        margin-top: 10px;
        font-size: 13px;
    }

    .calendar-day-record,
    .calendar-day-trades,
    .calendar-no-trades {
        font-size: 9px;
    }
}


.calendar-drawer-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;

    background: rgba(3, 6, 10, 0.68);
    backdrop-filter: blur(3px);
}

.calendar-drawer-backdrop[hidden] {
    display: none;
}

.calendar-day-drawer {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;

    width: min(430px, 100vw);
    height: 100vh;

    color: #f4f7fb;
    background: #10151c;

    border-left: 1px solid #29313c;
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.48);

    overflow-y: auto;

    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.calendar-day-drawer.open {
    transform: translateX(0);
}

.calendar-drawer-open {
    overflow: hidden;
}


/* ==========================================================
   CALENDAR DRAWER POLISH
========================================================== */

.calendar-day-drawer {
    width: min(460px, 100vw);
}

.calendar-drawer-header {
    padding: 30px 32px 26px;
}

.calendar-drawer-header h3 {
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.25;
}

/* ---------- Day summary ---------- */

.calendar-drawer-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;

    margin: 28px 32px 0;

    background: #252c35;
    border: 1px solid #252c35;
    border-radius: 14px;
    overflow: hidden;
}

.calendar-drawer-stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 92px;
    padding: 18px 20px;

    background: #11171f;
}

.calendar-drawer-stat:nth-child(even) {
    border-left: 1px solid #252c35;
}

.calendar-drawer-stat:nth-child(n + 2) {
    border-top: 1px solid #252c35;
}

.calendar-drawer-stat-primary {
    grid-column: 1 / -1;
    min-height: 105px;
}

.calendar-drawer-stat span {
    color: #7f8997;
    font-size: 12px;
}

.calendar-drawer-stat strong {
    margin-top: 12px;

    color: #f4f7fb;
    font-size: 20px;
    font-weight: 750;
}

.calendar-drawer-stat-primary strong {
    font-size: 30px;
}

/* ---------- Completed trades ---------- */

.calendar-drawer-section {
    padding: 30px 32px 36px;
}

.calendar-drawer-section-header {
    margin-bottom: 16px;
    padding-bottom: 14px;

    border-bottom: 1px solid #252c35;
}

.calendar-drawer-trades {
    display: flex;
    flex-direction: column;
    gap: 14px;

    border: 0;
    border-radius: 0;
    overflow: visible;
}

.calendar-drawer-trade {
    display: block;

    padding: 20px;

    background: #11171f;

    border: 1px solid #252c35;
    border-radius: 14px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.calendar-drawer-trade:hover {
    background: #151c25;
    border-color: #343e4c;
}

.calendar-drawer-trade:last-child {
    border-bottom: 1px solid #252c35;
}

.calendar-trade-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.calendar-trade-card-header > strong {
    color: #f4f7fb;
    font-size: 17px;
    font-weight: 750;
}

.calendar-trade-setup {
    display: block;

    margin-top: 8px;

    color: #7f8997;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.calendar-trade-pnl {
    display: block;

    margin-top: 20px;

    font-size: 25px;
    font-weight: 800;
}

.calendar-trade-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

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

    border-top: 1px solid #252c35;
}

.calendar-trade-prices > div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 11px 12px;

    background: #0e141b;
    border: 1px solid #222a34;
    border-radius: 9px;
}

.calendar-trade-prices span {
    color: #697382;
    font-size: 11px;
}

.calendar-trade-prices strong {
    color: #dce3ec;
    font-size: 13px;
}

/* Remove styling from the old trade layout */

.calendar-drawer-trade-main,
.calendar-drawer-trade-result {
    display: contents;
}

@media (max-width: 520px) {
    .calendar-drawer-header {
        padding: 24px;
    }

    .calendar-drawer-overview {
        grid-template-columns: 1fr;
        margin: 22px 24px 0;
    }

    .calendar-drawer-stat-primary {
        grid-column: auto;
    }

    .calendar-drawer-stat:nth-child(even) {
        border-left: 0;
    }

    .calendar-drawer-stat + .calendar-drawer-stat {
        border-top: 1px solid #252c35;
    }

    .calendar-drawer-section {
        padding: 26px 24px 32px;
    }

    .calendar-trade-prices {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   CALENDAR INTERACTION POLISH
========================================================== */

.calendar-drawer-header-divider {
    height: 1px;
    margin: 0 32px;
    background: #252c35;
}

.calendar-drawer-close {
    width: 38px;
    height: 38px;

    color: #8d95a3;
    background: #151b23;

    border: 1px solid #29313c;
    border-radius: 11px;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.calendar-drawer-close:hover {
    color: #ffffff;
    background: #1c2530;
    border-color: #3a4655;
}

.calendar-drawer-close svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* Calendar cell simplification */

.calendar-day-details {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    margin-top: auto;

    color: #7f8997;
    font-size: 11px;
}

/* Expandable trade cards */

.calendar-drawer-trade {
    padding: 0;
    overflow: hidden;
}

.calendar-trade-card-toggle {
    display: block;
    width: 100%;

    padding: 20px;

    color: inherit;
    background: transparent;

    border: 0;

    text-align: left;
    cursor: pointer;
}

.calendar-trade-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-trade-chevron {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: #697382;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.2s ease;
}

.calendar-drawer-trade.expanded
.calendar-trade-chevron {
    transform: rotate(180deg);
}

.calendar-trade-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;

    margin: 0 20px 20px;

    background: #252c35;
    border: 1px solid #252c35;
    border-radius: 11px;
    overflow: hidden;
}

.calendar-trade-details[hidden] {
    display: none;
}

.calendar-trade-details > div {
    padding: 13px 14px;
    background: #0e141b;
}

.calendar-trade-details span {
    display: block;

    margin-bottom: 6px;

    color: #697382;
    font-size: 10px;
}

.calendar-trade-details strong {
    color: #dce3ec;
    font-size: 12px;
}

@media (max-width: 520px) {
    .calendar-drawer-header-divider {
        margin: 0 24px;
    }

    .calendar-trade-details {
        grid-template-columns: 1fr;
    }
}


/* Keep calendar drawer title and close button on one row */

.calendar-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.calendar-drawer-header > div:first-child {
    min-width: 0;
}

.calendar-drawer-close {
    flex: 0 0 auto;
    margin-left: auto;
}


/* ==========================================================
   JOURNAL PAGE
========================================================== */

.journal-page-header {
    margin-bottom: 28px;
}

.journal-page-header h2 {
    margin: 5px 0 8px;
    font-size: 34px;
}

.journal-page-header > div > p:last-child {
    color: #8d95a3;
}

.journal-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.journal-panel {
    overflow: hidden;
}

.journal-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 22px 24px;
    border-bottom: 1px solid #252c35;
}

.journal-panel-header h3 {
    margin: 5px 0 0;
}

.journal-result-count {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.journal-result-count strong {
    font-size: 20px;
}

.journal-result-count span {
    color: #7f8997;
    font-size: 12px;
}

.journal-filters {
    display: grid;
    grid-template-columns:
        minmax(230px, 1.5fr)
        repeat(4, minmax(140px, 1fr))
        auto;
    gap: 12px;

    padding: 18px 24px;
    border-bottom: 1px solid #252c35;
}

.journal-filters label {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.journal-filters label > span {
    color: #7f8997;
    font-size: 11px;
}

.journal-filters input,
.journal-filters select {
    width: 100%;
    min-height: 42px;

    padding: 0 12px;

    color: #dce3ec;
    background: #0e141b;

    border: 1px solid #29313c;
    border-radius: 9px;
}

.journal-filters input:focus,
.journal-filters select:focus {
    border-color: #3399ff;
    outline: none;
}

.journal-reset-button {
    align-self: end;

    min-height: 42px;
    padding: 0 16px;

    color: #dce3ec;
    background: #18202a;

    border: 1px solid #2c3541;
    border-radius: 9px;

    cursor: pointer;
}

.journal-reset-button:hover {
    background: #202a36;
}

.journal-table-wrapper {
    overflow-x: auto;
}

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

.journal-table th,
.journal-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #252c35;
    text-align: left;
    white-space: nowrap;
}

.journal-table th {
    color: #697382;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.journal-table td {
    color: #dce3ec;
    font-size: 13px;
}

.journal-table td:first-child span {
    display: block;
    margin-top: 4px;

    color: #697382;
    font-size: 10px;
}

.journal-trade-row {
    cursor: pointer;
    transition: background 0.18s ease;
}

.journal-trade-row:hover,
.journal-trade-row:focus {
    background: #151c25;
    outline: none;
}

.journal-setup-label {
    color: #9ba5b3;
}

.journal-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 52px;
    padding: 5px 9px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.journal-result-win {
    color: #29d17c;
    background: rgba(41, 209, 124, 0.12);
}

.journal-result-loss {
    color: #ff5e63;
    background: rgba(255, 94, 99, 0.12);
}

.journal-filtered-empty,
.journal-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 240px;
    padding: 40px;

    text-align: center;
}

.journal-filtered-empty span,
.journal-empty-state span {
    color: #7f8997;
    font-size: 13px;
}

/* ==========================================================
   JOURNAL DRAWER
========================================================== */

.journal-drawer-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;

    background: rgba(3, 6, 10, 0.68);
    backdrop-filter: blur(3px);
}

.journal-drawer-backdrop[hidden] {
    display: none;
}

.journal-trade-drawer {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;

    width: min(460px, 100vw);
    height: 100vh;

    color: #f4f7fb;
    background: #10151c;

    border-left: 1px solid #29313c;
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.48);

    overflow-y: auto;

    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.journal-trade-drawer.open {
    transform: translateX(0);
}

.journal-drawer-open {
    overflow: hidden;
}

.journal-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 30px 32px 24px;
}

.journal-drawer-header h3 {
    margin: 7px 0 10px;
    font-size: 27px;
}

.journal-drawer-heading-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.journal-drawer-heading-meta > span:last-child {
    color: #7f8997;
    font-size: 12px;
}

.journal-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    color: #8d95a3;
    background: #151b23;

    border: 1px solid #29313c;
    border-radius: 11px;

    cursor: pointer;
}

.journal-drawer-close:hover {
    color: #ffffff;
    background: #1c2530;
}

.journal-drawer-close svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.journal-drawer-divider {
    height: 1px;
    margin: 0 32px;
    background: #252c35;
}

.journal-drawer-hero {
    margin: 28px 32px 0;
    padding: 22px;

    background: #11171f;
    border: 1px solid #29313c;
    border-radius: 14px;
}

.journal-drawer-hero > span {
    color: #7f8997;
    font-size: 12px;
}

.journal-drawer-hero strong {
    display: block;
    margin-top: 12px;

    font-size: 31px;
}

.journal-drawer-hero p {
    margin: 12px 0 0;

    color: #8d95a3;
    font-size: 12px;
}

.journal-drawer-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin: 18px 32px 0;
}

.journal-drawer-prices > div {
    padding: 15px 16px;

    background: #0e141b;
    border: 1px solid #29313c;
    border-radius: 10px;
}

.journal-drawer-prices span,
.journal-drawer-metrics span {
    display: block;
    margin-bottom: 7px;

    color: #697382;
    font-size: 10px;
}

.journal-drawer-prices strong {
    font-size: 15px;
}

.journal-drawer-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;

    margin: 18px 32px 36px;

    background: #252c35;
    border: 1px solid #252c35;
    border-radius: 13px;
    overflow: hidden;
}

.journal-drawer-metrics > div {
    padding: 15px 16px;
    background: #0e141b;
}

.journal-drawer-metrics strong {
    font-size: 13px;
}

@media (max-width: 1100px) {
    .journal-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .journal-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .journal-summary-grid {
        grid-template-columns: 1fr;
    }

    .journal-filters {
        grid-template-columns: 1fr;
    }

    .journal-search-field {
        grid-column: auto;
    }

    .journal-table th,
    .journal-table td {
        padding: 13px 14px;
    }

    .journal-drawer-header {
        padding: 24px;
    }

    .journal-drawer-divider {
        margin: 0 24px;
    }

    .journal-drawer-hero,
    .journal-drawer-prices,
    .journal-drawer-metrics {
        margin-right: 24px;
        margin-left: 24px;
    }

    .journal-drawer-metrics {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   LAB PAGE
========================================================== */

.lab-page-header {
    margin-bottom: 28px;
}

.lab-page-header h2 {
    margin: 5px 0 8px;
    font-size: 34px;
}

.lab-page-header > div > p:last-child {
    max-width: 760px;
    color: #8d95a3;
}

.lab-health-panel {
    margin-bottom: 22px;
    padding: 26px 28px;
}

.lab-health-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.lab-health-heading {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 7px;
}

.lab-health-heading h3 {
    margin: 0;
    font-size: 27px;
}

.lab-health-main p:last-child {
    margin: 9px 0 0;
    color: #7f8997;
    font-size: 13px;
}

.lab-health-score {
    display: flex;
    align-items: baseline;
    gap: 5px;

    flex-shrink: 0;
}

.lab-health-score strong {
    font-size: 42px;
    line-height: 1;
}

.lab-health-score span {
    color: #7f8997;
    font-size: 14px;
}

.lab-health-progress {
    height: 8px;
    margin-top: 24px;

    background: #0e141b;
    border: 1px solid #232b35;
    border-radius: 999px;

    overflow: hidden;
}

.lab-health-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.lab-health-progress-building {
    background: #3399ff;
}

.lab-health-progress-strong {
    background: #29d17c;
}

.lab-health-progress-stable {
    background: #f2b84b;
}

.lab-health-progress-review {
    background: #ff5e63;
}

.lab-confidence-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 27px;
    padding: 0 10px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.lab-confidence-high {
    color: #29d17c;
    background: rgba(41, 209, 124, 0.11);
    border-color: rgba(41, 209, 124, 0.28);
}

.lab-confidence-medium {
    color: #f2b84b;
    background: rgba(242, 184, 75, 0.11);
    border-color: rgba(242, 184, 75, 0.28);
}

.lab-confidence-low {
    color: #ff7c80;
    background: rgba(255, 94, 99, 0.1);
    border-color: rgba(255, 94, 99, 0.26);
}

.lab-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;

    margin-bottom: 34px;
}

.lab-section {
    margin-top: 34px;
}

.lab-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 16px;
}

.lab-section-header h3 {
    margin: 5px 0 0;
    font-size: 21px;
}

.lab-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lab-performance-card {
    padding: 22px;
}

.lab-performance-card > span {
    color: #8d95a3;
    font-size: 13px;
}

.lab-performance-card > strong {
    display: block;

    margin-top: 15px;

    font-size: 28px;
}

.lab-performance-card small {
    display: block;

    margin-top: 8px;

    color: #697382;
    font-size: 11px;
}

.lab-analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lab-analysis-card,
.lab-context-card {
    overflow: hidden;
}

.lab-analysis-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 18px 20px;

    border-bottom: 1px solid #252c35;
}

.lab-analysis-card-header h4 {
    margin: 0;
    font-size: 15px;
}

.lab-analysis-card-header > span {
    color: #697382;
    font-size: 10px;
}

.lab-analysis-list,
.lab-context-list {
    display: flex;
    flex-direction: column;
}

.lab-analysis-row,
.lab-context-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    min-height: 72px;
    padding: 14px 18px;

    border-bottom: 1px solid #252c35;
}

.lab-analysis-row:last-child,
.lab-context-row:last-child {
    border-bottom: 0;
}

.lab-analysis-row > div:first-child,
.lab-context-label {
    min-width: 0;
}

.lab-analysis-row > div:last-child,
.lab-context-stats {
    flex-shrink: 0;
    text-align: right;
}

.lab-analysis-row strong,
.lab-context-row strong {
    display: block;
    font-size: 13px;
}

.lab-analysis-row span,
.lab-context-row span {
    display: block;

    margin-top: 5px;

    color: #697382;
    font-size: 10px;
}

.lab-empty-row {
    padding: 24px 18px;

    color: #697382;
    font-size: 12px;
    text-align: center;
}

.lab-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.lab-context-row {
    position: relative;
    padding-right: 38px;
}

.lab-confidence-dot {
    position: absolute;
    top: 50%;
    right: 16px;

    width: 8px;
    height: 8px;

    margin-top: -4px;

    border-radius: 50%;
}

.lab-confidence-dot-high {
    background: #29d17c;
    box-shadow: 0 0 10px rgba(41, 209, 124, 0.65);
}

.lab-confidence-dot-medium {
    background: #f2b84b;
    box-shadow: 0 0 10px rgba(242, 184, 75, 0.58);
}

.lab-confidence-dot-low {
    background: #ff5e63;
    box-shadow: 0 0 10px rgba(255, 94, 99, 0.54);
}

.lab-coach-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    padding: 24px;
}

.lab-coach-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    flex: 0 0 auto;

    color: #65b2ff;
    background: rgba(51, 153, 255, 0.12);

    border: 1px solid rgba(51, 153, 255, 0.26);
    border-radius: 13px;

    font-size: 13px;
    font-weight: 900;
}

.lab-coach-content > span {
    color: #65b2ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lab-coach-content h4 {
    margin: 7px 0 9px;
    font-size: 19px;
}

.lab-coach-content p {
    max-width: 760px;
    margin: 0;

    color: #8d95a3;
    font-size: 13px;
    line-height: 1.6;
}

.lab-coach-sample {
    display: flex;
    align-items: baseline;
    gap: 7px;

    margin-top: 18px;
}

.lab-coach-sample strong {
    font-size: 21px;
}

.lab-coach-sample span {
    color: #697382;
    font-size: 11px;
}

.lab-recommendation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;

    margin-top: 18px;
}

.lab-recommendation-card {
    padding: 20px;
}

.lab-recommendation-card > span {
    color: #8d95a3;
    font-size: 12px;
}

.lab-recommendation-card > strong {
    display: block;

    margin-top: 13px;

    font-size: 21px;
}

.lab-recommendation-card small {
    display: block;

    margin-top: 9px;

    color: #697382;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .lab-summary-grid,
    .lab-recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lab-analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .lab-performance-grid,
    .lab-context-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .lab-health-main,
    .lab-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .lab-health-score {
        margin-top: 6px;
    }

    .lab-summary-grid,
    .lab-recommendation-grid {
        grid-template-columns: 1fr;
    }

    .lab-coach-card {
        flex-direction: column;
    }
}


/* ==========================================================
   LAB CONFIDENCE REFINEMENT
========================================================== */

.lab-confidence-building {
    color: #65b2ff;
    background: rgba(51, 153, 255, 0.11);
    border-color: rgba(51, 153, 255, 0.3);
}

.lab-health-progress-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: 9px;

    color: #697382;
    font-size: 10px;
}

.lab-confidence-dot-low {
    background: #3399ff;
    box-shadow: 0 0 10px rgba(51, 153, 255, 0.58);
}


/* ==========================================================
   CONTROL CENTER
========================================================== */

.system-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 28px;
}

.system-page-header h2 {
    margin: 5px 0 8px;
    font-size: 34px;
}

.system-page-header > div:first-child > p:last-child {
    max-width: 720px;
    margin: 0;

    color: #8d95a3;
}

.system-generated-at {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;

    flex: 0 0 auto;
}

.system-generated-at span {
    color: #697382;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.system-generated-at strong {
    font-size: 13px;
}


/* ==========================================================
   TOP OVERVIEW CARDS
========================================================== */

.system-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;

    margin-bottom: 30px;
}

.system-overview-card {
    padding: 22px;
}

.system-overview-card > span {
    display: block;

    color: #8d95a3;
    font-size: 13px;
}

.system-overview-card > strong {
    display: block;

    margin-top: 14px;

    font-size: 28px;
    line-height: 1.1;
}

.system-overview-card small {
    display: block;

    margin-top: 9px;

    color: #697382;
    font-size: 11px;
}


/* ==========================================================
   MAIN TWO-COLUMN LAYOUT
========================================================== */

.system-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.85fr);
    gap: 22px;
    align-items: start;
}

.system-main-column,
.system-side-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.system-section {
    min-width: 0;
}

.system-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;

    margin-bottom: 14px;
}

.system-section-header h3 {
    margin: 5px 0 0;
    font-size: 20px;
}


/* ==========================================================
   SERVICE AND DATA LISTS
========================================================== */

.system-list-panel {
    overflow: hidden;
}

.system-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 78px;
    padding: 16px 20px;

    border-bottom: 1px solid #252c35;
}

.system-list-row:last-child {
    border-bottom: 0;
}

.system-list-identity {
    display: flex;
    align-items: center;
    gap: 13px;

    min-width: 0;
}

.system-list-identity > div {
    min-width: 0;
}

.system-list-identity strong {
    display: block;

    color: #f4f7fb;
    font-size: 14px;
}

.system-list-identity span:not(.system-status-dot) {
    display: block;

    margin-top: 5px;

    color: #7f8997;
    font-size: 11px;
}

.system-status-dot {
    width: 10px;
    height: 10px;

    flex: 0 0 auto;

    border-radius: 50%;
}

.system-status-dot-healthy {
    background: #29d17c;
    box-shadow: 0 0 11px rgba(41, 209, 124, 0.65);
}

.system-status-dot-warning {
    background: #f2b84b;
    box-shadow: 0 0 11px rgba(242, 184, 75, 0.6);
}

.system-status-dot-error {
    background: #ff5e63;
    box-shadow: 0 0 11px rgba(255, 94, 99, 0.58);
}

.system-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    padding: 0 10px;

    flex: 0 0 auto;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}

.system-status-badge-healthy {
    color: #29d17c;
    background: rgba(41, 209, 124, 0.11);
    border-color: rgba(41, 209, 124, 0.28);
}

.system-status-badge-warning {
    color: #f2b84b;
    background: rgba(242, 184, 75, 0.11);
    border-color: rgba(242, 184, 75, 0.28);
}

.system-status-badge-error {
    color: #ff7277;
    background: rgba(255, 94, 99, 0.1);
    border-color: rgba(255, 94, 99, 0.27);
}

.system-source-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;

    flex: 0 0 auto;

    text-align: right;
}

.system-source-meta strong {
    font-size: 12px;
}

.system-source-meta span {
    color: #697382;
    font-size: 10px;
}


/* ==========================================================
   STATUS TEXT COLORS
========================================================== */

.system-status-text-healthy {
    color: #29d17c;
}

.system-status-text-warning {
    color: #f2b84b;
}

.system-status-text-error {
    color: #ff5e63;
}


/* ==========================================================
   BOT CONFIGURATION
========================================================== */

.system-rules-panel {
    overflow: hidden;
}

.system-rules-panel > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    min-height: 62px;
    padding: 14px 18px;

    border-bottom: 1px solid #252c35;
}

.system-rules-panel > div:last-child {
    border-bottom: 0;
}

.system-rules-panel span {
    color: #8d95a3;
    font-size: 12px;
}

.system-rules-panel strong {
    color: #f4f7fb;
    font-size: 13px;
    text-align: right;
}


/* ==========================================================
   RECENT SYSTEM EVENTS
========================================================== */

.system-events-panel {
    overflow: hidden;
}

.system-event-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 17px 18px;

    border-bottom: 1px solid #252c35;
}

.system-event-row:last-child {
    border-bottom: 0;
}

.system-event-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex: 0 0 auto;

    border: 1px solid transparent;
    border-radius: 11px;

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

.system-event-icon-system {
    color: #65b2ff;
    background: rgba(51, 153, 255, 0.12);
    border-color: rgba(51, 153, 255, 0.28);
}

.system-event-icon-data {
    color: #29d17c;
    background: rgba(41, 209, 124, 0.11);
    border-color: rgba(41, 209, 124, 0.27);
}

.system-event-icon-connection {
    color: #b26cff;
    background: rgba(178, 108, 255, 0.11);
    border-color: rgba(178, 108, 255, 0.27);
}

.system-event-content {
    min-width: 0;
    flex: 1;
}

.system-event-content > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.system-event-content strong {
    color: #f4f7fb;
    font-size: 13px;
}

.system-event-content > div > span {
    color: #697382;
    font-size: 10px;
    white-space: nowrap;
}

.system-event-content p {
    margin: 7px 0 0;

    color: #7f8997;
    font-size: 11px;
    line-height: 1.5;
}


/* ==========================================================
   RESPONSIVE CONTROL CENTER
========================================================== */

@media (max-width: 1150px) {
    .system-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-layout {
        grid-template-columns: 1fr;
    }

    .system-side-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (max-width: 760px) {
    .system-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-generated-at {
        align-items: flex-start;
    }

    .system-overview-grid,
    .system-side-column {
        grid-template-columns: 1fr;
    }

    .system-list-row {
        align-items: flex-start;
    }

    .system-source-meta {
        align-items: flex-end;
    }
}

@media (max-width: 540px) {
    .system-list-row {
        flex-direction: column;
    }

    .system-source-meta {
        align-items: flex-start;
        text-align: left;
    }

    .system-status-badge {
        align-self: flex-start;
    }

    .system-event-content > div {
        flex-direction: column;
        gap: 5px;
    }

    .system-rules-panel > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .system-rules-panel strong {
        text-align: left;
    }
}
