/* ============================================================
   Mission Control — mc.rjk.de
   Dark Command Center Theme
   ============================================================ */

:root {
    --bg-main:    #0a0a14;
    --bg-card:    #12121f;
    --bg-card2:   #1a1a2e;
    --bg-input:   #0d1b2a;
    --bg-modal:   rgba(0,0,0,0.8);
    --border:     #1e2a3a;
    --border-glow: #1a3a5c;
    --accent:     #0f3460;
    --accent2:    #1a5276;
    --text:       #e0e0e0;
    --text-dim:   #6b7a8d;
    --text-bright:#ffffff;
    --green:      #00e676;
    --green-dim:  #00c853;
    --green-bg:   rgba(0,230,118,0.08);
    --red:        #ff1744;
    --red-bg:     rgba(255,23,68,0.08);
    --blue:       #2979ff;
    --blue-bg:    rgba(41,121,255,0.08);
    --gold:       #ffc107;
    --gold-bg:    rgba(255,193,7,0.08);
    --purple:     #aa66cc;
    --purple-bg:  rgba(170,102,204,0.08);
    --cyan:       #00e5ff;
    --radius:     10px;
    --radius-sm:  6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-main);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* --- Login Screen --- */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0,230,118,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(41,121,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(15,52,96,0.3) 0%, var(--bg-main) 70%);
}
.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(0,230,118,0.03);
}
.login-box h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}
.login-box .logo { font-size: 2.4rem; margin-bottom: 16px; }
.login-box .sub { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 32px; }
.login-box input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-box input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,230,118,0.1); }
.login-box .error { color: var(--red); font-size: 0.85rem; margin-bottom: 12px; min-height: 1.2em; }

/* --- Layout --- */
.container { max-width: 1600px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* --- Header --- */
header {
    background: linear-gradient(180deg, rgba(18,18,31,0.95) 0%, rgba(10,10,20,0.9) 100%);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.3px; }
.header-left .status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,230,118,0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(0,230,118,0); }
}
.header-right { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-dim); }
.header-right .badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gold { background: var(--gold-bg); color: var(--gold); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }

.privacy-toggle {
    cursor: pointer; padding: 4px 10px; border-radius: 6px;
    background: var(--bg-card2); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.8rem; transition: all 0.2s;
}
.privacy-toggle:hover { border-color: var(--blue); color: var(--text); }
.privacy-toggle.active { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }

/* --- Module Grid --- */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
    padding: 16px 0 32px;
}

/* --- Module Card --- */
.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.module-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.module-card.wide { grid-column: span 2; }

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--border);
}
.card-header .title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-dim);
}
.card-header .title .icon { font-size: 1rem; }
.card-body { padding: 14px 18px 18px; }

/* --- Status indicators --- */
.status-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.status-row:last-child { border-bottom: none; }
.status-label { font-size: 0.85rem; color: var(--text-dim); }
.status-value { font-size: 0.85rem; font-weight: 500; }

.status-dot-inline {
    width: 7px; height: 7px; border-radius: 50%;
    display: inline-block; margin-right: 6px;
}
.dot-ok { background: var(--green); box-shadow: 0 0 6px rgba(0,230,118,0.3); }
.dot-warn { background: var(--gold); box-shadow: 0 0 6px rgba(255,193,7,0.3); }
.dot-error { background: var(--red); box-shadow: 0 0 6px rgba(255,23,68,0.3); }
.dot-off { background: var(--text-dim); }

/* --- Progress Bars --- */
.progress-bar {
    height: 6px; background: var(--bg-card2); border-radius: 3px;
    overflow: hidden; width: 100%;
}
.progress-fill {
    height: 100%; border-radius: 3px; transition: width 0.5s ease;
}
.progress-fill.green { background: linear-gradient(90deg, #00c853, #00e676); }
.progress-fill.gold { background: linear-gradient(90deg, #ff9800, #ffc107); }
.progress-fill.red { background: linear-gradient(90deg, #d32f2f, #ff1744); }

/* --- Empty states --- */
.empty-state {
    text-align: center; padding: 20px 8px; color: var(--text-dim); font-size: 0.85rem;
}
.empty-icon { font-size: 1.8rem; margin-bottom: 6px; opacity: 0.4; }

/* --- Mini Badges --- */
.mini-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.mini-badge.green { background: var(--green-bg); color: var(--green); }
.mini-badge.gold { background: var(--gold-bg); color: var(--gold); }
.mini-badge.red { background: var(--red-bg); color: var(--red); }
.mini-badge.dim { background: rgba(255,255,255,0.04); color: var(--text-dim); }

/* --- Schedule Badges --- */
.sched-badge {
    font-size: 0.65rem; padding: 1px 6px; border-radius: 4px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-loop { background: rgba(0,230,118,0.1); color: var(--green-dim); }
.badge-daily { background: rgba(41,121,255,0.1); color: var(--blue); }
.badge-weekly { background: rgba(170,102,204,0.1); color: var(--purple); }

/* --- Task list --- */
.task-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 5px 0; font-size: 0.85rem;
}
.task-item.done { color: var(--text-dim); text-decoration: line-through; }
.task-check { flex-shrink: 0; margin-top: 2px; }
.due-date { color: var(--text-dim); font-size: 0.75rem; }

/* --- Weather --- */
.weather-main { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.weather-temp {
    font-size: 2.8rem; font-weight: 700; letter-spacing: -2px; line-height: 1;
    background: linear-gradient(135deg, var(--text-bright) 30%, var(--gold) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.weather-deg { font-size: 1.2rem; letter-spacing: 0; }
.weather-desc { font-size: 0.85rem; color: var(--text-dim); }
.weather-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.weather-stat {
    text-align: center; padding: 8px 4px;
    background: var(--bg-card2); border-radius: var(--radius-sm);
}
.weather-stat .val { font-size: 1rem; font-weight: 600; }
.weather-stat .lbl { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; }
.uv-extreme { color: var(--red) !important; }
.uv-high { color: #ff6d00 !important; }
.uv-mod { color: var(--gold) !important; }
.uv-low { color: var(--green) !important; }

/* Hour forecast */
.hour-forecast {
    display: flex; gap: 4px; margin-top: 10px; overflow-x: auto;
    padding-bottom: 4px;
}
.hour-item {
    text-align: center; padding: 6px 8px; min-width: 52px;
    background: var(--bg-card2); border-radius: var(--radius-sm);
    font-size: 0.75rem;
}
.hour-time { color: var(--text-dim); font-size: 0.7rem; }
.hour-temp { font-weight: 600; font-size: 0.9rem; }
.hour-rain { color: var(--blue); font-size: 0.7rem; }

/* --- BTC Fear & Greed Gauge --- */
.fg-gauge {
    height: 8px; border-radius: 4px; position: relative;
    background: linear-gradient(90deg, #d32f2f 0%, #ff6d00 25%, #ffc107 50%, #66bb6a 75%, #00e676 100%);
    overflow: visible;
}
.fg-fill {
    position: absolute; top: 0; left: 0; height: 100%; border-radius: 4px;
    background: transparent;
}
.fg-marker {
    position: absolute; top: -4px; width: 4px; height: 16px;
    background: var(--text-bright); border-radius: 2px;
    transform: translateX(-2px);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* --- Calendar --- */
.cal-event {
    display: grid; grid-template-columns: 70px 50px 1fr;
    gap: 8px; padding: 6px 0; font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    align-items: center;
}
.cal-event:last-child { border-bottom: none; }
.cal-date { font-weight: 500; }
.cal-time { color: var(--text-dim); font-size: 0.8rem; }
.cal-title { font-weight: 500; }

/* --- Travel --- */
.travel-location { margin-bottom: 12px; }
.travel-loc-text { font-size: 1.1rem; font-weight: 600; color: var(--green); }
.flight-card {
    display: flex; align-items: center; gap: 8px; margin-top: 12px;
    padding: 10px 12px; background: var(--bg-card2); border-radius: var(--radius-sm);
    border-left: 3px solid var(--blue); font-size: 0.85rem;
}

/* --- Timeline --- */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding: 6px 0; font-size: 0.85rem; }
.timeline-item::before {
    content: ''; position: absolute; left: -17px; top: 12px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border); border: 2px solid var(--bg-card);
}
.timeline-item.active::before { background: var(--green); box-shadow: 0 0 8px rgba(0,230,118,0.4); }
.timeline-item.upcoming::before { background: var(--blue); }
.timeline-item.past { opacity: 0.4; }
.timeline-date { font-size: 0.75rem; color: var(--text-dim); }
.timeline-label { font-weight: 500; }

/* --- Telegram --- */
.tg-msg {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.8rem;
}
.tg-msg:last-child { border-bottom: none; }
.tg-dir { flex-shrink: 0; }
.tg-in { color: var(--blue); }
.tg-out { color: var(--green); }
.tg-time { color: var(--text-dim); font-size: 0.75rem; white-space: nowrap; }
.tg-text { flex: 1; }

/* --- Trading --- */
.link-finance {
    color: var(--blue); font-size: 0.8rem; text-decoration: none;
    transition: color 0.2s;
}
.link-finance:hover { color: var(--cyan); }

/* --- Ticker/Numbers --- */
.big-number {
    font-size: 1.8rem; font-weight: 700; letter-spacing: -1px; line-height: 1.2;
}
.number-label {
    font-size: 0.75rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.number-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
.number-cell {
    text-align: center; padding: 12px 8px;
    background: var(--bg-card2); border-radius: var(--radius-sm);
}

/* --- Privacy blur --- */
.privacy-hide { transition: filter 0.3s; }
body.privacy-on .privacy-hide {
    filter: blur(8px); user-select: none; pointer-events: none;
}

/* --- Scrollable card body --- */
.card-body-scroll {
    max-height: 300px; overflow-y: auto; padding: 14px 18px 18px;
}
.card-body-scroll::-webkit-scrollbar { width: 4px; }
.card-body-scroll::-webkit-scrollbar-track { background: transparent; }
.card-body-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .module-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
    .module-card.wide { grid-column: span 1; }
}
@media (max-width: 768px) {
    .module-grid { grid-template-columns: 1fr; gap: 10px; }
    .module-card.wide { grid-column: span 1; }
    .header-inner { flex-wrap: wrap; }
    .header-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .module-grid { grid-template-columns: 1fr; }
    .weather-grid { grid-template-columns: repeat(2, 1fr); }
    .container { padding: 0 10px; }
    .cal-event { grid-template-columns: 55px 45px 1fr; font-size: 0.8rem; }
}
