/* mini-cosmos-theme.css
 * Tema visual Zenith para mini (login + dashboard)
 * Mantem seletores existentes para evitar quebra de comportamento.
 */

:root {
    --z-bg-0: #04070f;
    --z-bg-1: #060d1d;
    --z-bg-2: #0a1630;
    --z-card: rgba(10, 18, 35, 0.86);
    --z-card-soft: rgba(14, 25, 49, 0.78);
    --z-border: rgba(212, 165, 63, 0.32);
    --z-border-strong: rgba(212, 165, 63, 0.55);
    --z-gold: #d4a53f;
    --z-gold-2: #f0c56a;
    --z-text: #edf1fa;
    --z-muted: #9ba7be;
    --z-danger: #ef6f6f;
    --z-success: #58d28b;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ===== LOGIN ===== */
body.mini-login {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--z-text);
    background: var(--z-bg-0);
    overflow: hidden;
}

.mini-login .page {
    width: 100%;
    height: 100%;
    display: table;
    background:
        radial-gradient(circle at 18% 22%, rgba(212, 165, 63, 0.12), transparent 38%),
        radial-gradient(circle at 82% 78%, rgba(83, 117, 210, 0.2), transparent 42%),
        linear-gradient(150deg, #03060d, #08142b 48%, #03060d);
}

.mini-login .page-inner {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    padding: 14px;
}

.login-box {
    width: 360px;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 22px 20px;
    background: var(--z-card);
    border: 1px solid var(--z-border);
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-brand {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid var(--z-border);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--z-gold-2);
    background: rgba(212, 165, 63, 0.1);
    margin-bottom: 10px;
}

.login-box h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    color: var(--z-text);
    font-weight: 600;
}

.login-subtitle {
    margin: 7px 0 18px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--z-muted);
}

.login-box label {
    display: block;
    margin: 0 0 12px;
    font-size: 12px;
    color: #cfd7e7;
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    margin-top: 6px;
    height: 40px;
    border-radius: 9px;
    border: 1px solid rgba(164, 179, 214, 0.35);
    background: rgba(8, 14, 29, 0.94);
    color: #eff3ff;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: rgba(212, 165, 63, 0.6);
    box-shadow: 0 0 0 2px rgba(212, 165, 63, 0.16);
}

.login-box button {
    width: 100%;
    height: 41px;
    margin-top: 4px;
    border: 1px solid #b88c2c;
    border-radius: 9px;
    background: linear-gradient(180deg, #f2c86f, #c9942d);
    color: #1f1404;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(164, 120, 27, 0.35);
}

.login-box button:hover {
    filter: brightness(1.06);
}

.error {
    background: rgba(163, 43, 43, 0.26);
    border: 1px solid rgba(248, 120, 120, 0.48);
    color: #ffd8d8;
    padding: 8px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    text-align: center;
    border-radius: 8px;
}

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    text-align: center;
}

#loadingOverlay .loading-card {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 230px;
    margin-left: -115px;
    margin-top: -45px;
    background: #0d1830;
    border: 1px solid var(--z-border);
    padding: 20px;
    border-radius: 10px;
    color: #e8f1ff;
    font-size: 13px;
    box-shadow: 0 0 20px #000;
}

/* ===== DASHBOARD ===== */
body.mini-dashboard {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #050910;
    color: var(--z-text);
    overflow-y: auto;
}

.hud-layer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(212, 165, 63, 0.08), transparent 32%),
        radial-gradient(circle at 84% 74%, rgba(72, 115, 214, 0.16), transparent 37%),
        linear-gradient(160deg, #03070f, #08142b 52%, #04070f);
    z-index: 0;
}

.shell {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: 1080px;
    margin: 10px auto;
    padding: 12px;
    border-radius: 12px;
    background: rgba(6, 12, 24, 0.9);
    border: 1px solid var(--z-border);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar {
    overflow: hidden;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--z-border);
}

.title-wrap {
    float: left;
    width: 32%;
}

.title-wrap h1 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
    color: var(--z-gold-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.title-wrap p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--z-muted);
}

.top-actions {
    float: right;
    width: 66%;
    text-align: right;
}

.role-form {
    display: inline-block;
    text-align: left;
    margin-right: 8px;
    vertical-align: middle;
}

.role-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    color: #b8c7e5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.role-row {
    white-space: nowrap;
}

.role-row select {
    width: 248px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(147, 165, 202, 0.35);
    background: rgba(8, 15, 30, 0.95);
    color: #e9f1ff;
    font-size: 12px;
    outline: none;
}

.role-row select:focus {
    border-color: rgba(212, 165, 63, 0.68);
    box-shadow: 0 0 0 2px rgba(212, 165, 63, 0.18);
}

.role-row select option {
    color: #111;
}

.wallet-pill {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(17, 27, 52, 0.85);
    border: 1px solid rgba(169, 132, 48, 0.35);
    color: #d1dbf0;
    font-size: 11px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.wallet-pill strong {
    display: inline-block;
    margin-left: 6px;
    color: var(--z-gold-2);
    font-size: 12px;
}

.btn {
    height: 36px;
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    line-height: 36px;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.role-row .btn {
    margin-left: 6px;
    vertical-align: top;
}

.btn-primary {
    background: linear-gradient(180deg, #f1c66a, #c9952f);
    border: 1px solid #b5862a;
    color: #211302;
    box-shadow: 0 8px 18px rgba(177, 122, 23, 0.34);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    background: rgba(21, 34, 61, 0.85);
    border: 1px solid rgba(170, 186, 220, 0.35);
    color: #dce5f6;
}

.btn-disabled,
.btn[disabled] {
    background: #2d3a54;
    border: 1px solid #3e4f71;
    color: #8da0c5;
    cursor: not-allowed;
    box-shadow: none;
}

.panel {
    border-radius: 12px;
    border: 1px solid var(--z-border);
    background: var(--z-card);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.main-panel {
    min-height: 500px;
}

.panel-head {
    padding: 12px;
    border-bottom: 1px solid rgba(212, 165, 63, 0.25);
    overflow: hidden;
    background: linear-gradient(90deg, rgba(212, 165, 63, 0.12), rgba(212, 165, 63, 0.03) 48%, rgba(212, 165, 63, 0));
}

.panel-head h2 {
    float: left;
    margin: 0;
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
    color: var(--z-gold-2);
    text-transform: uppercase;
}

.tabs {
    float: right;
    white-space: nowrap;
}

.tab-btn {
    height: 30px;
    margin-left: 5px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(152, 169, 205, 0.34);
    background: rgba(17, 29, 52, 0.82);
    color: #d8e5ff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.tab-btn.is-active {
    background: linear-gradient(180deg, #f0c76e, #ca9a34);
    border-color: #bc8f31;
    color: #241603;
}

.tab-pane {
    display: none;
    padding: 10px;
    max-height: none;
    overflow-y: visible;
}

.tab-pane.is-active {
    display: block;
}

.empty-state {
    padding: 24px 10px;
    border: 1px dashed rgba(212, 165, 63, 0.35);
    border-radius: 10px;
    color: #afbedb;
    text-align: center;
    font-size: 12px;
    background: rgba(13, 22, 41, 0.72);
}

.objective-card,
.shop-card {
    border: 1px solid rgba(212, 165, 63, 0.24);
    background: var(--z-card-soft);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px;
}

.shop-card.is-locked {
    border-color: rgba(222, 110, 110, 0.45);
    background: rgba(55, 26, 33, 0.56);
}

.objective-top,
.shop-top,
.shop-stat-row {
    overflow: hidden;
}

.objective-top,
.shop-top {
    margin-bottom: 8px;
}

.objective-icon,
.shop-icon {
    float: left;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    margin-right: 10px;
    background: rgba(6, 12, 24, 0.85);
    border: 1px solid rgba(178, 143, 58, 0.35);
}

.objective-main,
.shop-main {
    float: left;
    width: 76%;
}

.objective-main h3,
.shop-main h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #eef3ff;
    font-weight: 600;
}

.objective-main p,
.shop-main p {
    margin: 4px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: #9daccc;
}

.objective-badge {
    float: right;
    font-size: 10px;
    margin-top: 2px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(212, 165, 63, 0.18);
    border: 1px solid rgba(212, 165, 63, 0.42);
    color: #f5d58e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.objective-badge.is-completed {
    background: rgba(52, 167, 106, 0.22);
    border-color: rgba(102, 218, 156, 0.4);
    color: #a8efc8;
}

.progress-meta {
    margin-bottom: 5px;
    font-size: 11px;
    color: #b6c4df;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(6, 12, 24, 0.92);
    overflow: hidden;
}

.progress-fill {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #efc66b, #c7942f);
}

.progress-fill.is-completed {
    background: linear-gradient(90deg, #37d38a, #2aa96a);
}

.shop-stats {
    background: rgba(7, 14, 28, 0.78);
    border: 1px solid rgba(155, 170, 204, 0.22);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 9px;
}

.shop-card .btn {
    width: 100%;
    text-align: center;
}

.shop-stat-row {
    margin-bottom: 5px;
}

.shop-stat-row:last-child {
    margin-bottom: 0;
}

.shop-stat-row span {
    float: left;
    font-size: 11px;
    color: #a8b9d8;
}

.shop-stat-row strong {
    float: right;
    font-size: 11px;
    color: #e6eeff;
}

.roulette-grid {
    margin: 0 -4px;
    overflow: hidden;
}

.roulette-col {
    float: left;
    width: 33.33%;
    padding: 4px;
}

.roulette-card {
    min-height: 250px;
}

.roulette-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--z-gold-2);
    text-transform: uppercase;
}

.roulette-cost {
    font-size: 11px;
    color: #cad8f4;
    margin-bottom: 8px;
}

.roulette-window {
    height: 42px;
    line-height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(159, 176, 210, 0.3);
    background: rgba(7, 14, 28, 0.94);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #d7e5ff;
    margin-bottom: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.roulette-result {
    min-height: 16px;
    font-size: 11px;
    margin-bottom: 8px;
    color: #b6c6e5;
}

.roulette-result.is-win {
    color: var(--z-success);
}

.roulette-result.is-miss {
    color: #ffb4b4;
}

.roulette-prize-list {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(152, 166, 200, 0.22);
    font-size: 10px;
    color: #90a8d6;
    line-height: 1.4;
}

.notice {
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 0 10px;
    font-size: 12px;
}

.notice-info {
    background: rgba(34, 68, 130, 0.28);
    border: 1px solid rgba(111, 156, 244, 0.35);
    color: #cae2ff;
}

.notice-error {
    background: rgba(121, 38, 55, 0.35);
    border: 1px solid rgba(255, 137, 137, 0.35);
    color: #ffd2d2;
}

.toast {
    position: fixed;
    right: 18px;
    top: 12px;
    z-index: 99;
    min-width: 260px;
    max-width: 320px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.toast-success {
    background: rgba(41, 150, 87, 0.95);
    border: 1px solid rgba(137, 255, 182, 0.55);
    color: #ebffef;
}

.toast-error {
    background: rgba(171, 52, 52, 0.94);
    border: 1px solid rgba(255, 157, 157, 0.55);
    color: #fff1f1;
}

.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: rgba(255, 255, 255, 0.05);
    animation: spin 0.9s linear infinite;
    vertical-align: -1px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1000px) {
    .title-wrap,
    .top-actions {
        float: none;
        width: 100%;
        text-align: left;
    }

    .top-actions {
        margin-top: 10px;
    }

    .wallet-pill,
    .top-actions .btn {
        margin-top: 8px;
    }

    .roulette-col {
        width: 50%;
    }
}

@media (max-width: 700px) {
    .roulette-col {
        width: 100%;
    }

    .role-row {
        display: block;
    }

    .role-row select {
        width: 100%;
        margin-bottom: 8px;
    }

    .role-row .btn {
        margin-left: 0;
        width: 100%;
    }
}

/* Fix contraste do select de personagens */
.role-row select {
    color: #f3e2b2 !important;
    background-color: #0b1427 !important;
}
.role-row select option {
    color: #f5f7ff !important;
    background-color: #0b1427 !important;
}
.role-row select:focus {
    color: #ffe5a0 !important;
}

