/* dashboard.css */

/* --- Cosmic glassmorphism (utility; license panel overrides below) --- */
.glass-card {
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 22px;
    box-shadow:
        0 0 24px rgba(0, 240, 255, 0.1),
        0 0 48px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(0, 240, 255, 0.12),
        inset 0 0 40px rgba(0, 240, 255, 0.04);
}

.license-manager-panel.glass-card {
    padding: 28px 32px 26px;
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.5));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.6),
        0 16px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pro-panel {
    position: relative;
    overflow: hidden;
}

.pro-panel::before {
    content: "";
    position: absolute;
    inset: -40% 55% auto -20%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.12), transparent 65%);
    pointer-events: none;
}

.license-manager-panel {
    margin-bottom: 36px;
}

/* --- Settings tab: cosmic / sci-fi glass (shell + section cards) --- */
#panelSettings.settings-panel.glass-card,
#panelSettings .settings-section-glass.glass-card {
    background: rgba(10, 15, 30, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
}

#panelSettings.settings-panel.glass-card {
    padding: 28px 28px 32px;
    max-width: 760px;
}

#panelSettings .settings-panel-intro {
    margin-bottom: 24px;
    padding: 0 4px 4px;
}

#panelSettings .settings-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e8faff;
    text-shadow:
        0 0 12px rgba(0, 240, 255, 0.55),
        0 0 28px rgba(0, 240, 255, 0.25);
}

#panelSettings .settings-sections-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#panelSettings .settings-section-glass {
    padding: 24px 32px;
}

/* Kill global `section { margin-top }` from style.css inside settings cards */
#panelSettings .settings-section {
    margin: 0;
    padding: 0;
    border-top: none;
}

#panelSettings .settings-section-title,
#panelSettings .settings-section-glass h2,
#panelSettings .settings-section-glass h3,
#panelSettings .settings-section-glass h4 {
    margin-top: 0;
}


#panelSettings .settings-footer {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 240, 255, 0.12);
}

.license-manager-panel-inner {
    position: relative;
    z-index: 1;
    padding: 0;
}

.license-manager-panel-head {
    margin-bottom: 4px;
}

.license-manager-title {
    margin: 0 !important;
}

.license-credits-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    margin: 18px 0 6px;
}

.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.credit-badge-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.92;
}

.credit-badge-value {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    min-width: 1.25em;
}

.credit-badge--plus {
    color: #d1fae5;
    background: linear-gradient(145deg, rgba(6, 78, 59, 0.55), rgba(15, 23, 42, 0.65));
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.12);
}

.credit-badge--pro {
    color: #fef3c7;
    background: linear-gradient(145deg, rgba(120, 53, 15, 0.5), rgba(15, 23, 42, 0.7));
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow:
        0 0 28px rgba(251, 191, 36, 0.28),
        0 0 56px rgba(245, 158, 11, 0.1),
        inset 0 1px 0 rgba(253, 230, 138, 0.1);
}

.license-manager-cta {
    margin-left: auto;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .license-manager-cta {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* Server bundles: fluid columns so cards don’t collapse off-screen */
.shop-bundles-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.license-grid .pricing-card {
    position: relative;
    min-height: 100%;
}

.license-grid .pricing-card--featured {
    position: relative;
    padding-top: 22px;
}

.license-grid .pricing-card-header,
.license-grid .pricing-card--featured .pricing-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    padding-right: 0;
}

.license-grid .pricing-card-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Text pill — top-center on card border (not the mascot image) */
.license-grid .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    white-space: nowrap;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #022c22;
    border: 1px solid rgba(134, 239, 172, 0.65);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.35),
        0 6px 18px rgba(34, 197, 94, 0.45);
    pointer-events: none;
}

.license-grid .pricing-card--current-plan {
    border-color: rgba(125, 211, 252, 0.75);
    background: radial-gradient(
        circle at top,
        rgba(56, 189, 248, 0.18),
        rgba(15, 23, 42, 0.98)
    );
    box-shadow:
        0 0 0 1px rgba(125, 211, 252, 0.45),
        0 0 28px rgba(56, 189, 248, 0.22),
        0 18px 40px rgba(15, 23, 42, 0.55);
}

.license-grid .pricing-card--current-plan.pricing-card--featured {
    border-color: rgba(125, 211, 252, 0.85);
    background: radial-gradient(
        circle at top,
        rgba(56, 189, 248, 0.22),
        rgba(15, 23, 42, 0.98)
    );
}

.license-grid .pricing-btn--current {
    background: #475569 !important;
    border: none !important;
    color: #e2e8f0 !important;
    cursor: default;
    box-shadow: none !important;
    opacity: 1;
}

.license-grid .pricing-btn--current:disabled {
    opacity: 1;
}

/* Server bundles grid empty state */
.shop-grid-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-radius: 18px;
    border: 1px dashed rgba(100, 116, 139, 0.45);
    background: rgba(15, 23, 42, 0.35);
}

/* --- Pro Analytics Suite (premium polish) --- */
.pro-analytics-panel {
    padding-bottom: 8px;
}
.pro-analytics-hero {
    margin-bottom: 28px;
}
.pro-analytics-title {
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 45%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(148, 163, 184, 0.35);
}
.pro-analytics-sub {
    max-width: 720px;
    line-height: 1.5;
}

.pro-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
@media (max-width: 720px) {
    .pro-summary-row {
        grid-template-columns: 1fr;
    }
}

.pro-summary-card {
    position: relative;
    border-radius: 20px;
    padding: 22px 22px 20px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.75));
    border: 1px solid rgba(100, 116, 139, 0.35);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 32px rgba(59, 130, 246, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pro-summary-card:hover {
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow:
        0 0 0 1px rgba(30, 58, 138, 0.25),
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59, 130, 246, 0.12);
}
.pro-summary-card--accent {
    border-color: rgba(52, 211, 153, 0.25);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 36px rgba(52, 211, 153, 0.1);
}
.pro-summary-card--accent:hover {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow:
        0 0 0 1px rgba(6, 78, 59, 0.35),
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 44px rgba(52, 211, 153, 0.14);
}

.pro-summary-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.pro-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}
.pro-summary-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.pro-summary-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-soft);
    line-height: 1.35;
}

/* Tooltip (Economy ratio) */
.pro-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    color: #a5b4fc;
    border: 1px solid rgba(129, 140, 248, 0.45);
    background: rgba(67, 56, 202, 0.25);
    cursor: help;
    position: relative;
}
.pro-tooltip-trigger:hover,
.pro-tooltip-trigger:focus-visible {
    outline: none;
    border-color: rgba(165, 180, 252, 0.85);
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.45);
}
.pro-tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) scale(0.96);
    width: min(280px, 72vw);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(100, 116, 139, 0.5);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(59, 130, 246, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 30;
}
.pro-tooltip-trigger:hover::after,
.pro-tooltip-trigger:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.pro-section {
    margin-bottom: 36px;
}
.pro-section-heading {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}
.pro-section-heading--inset {
    padding: 0 4px 12px;
}
.pro-section-sub {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.45;
}
.pro-section-sub--tight {
    margin-bottom: 12px;
}

.pro-activity-bars.analytics-bars {
    height: 160px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.35));
    border-color: rgba(71, 85, 105, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.pro-activity-bars .analytics-bar {
    background: linear-gradient(180deg, #34d399, #059669);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.25);
}

.pro-citizens-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pro-citizens-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px dashed rgba(100, 116, 139, 0.4);
    background: rgba(15, 23, 42, 0.35);
}
.pro-citizen-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.45);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.06);
}
.pro-citizen-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.pro-citizen-id {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}
.pro-citizen-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pro-terminal-table {
    margin-top: 8px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(71, 85, 105, 0.5);
    box-shadow: 0 0 32px rgba(15, 23, 42, 0.6);
}
.pro-audit-box {
    margin-bottom: 0;
}
.pro-table-wrap {
    padding: 20px 20px 24px;
}
.pro-data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.pro-data-table thead tr {
    border-bottom: 1px solid var(--border);
}
.pro-data-table th {
    padding: 0 8px 12px 0;
    font-weight: 600;
    color: var(--text-soft);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pro-data-table td {
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.45);
    vertical-align: top;
}
.pro-data-table tr:last-child td {
    border-bottom: none;
}
.pro-data-table-num {
    text-align: right;
}
.pro-table-empty {
    text-align: center;
    color: #64748b;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}
.pro-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
}
.pro-audit-detail {
    word-break: break-word;
    max-width: 280px;
}

/* Pro analytics tabs */
.detail-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.detail-tab {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    cursor: pointer;
}
.detail-tab:hover {
    color: var(--text-main);
    border-color: rgba(148, 163, 184, 0.4);
}
.detail-tab--active {
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.12);
}

/* My Player Profile — grouped inventory sections */
.inv-profile-stack {
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.inv-profile-group {
    margin: 0;
}
.inv-profile-group-title {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.inv-profile-group--void .inv-profile-group-title {
    color: #a5b4fc;
    border-bottom-color: rgba(99, 102, 241, 0.35);
}

.license-upgrade-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.btn-upgrade {
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.08s ease,
        filter 0.15s ease;
    white-space: nowrap;
}
.btn-upgrade:active {
    transform: translateY(1px);
}
.btn-upgrade.plus {
    background: var(--accent);
    color: #020617;
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(52, 211, 153, 0.3);
}
.btn-upgrade.plus:hover {
    background: #6ee7b7;
    border-color: #6ee7b7;
}
.btn-upgrade.pro {
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
    color: #f8fafc;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}
.btn-upgrade.pro:hover {
    filter: brightness(1.08);
}

.analytics-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 140px;
    padding: 12px 8px 0;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.analytics-bar-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.analytics-bar {
    width: 100%;
    max-width: 36px;
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    transition: height 0.2s ease;
}
.analytics-bar-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    white-space: nowrap;
}

/* === STICKY FOOTER FIX + seamless page background === */
html {
    min-height: 100vh;
    margin: 0;
}

html,
body {
    height: auto;
    min-height: 100vh;
    margin: 0;
}

body {
    overflow-x: hidden;
    /* Solid base matches gradient stops so nothing flashes or “seams” behind panels */
    background-color: #020617;
}

/* Override the default .page style to be a flex container */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Force it to be at least the full screen height */
}

/* This makes the middle section grow to fill empty space, pushing footer down */
.dashboard-container {
    flex: 1; 
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding-top: 40px; 
    padding-bottom: 60px;
}

/* === Login Screen === */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background: radial-gradient(circle at center, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
    border-radius: 32px;
    border: 1px solid var(--border);
    margin-top: 20px;
}

/* === Server List (Guilds) === */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.guild-section-heading {
    margin: 36px 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.guild-section-sub {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 640px;
}

.guild-section-sub--tight {
    margin-top: 4px;
}

.guild-invite-section {
    margin-top: 48px;
    padding-top: 8px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.guild-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.guild-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.guild-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #0f172a;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.guild-info {
    overflow: hidden;
    white-space: nowrap;
}

.guild-info-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.guild-info h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-license-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    flex-shrink: 0;
}

.guild-license-pill--basic {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.guild-license-pill--plus {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(125, 211, 252, 0.45);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.guild-license-pill--pro {
    color: #fde68a;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.25);
}

.guild-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.guild-arrow {
    color: var(--text-soft);
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.guild-card:hover .guild-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

.guild-card-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.btn-invite-pebble {
    white-space: nowrap;
    padding: 8px 16px;
}

.guild-card--invite {
    opacity: 0.88;
    cursor: default;
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.42);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        opacity 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.guild-card--invite:hover {
    opacity: 1;
    transform: translateY(-6px) scale(1.02);
    border-style: dashed;
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(30, 41, 59, 0.55);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}

.guild-card--invite .btn-invite-pebble {
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.25);
}

.guild-card--invite .btn-invite-pebble:hover {
    transform: translateY(-1px);
}

/* === Dashboard Detail View === */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.detail-title h2 { margin: 0; font-size: 1.8rem; }
.detail-title span { font-size: 0.9rem; color: var(--text-muted); margin-left: 10px; }

/* === Status Indicator (Red/Green Dot) === */
.status-indicator-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.status-indicator-link:hover {
  opacity: 0.85;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #64748b; /* Gray default */
    transition: all 0.3s ease;
}

.status-online {
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
}
.status-online .status-dot {
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

.status-offline {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}
.status-offline .status-dot {
    background-color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
}

/* === Stats Cards === */
.stat-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-main); }
.stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: auto; }

.mascot-row { display: flex; align-items: center; gap: 16px; }
.mascot-thumb { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); }

/* === Terminal / JSON Box === */
.terminal-box {
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.terminal-header {
    background: rgba(30, 41, 59, 0.5);
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
#d_json {
    margin: 0; padding: 20px; color: #6ee7b7; font-family: monospace; font-size: 0.8rem;
    overflow-x: auto; display: none;
}
#d_json.open { display: block; }

/* === Error Box === */
#errorBox {
    display: none;
    padding: 16px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
    border-radius: 12px;
    text-align: center;
}

/* Mobile menu: shared rules live in style.css (.nav-mobile, .nav-mobile button.mobile-item). */

/* --- Server settings tab --- */
.settings-panel {
    padding-bottom: 24px;
}

.settings-panel-intro {
    margin-bottom: 28px;
}

.settings-panel-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

.settings-panel-sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 56ch;
}

#panelSettings .settings-panel-sub {
    color: rgba(186, 230, 253, 0.72);
}

.settings-section {
    padding: 22px 0;
    border-top: 1px solid rgba(100, 116, 139, 0.28);
}

.settings-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.settings-section--locked {
    opacity: 0.72;
}

.settings-section-head {
    margin-bottom: 16px;
}

.settings-section-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#panelSettings .settings-section-glass .settings-section-title {
    color: #e0ffff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.pro-badge {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    text-shadow: none;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.2;
}

.settings-section-desc {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-soft);
}

#panelSettings .settings-section-desc {
    color: rgba(186, 230, 253, 0.62);
}

.settings-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 560px) {
    .settings-grid-2 {
        grid-template-columns: 1fr;
    }
}

.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}

#panelSettings .settings-label {
    color: rgba(165, 243, 252, 0.75);
}

#panelSettings input[type="time"],
#panelSettings select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-top: 12px;
}

#panelSettings .settings-grid-2,
#panelSettings .settings-stack,
#panelSettings .settings-switch-row {
    margin-top: 12px;
}

#panelSettings .settings-field {
    gap: 0;
}

#panelSettings select {
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, rgba(0, 240, 255, 0.75) 50%),
        linear-gradient(135deg, rgba(0, 240, 255, 0.75) 50%, transparent 50%);
    background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.6);
    padding-right: 32px;
}

#panelSettings input[type="time"]:focus,
#panelSettings select:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
    outline: none;
}

.settings-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.settings-range {
  flex: 1;
  min-width: 160px;
  accent-color: var(--accent, #38bdf8);
}

.settings-slider-meta {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 3.5rem;
  font-size: 0.95rem;
}

.settings-input,
.settings-select {
    font: inherit;
    font-size: 0.95rem;
    color: #f8fafc;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.settings-input:focus,
.settings-select:focus {
    border-color: rgba(0, 240, 255, 0.85);
    box-shadow:
        0 0 0 1px rgba(0, 240, 255, 0.35),
        0 0 20px rgba(0, 240, 255, 0.22);
    background: rgba(0, 0, 0, 0.58);
}

.settings-input::placeholder {
    color: rgba(148, 163, 184, 0.75);
}

.settings-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.settings-select {
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, rgba(0, 240, 255, 0.7) 50%),
        linear-gradient(135deg, rgba(0, 240, 255, 0.7) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

/* time inputs: restore legible picker where browsers honor color-scheme */
.settings-input::-webkit-calendar-picker-indicator {
    filter: invert(0.85) sepia(1) saturate(5) hue-rotate(130deg);
    opacity: 0.85;
    cursor: pointer;
}

.settings-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.settings-switch-row .settings-label,
.settings-switch-text {
    margin: 0;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

#panelSettings .settings-switch-text {
    color: #e8faff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.settings-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.settings-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#panelSettings .settings-switch input[type="checkbox"] {
    position: relative;
    opacity: 1;
    width: 44px;
    height: 24px;
    margin: 0;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    outline: none;
    transition: 0.3s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#panelSettings .settings-switch input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: 0.3s;
    box-sizing: border-box;
}

#panelSettings .settings-switch input[type="checkbox"]:checked {
    background: rgba(0, 240, 255, 0.4);
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

#panelSettings .settings-switch input[type="checkbox"]:checked::after {
    transform: translateX(20px);
    background: #00f0ff;
    box-shadow: 0 0 10px #00f0ff;
}

.settings-switch-track {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
    vertical-align: middle;
}

.settings-switch-track::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #cbd5e1, #64748b);
    transform: translate(0, -50%);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.settings-switch input:checked + .settings-switch-track {
    background: rgba(0, 240, 255, 0.22);
    border-color: rgba(0, 240, 255, 0.95);
    box-shadow:
        0 0 16px rgba(0, 240, 255, 0.55),
        0 0 32px rgba(0, 240, 255, 0.35),
        inset 0 0 12px rgba(0, 240, 255, 0.25);
}

.settings-switch input:checked + .settings-switch-track::after {
    transform: translate(22px, -50%);
    background: #ecfeff;
    box-shadow:
        0 0 14px rgba(0, 240, 255, 0.95),
        0 0 24px rgba(0, 240, 255, 0.55);
}

.settings-switch input:focus-visible + .settings-switch-track {
    box-shadow:
        0 0 0 2px rgba(0, 240, 255, 0.35),
        0 0 20px rgba(0, 240, 255, 0.2);
}

.settings-switch input:focus-visible:checked + .settings-switch-track {
    box-shadow:
        0 0 0 2px rgba(0, 240, 255, 0.45),
        0 0 24px rgba(0, 240, 255, 0.5),
        0 0 40px rgba(0, 240, 255, 0.3);
}

.settings-hint {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--text-soft);
    line-height: 1.45;
}

#panelSettings .settings-hint {
    color: rgba(148, 213, 224, 0.65);
}

.settings-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(100, 116, 139, 0.28);
}

.settings-save-btn {
    min-width: 160px;
    color: #042024 !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #5ef3ff, #22d3ee) !important;
    border: 1px solid rgba(0, 240, 255, 0.75) !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    animation: settings-save-pulse 2.4s ease-in-out infinite;
    transition:
        box-shadow 0.25s ease,
        filter 0.25s ease,
        transform 0.2s ease;
}

.settings-save-btn:hover {
    box-shadow:
        0 0 28px rgba(0, 240, 255, 0.65),
        0 0 48px rgba(0, 240, 255, 0.35);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.settings-save-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

@keyframes settings-save-pulse {
    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    }
    50% {
        box-shadow:
            0 0 22px rgba(0, 240, 255, 0.55),
            0 0 36px rgba(0, 240, 255, 0.28);
    }
}

/* Guild-required checkout lock (mirrors pebble.js store-buy--locked) */
.store-buy--locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.35);
    pointer-events: auto;
}

.dashboard-guild-notice {
    margin: 10px 0 12px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    font-size: 0.88rem;
    line-height: 1.45;
}

.dashboard-guild-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
}

.dashboard-guild-overlay[hidden] {
    display: none !important;
}

.dashboard-guild-overlay__panel {
    max-width: 420px;
    width: 100%;
    padding: 24px 28px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.dashboard-guild-overlay__panel h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #fde68a;
}

.dashboard-guild-overlay__panel p {
    margin: 0 0 20px;
    line-height: 1.5;
    color: #cbd5e1;
}