:root {
    --ebs-bg: #07101d;
    --ebs-bg-2: #0a1525;
    --ebs-line: rgba(148, 163, 184, .15);
    --ebs-text: #f8fafc;
    --ebs-muted: #91a3bd;
    --ebs-cyan: #22d3ee;
    --ebs-blue: #60a5fa;
    --ebs-green: #34d399;
    --ebs-amber: #fbbf24;
    --ebs-red: #fb7185;
}

.ebs-command-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(150px, .5fr));
    gap: 12px;
    margin: 0 0 24px;
}

.ebs-command-main,
.ebs-command-stat,
.ebs-panel {
    border: 1px solid var(--ebs-line);
    background: linear-gradient(150deg, rgba(10, 21, 37, .96), rgba(5, 12, 24, .96));
    box-shadow: 0 16px 40px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.ebs-command-main {
    min-height: 118px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 8px;
    border-color: rgba(34, 211, 238, .2);
}

.ebs-command-copy { min-width: 0; }
.ebs-command-copy small,
.ebs-command-stat small,
.ebs-kicker {
    display: block;
    color: var(--ebs-muted);
    font-size: 10px;
    line-height: 1.3;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ebs-command-copy strong {
    display: block;
    margin: 7px 0 5px;
    color: var(--ebs-text);
    font-size: 20px;
    letter-spacing: 0;
}

.ebs-command-copy p { margin: 0; color: var(--ebs-muted); font-size: 12px; line-height: 1.5; }
.ebs-command-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.ebs-command-stat {
    min-height: 118px;
    padding: 18px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ebs-command-stat i { color: var(--ebs-cyan); font-size: 18px; }
.ebs-command-stat strong { color: var(--ebs-text); font-size: 24px; line-height: 1; }
.ebs-command-stat span { color: var(--ebs-muted); font-size: 11px; font-weight: 700; }

.ebs-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(96, 165, 250, .26);
    border-radius: 7px;
    background: rgba(96, 165, 250, .09);
    color: #dbeafe;
    font: 800 12px Inter, sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ebs-btn:hover { background: rgba(96, 165, 250, .17); border-color: rgba(96, 165, 250, .45); transform: translateY(-1px); }
.ebs-btn.primary { color: #03202a; background: var(--ebs-cyan); border-color: var(--ebs-cyan); }
.ebs-btn.primary:hover { background: #67e8f9; }
.ebs-btn.green { color: #d1fae5; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .1); }
.ebs-btn.red { color: #fecdd3; border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .09); }
.ebs-btn:disabled { opacity: .55; cursor: wait; transform: none; }

.ebs-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 5, 13, .78);
    backdrop-filter: blur(10px);
}
.ebs-overlay.open { display: flex; }

.ebs-modal {
    width: min(980px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(125, 211, 252, .22);
    border-radius: 8px;
    background: #050c18;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .68);
}
.ebs-modal.narrow { width: min(610px, 100%); }

.ebs-modal-head {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ebs-line);
    background: #091424;
}
.ebs-modal-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ebs-modal-title > i { width: 38px; height: 38px; border: 1px solid rgba(34, 211, 238, .25); background: rgba(34, 211, 238, .08); border-radius: 7px; color: var(--ebs-cyan); display: grid; place-items: center; }
.ebs-modal-title strong { display: block; color: var(--ebs-text); font-size: 15px; }
.ebs-modal-title span { display: block; margin-top: 3px; color: var(--ebs-muted); font-size: 11px; }
.ebs-icon-btn { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--ebs-line); border-radius: 7px; background: rgba(255,255,255,.035); color: #cbd5e1; cursor: pointer; }
.ebs-modal-body { min-height: 0; overflow: auto; padding: 18px; }

.ebs-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ebs-line); overflow-x: auto; }
.ebs-tab { height: 34px; padding: 0 12px; white-space: nowrap; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ebs-muted); font: 800 11px Inter, sans-serif; cursor: pointer; }
.ebs-tab.active { color: #cffafe; border-color: rgba(34, 211, 238, .25); background: rgba(34, 211, 238, .09); }

.ebs-timeline { display: grid; gap: 10px; }
.ebs-event { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--ebs-line); border-radius: 7px; background: rgba(15, 23, 42, .52); }
.ebs-event-icon { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; background: rgba(96, 165, 250, .1); color: var(--ebs-blue); }
.ebs-event[data-status="pending"] .ebs-event-icon,
.ebs-event[data-status="submitted"] .ebs-event-icon,
.ebs-event[data-status="reviewing"] .ebs-event-icon { color: var(--ebs-amber); background: rgba(251, 191, 36, .09); }
.ebs-event[data-status="approved"] .ebs-event-icon,
.ebs-event[data-status="settled"] .ebs-event-icon,
.ebs-event[data-status="paid"] .ebs-event-icon,
.ebs-event[data-status="resolved"] .ebs-event-icon { color: var(--ebs-green); background: rgba(52, 211, 153, .09); }
.ebs-event[data-status="rejected"] .ebs-event-icon,
.ebs-event[data-status="chargeback"] .ebs-event-icon { color: var(--ebs-red); background: rgba(251, 113, 133, .09); }
.ebs-event-main { min-width: 0; }
.ebs-event-main strong { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--ebs-text); font-size: 13px; white-space: nowrap; }
.ebs-event-main span { display: block; margin-top: 4px; color: var(--ebs-muted); font-size: 11px; }
.ebs-status { justify-self: end; padding: 5px 8px; border: 1px solid var(--ebs-line); border-radius: 999px; color: #cbd5e1; font-size: 9px; font-weight: 900; text-transform: uppercase; }

.ebs-empty { padding: 42px 18px; border: 1px dashed rgba(148, 163, 184, .18); border-radius: 7px; color: var(--ebs-muted); text-align: center; font-size: 12px; }
.ebs-empty i { display: block; margin-bottom: 10px; color: #475569; font-size: 25px; }

.ebs-form { display: grid; gap: 14px; }
.ebs-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ebs-field { display: grid; gap: 7px; min-width: 0; }
.ebs-field.full { grid-column: 1 / -1; }
.ebs-field label { color: #b8c5d8; font-size: 11px; font-weight: 800; }
.ebs-field input,
.ebs-field select,
.ebs-field textarea { width: 100%; min-width: 0; border: 1px solid var(--ebs-line); border-radius: 7px; background: #091321; color: var(--ebs-text); padding: 11px 12px; outline: 0; font: 600 12px Inter, sans-serif; }
.ebs-field input:focus,
.ebs-field select:focus,
.ebs-field textarea:focus { border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 0 3px rgba(34, 211, 238, .07); }
.ebs-field textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.ebs-form-note { margin: 0; color: var(--ebs-muted); font-size: 11px; line-height: 1.5; }
.ebs-form-actions { display: flex; justify-content: flex-end; gap: 8px; }

.ebs-profile-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; margin-bottom: 18px; }
.ebs-panel { padding: 20px; border-radius: 8px; }
.ebs-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.ebs-panel-head h3 { margin: 0; color: var(--ebs-text); font-size: 16px; letter-spacing: 0; }
.ebs-panel-head p { margin: 5px 0 0; color: var(--ebs-muted); font-size: 11px; line-height: 1.5; }
.ebs-streak-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ebs-mini-stat { padding: 13px; border: 1px solid var(--ebs-line); border-radius: 7px; background: rgba(15,23,42,.48); }
.ebs-mini-stat strong { display: block; color: var(--ebs-text); font-size: 20px; }
.ebs-mini-stat span { display: block; margin-top: 5px; color: var(--ebs-muted); font-size: 10px; font-weight: 750; }
.ebs-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.ebs-badge { min-height: 58px; padding: 10px; border: 1px solid var(--ebs-line); border-radius: 7px; display: flex; align-items: center; gap: 10px; color: #64748b; background: rgba(15,23,42,.35); }
.ebs-badge.unlocked { color: #d1fae5; border-color: rgba(52,211,153,.24); background: rgba(52,211,153,.07); }
.ebs-badge i { width: 30px; font-size: 17px; text-align: center; }
.ebs-badge strong { display: block; color: inherit; font-size: 11px; }
.ebs-badge span { display: block; margin-top: 3px; color: var(--ebs-muted); font-size: 9px; }

.ebs-security-list { display: grid; gap: 9px; }
.ebs-security-row { min-height: 62px; padding: 11px 12px; border: 1px solid var(--ebs-line); border-radius: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(15,23,42,.42); }
.ebs-security-copy { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ebs-security-copy > i { width: 31px; color: var(--ebs-cyan); text-align: center; }
.ebs-security-copy strong { display: block; color: var(--ebs-text); font-size: 12px; }
.ebs-security-copy span { display: block; margin-top: 3px; color: var(--ebs-muted); font-size: 10px; }

.ebs-health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.ebs-health-card { padding: 14px; border: 1px solid var(--ebs-line); border-radius: 8px; background: rgba(7,16,29,.88); }
.ebs-health-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ebs-health-top strong { color: var(--ebs-text); font-size: 13px; }
.ebs-health-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ebs-green); box-shadow: 0 0 10px rgba(52,211,153,.5); }
.ebs-health-card[data-health="degraded"] .ebs-health-dot { background: var(--ebs-amber); box-shadow: 0 0 10px rgba(251,191,36,.5); }
.ebs-health-card[data-health="maintenance"] .ebs-health-dot { background: var(--ebs-red); box-shadow: 0 0 10px rgba(251,113,133,.5); }
.ebs-health-card[data-health="idle"] .ebs-health-dot { background: #64748b; box-shadow: none; }
.ebs-health-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.ebs-health-metrics div { min-width: 0; padding: 8px; border-radius: 6px; background: rgba(15,23,42,.55); }
.ebs-health-metrics strong { display: block; color: var(--ebs-text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.ebs-health-metrics span { display: block; margin-top: 4px; color: var(--ebs-muted); font-size: 8px; text-transform: uppercase; }
.ebs-admin-claims { margin-top: 14px; overflow-x: auto; }
.ebs-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.ebs-table th, .ebs-table td { padding: 10px; border-bottom: 1px solid var(--ebs-line); text-align: left; color: #cbd5e1; font-size: 10px; }
.ebs-table th { color: var(--ebs-muted); text-transform: uppercase; font-size: 9px; }
.ebs-table select { height: 30px; border: 1px solid var(--ebs-line); border-radius: 6px; background: #091321; color: #fff; font-size: 10px; }

.ebs-toast {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 2147483060;
    max-width: min(380px, calc(100vw - 32px));
    padding: 14px 18px;
    border: 1px solid rgba(0, 242, 254, 0.45);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.75);
    color: #f8fafc;
    box-shadow: 0 12px 40px rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font: 700 13px 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ebs-toast.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.ebs-toast.error {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.25);
    color: #fee2e2;
}

@media (max-width: 1000px) {
    .ebs-command-strip { grid-template-columns: repeat(3, 1fr); }
    .ebs-command-main { grid-column: 1 / -1; }
    .ebs-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ebs-command-strip { grid-template-columns: 1fr; }
    .ebs-command-main { min-height: 0; align-items: flex-start; flex-direction: column; }
    .ebs-command-actions { width: 100%; justify-content: stretch; }
    .ebs-command-actions .ebs-btn { flex: 1; }
    .ebs-command-stat { min-height: 88px; }
    .ebs-overlay { padding: 0; align-items: stretch; }
    .ebs-modal, .ebs-modal.narrow { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; }
    .ebs-modal-body { padding: 14px; }
    .ebs-form-grid { grid-template-columns: 1fr; }
    .ebs-field.full { grid-column: auto; }
    .ebs-event { grid-template-columns: 32px minmax(0, 1fr); }
    .ebs-event-icon { width: 32px; height: 32px; }
    .ebs-status { grid-column: 2; justify-self: start; }
    .ebs-streak-row { grid-template-columns: 1fr 1fr; }
    .ebs-streak-row .ebs-mini-stat:last-child { grid-column: 1 / -1; }
    .ebs-badges { grid-template-columns: 1fr; }
    .ebs-security-row { align-items: flex-start; flex-direction: column; }
    .ebs-security-row .ebs-btn { width: 100%; }
}
