/* ================================================================
   OASIS — Panel v3
   CSS puro, sin limitaciones GTK. Control total como Electron/web.
   ================================================================ */

@font-face {
    font-family: 'Dune Rise';
    src: url('../Dune_Rise.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg:          #000000;
    --bg2:         #080808;
    --bg3:         #0D0D0D;
    /* OASIS — naranja */
    --orange:      #FF4E00;
    --orange-dim:  #882200;
    --orange-mute: #441100;
    /* ECOIN — amarillo */
    --yellow:      #FFB300;
    --yellow-dim:  #886000;
    --yellow-mute: #443000;
    /* LOG — verde neon */
    --neon:        #39FF14;
    --neon-dim:    #1a7a09;
    /* General */
    --green:       #27D980;
    --border:      #1A1A1A;
    --font:        'Dune Rise', 'Cantarell', 'Ubuntu', sans-serif;
    --mono:        'DejaVu Sans Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 390px;
    height: 620px;
    overflow: hidden;
    background: var(--bg);
    color: var(--orange);
    font-family: var(--font);
    font-size: 10pt;
    display: flex;
    flex-direction: column;
    user-select: none;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-title {
    font-size: 15pt;
    color: var(--orange);
    letter-spacing: 5px;
    line-height: 1;
}

.app-sub {
    font-size: 6pt;
    color: var(--orange-mute);
    letter-spacing: 2px;
}

.status-dot {
    font-size: 11pt;
    transition: color 0.4s;
    line-height: 1;
}
.status-dot[data-state="running"] { color: var(--green); }
.status-dot[data-state="stopped"] { color: var(--orange); }
.status-dot[data-state="unknown"] { color: var(--orange-mute); }

/* ── Tab bar ─────────────────────────────────────────────────── */
nav.tabbar {
    display: flex;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.tabBtn {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 11px 0;
    font-size: 7.5pt;
    letter-spacing: 2px;
    font-family: var(--font);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

/* Tab OASIS — naranja */
.tabBtn[data-tab="oasis"]          { color: var(--orange-dim); }
.tabBtn[data-tab="oasis"]:hover    { color: var(--orange); }
.tabBtn[data-tab="oasis"].active   { color: var(--orange); border-bottom-color: var(--orange); }

/* Tab ECOIN — amarillo */
.tabBtn[data-tab="ecoin"]          { color: var(--yellow-dim); }
.tabBtn[data-tab="ecoin"]:hover    { color: var(--yellow); }
.tabBtn[data-tab="ecoin"].active   { color: var(--yellow); border-bottom-color: var(--yellow); }

/* Tab SISTEMA — verde neon */
.tabBtn[data-tab="sistema"]        { color: var(--neon-dim); }
.tabBtn[data-tab="sistema"]:hover  { color: var(--neon); }
.tabBtn[data-tab="sistema"].active { color: var(--neon); border-bottom-color: var(--neon); }

/* ── Main content ────────────────────────────────────────────── */
main {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.tab-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: var(--bg);
}
.tab-panel.active { display: flex; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ================================================================
   OASIS TAB — naranja
   ================================================================ */
#tab-oasis .card-state              { color: var(--orange-dim); }
#tab-oasis .status-card[data-state="running"]  .card-state { color: var(--green); }
#tab-oasis .status-card[data-state="stopped"]  .card-state { color: var(--orange); }
#tab-oasis .status-card[data-state="running"]  .card-stripe { background: var(--green); }
#tab-oasis .status-card[data-state="stopped"]  .card-stripe { background: var(--orange); }
#tab-oasis .card-sub                { color: var(--orange-mute); }
#tab-oasis .btn                     { color: var(--orange); border-color: var(--orange); }
#tab-oasis .btn.primary             { background: var(--orange); color: #000; border-color: var(--orange); }
#tab-oasis .ik                      { color: var(--orange-dim); }
#tab-oasis .iv                      { color: var(--orange); }

/* ================================================================
   ECOIN TAB — amarillo
   ================================================================ */
#tab-ecoin .card-state              { color: var(--yellow-dim); }
#tab-ecoin .status-card[data-state="running"]  .card-state { color: var(--yellow); }
#tab-ecoin .status-card[data-state="stopped"]  .card-state { color: var(--yellow-dim); }
#tab-ecoin .status-card[data-state="running"]  .card-stripe { background: var(--yellow); }
#tab-ecoin .status-card[data-state="stopped"]  .card-stripe { background: var(--yellow-dim); }
#tab-ecoin .card-sub                { color: var(--yellow-mute); }
#tab-ecoin .btn                     { color: var(--yellow); border-color: var(--yellow); }
#tab-ecoin .btn.primary             { background: var(--yellow); color: #000; border-color: var(--yellow); }
#tab-ecoin .ik                      { color: var(--yellow-dim); }
#tab-ecoin .iv                      { color: var(--yellow); }

/* ================================================================
   STATUS CARD — base
   ================================================================ */
.status-card {
    display: flex;
    margin: 14px 14px 6px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.3s;
}

.card-stripe {
    width: 5px;
    flex-shrink: 0;
    background: #1A1A1A;
    transition: background 0.4s;
}
.status-card[data-state="unknown"] .card-stripe { background: #1A1A1A; }

.card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-state {
    font-size: 18pt;
    font-weight: bold;
    letter-spacing: 2px;
    transition: color 0.4s;
}

.card-sub {
    font-size: 7.5pt;
    letter-spacing: 1px;
}

/* ── Botones base ────────────────────────────────────────────── */
.actions {
    padding: 6px 14px 2px;
    flex-shrink: 0;
}

.action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.btn {
    flex: 1;
    background: var(--bg);
    border: 1px solid currentColor;
    border-radius: 20px;
    padding: 9px 10px;
    font-size: 7.5pt;
    font-weight: bold;
    letter-spacing: 1px;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
    white-space: nowrap;
    text-align: center;
}
.btn:hover:not(:disabled) {
    background: var(--green);
    color: #000;
    border-color: var(--green);
}
.btn:active:not(:disabled) {
    background: #1fa865;
    border-color: #1fa865;
    color: #000;
}
.btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.btn.btn-clear {
    flex: none;
    width: calc(100% - 28px);
    margin: 6px 14px 12px;
    color: var(--neon);
    border-color: var(--neon);
}
.btn.btn-clear:hover:not(:disabled) {
    background: var(--neon);
    color: #000;
    border-color: var(--neon);
}

/* ── Info box ────────────────────────────────────────────────── */
.infobox {
    margin: 8px 14px 14px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    flex-shrink: 0;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 5px 2px;
    border-bottom: 1px solid #080808;
}
.info-row:last-child { border-bottom: none; }

.ik {
    font-size: 7.5pt;
    letter-spacing: 1px;
    min-width: 82px;
    flex-shrink: 0;
}
.iv {
    font-size: 7.5pt;
    word-break: break-all;
}

/* ================================================================
   SISTEMA / LOG — verde neon
   ================================================================ */
.log-header {
    font-size: 6.5pt;
    color: var(--neon-dim);
    letter-spacing: 2px;
    padding: 12px 16px 6px;
    flex-shrink: 0;
}

.log-area {
    flex: 1;
    background: #030303;
    border: 1px solid #0a1a0a;
    border-radius: 8px;
    margin: 0 14px 8px;
    padding: 10px 12px;
    overflow-y: auto;
    font-family: var(--mono);
    font-size: 7.5pt;
    color: var(--neon);
    line-height: 1.55;
    min-height: 0;
}

.log-line            { word-break: break-all; padding: 1px 0; color: var(--neon); }
.log-line.cmd        { color: var(--orange); }
.log-line.end        { color: var(--neon-dim); margin-top: 4px; }
.log-line.error      { color: #ff4444; }
