/* =====================================================================
 * Snubblz Dashboard v1 - standalone (no Shopware involvement)
 * Pre-launch state. Honest empty cards, no fake "connected" status.
 * Sized for 1200px content max, responsive down to mobile.
 * ===================================================================== */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0a0a1e;
    color: #ffffff;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* === NAV BAR === */
.sn-d-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
}

.sn-d-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.sn-d-nav-links {
    display: flex;
    gap: 2rem;
}

.sn-d-nav-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.sn-d-nav-links a:hover { color: #ffffff; }

.sn-d-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sn-d-lang {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.88rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
}

.sn-d-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.15s ease;
}

.sn-d-account-btn:hover {
    background: rgba(126, 236, 200, 0.12);
    color: #7eecc8;
}

/* === MAIN WRAPPER === */
.sn-d-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem 1.5rem;
}

/* === HERO === */
.sn-d-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    align-items: end;
    padding: 1rem 0 2.5rem 0;
}

.sn-d-greeting {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.6rem 0;
    color: #ffffff;
    letter-spacing: -0.015em;
}

.sn-d-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    max-width: 540px;
}

.sn-d-status {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.7rem 1.25rem;
}

.sn-d-status[data-state="awaiting"] .sn-d-status-dot {
    background: rgba(255, 213, 100, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 213, 100, 0.15);
}

.sn-d-status-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
}

.sn-d-status-title {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.2;
}

.sn-d-status-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0.1rem;
}

.sn-d-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.sn-d-hero-price {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .sn-d-hero { grid-template-columns: 1fr; }
    .sn-d-hero-cta { align-items: flex-start; }
    .sn-d-greeting { font-size: 2rem; }
}

/* === CARDS === */
.sn-d-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.sn-d-card-h {
    margin: 0 0 1.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.005em;
}

.sn-d-card-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a78bff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.85rem;
}

.sn-d-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.sn-d-card-level {
    color: #7eecc8;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

/* === ROW === */
.sn-d-row {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.sn-d-row--two { grid-template-columns: 1fr 1fr; }
.sn-d-row .sn-d-card { margin-bottom: 0; }

@media (max-width: 900px) {
    .sn-d-row--two { grid-template-columns: 1fr; }
}

/* === COMPANION === */
.sn-d-companion-art {
    margin: 0 -0.25rem 1.25rem -0.25rem;
    border-radius: 16px;
    overflow: hidden;
    background: #1c1c33;
}

.sn-d-companion-art img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.sn-d-companion-blurb {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0 0 1.25rem 0;
}

.sn-d-companion-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* === RITUAL === */
.sn-d-ritual-time {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: -0.02em;
}

.sn-d-ritual-pred {
    color: rgba(255, 255, 255, 0.65);
    margin: 0.5rem 0 1.25rem 0;
    font-size: 0.95rem;
}

.sn-d-ritual-state {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.sn-d-state-title { font-weight: 600; }
.sn-d-state-sub { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; margin-top: 0.15rem; }

/* === BUTTONS === */
.sn-d-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    border: none;
    text-decoration: none;
}

.sn-d-btn--primary {
    background: #7eecc8;
    color: #0a0a1e;
}

.sn-d-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(126, 236, 200, 0.28);
}

.sn-d-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sn-d-btn--ghost:hover {
    background: rgba(126, 236, 200, 0.08);
    color: #7eecc8;
    border-color: rgba(126, 236, 200, 0.3);
}

.sn-d-btn--disabled {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    width: 100%;
    justify-content: center;
}

.sn-d-btn--disabled:hover { transform: none; box-shadow: none; }

/* === WEEK === */
.sn-d-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr) 1.5fr;
    gap: 1rem;
    align-items: center;
}

.sn-d-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.sn-d-day-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.sn-d-day-dot {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sn-d-day-dot--idle {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.sn-d-week-summary {
    padding-left: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sn-d-week-headline {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.3;
}

.sn-d-week-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin: 0.4rem 0 0 0;
}

@media (max-width: 900px) {
    .sn-d-week-grid { grid-template-columns: repeat(4, 1fr); }
    .sn-d-week-summary {
        grid-column: 1 / -1;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
}

/* === ROUTINE === */
.sn-d-routine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) { .sn-d-routine-grid { grid-template-columns: 1fr; } }

.sn-d-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
}

.sn-d-stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(167, 139, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.85rem;
}

.sn-d-stat-icon--star {
    background: rgba(255, 213, 100, 0.12);
    color: #ffd564;
}

.sn-d-stat-icon--plant { background: rgba(126, 236, 200, 0.12); }

.sn-d-stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.sn-d-stat-value {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.sn-d-stat--empty .sn-d-stat-value {
    color: rgba(255, 255, 255, 0.25);
}

.sn-d-stat-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    margin: 0.7rem 0 0 0;
}

/* === RECENT (empty state) === */
.sn-d-recent-empty,
.sn-d-device-empty {
    text-align: center;
    padding: 1.5rem 0;
}

.sn-d-recent-empty svg,
.sn-d-device-empty svg {
    margin-bottom: 1rem;
    opacity: 0.6;
}

.sn-d-recent-empty-title,
.sn-d-device-empty-title {
    color: #ffffff;
    font-weight: 600;
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
}

.sn-d-recent-empty-sub,
.sn-d-device-empty-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0 0 1.25rem 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* === SETTINGS === */
.sn-d-settings-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

@media (max-width: 900px) { .sn-d-settings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sn-d-settings-grid { grid-template-columns: 1fr; } }

.sn-d-setting {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 1.1rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: #ffffff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sn-d-setting:hover {
    background: rgba(126, 236, 200, 0.06);
    border-color: rgba(126, 236, 200, 0.2);
}

.sn-d-setting--logout { color: #ff8a8a; }
.sn-d-setting--logout:hover {
    background: rgba(255, 138, 138, 0.06);
    border-color: rgba(255, 138, 138, 0.2);
}

.sn-d-setting-icon {
    font-size: 1.15rem;
    flex: 0 0 1.5rem;
}

.sn-d-setting strong {
    display: block;
    font-size: 0.93rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.sn-d-setting em {
    font-style: normal;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.sn-d-setting--logout em { color: rgba(255, 138, 138, 0.55); }

/* === FOOTER === */
.sn-d-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sn-d-footer p { margin: 0.3rem 0; }
.sn-d-footer a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* === RTL support for Arabic === */
html[dir="rtl"] .sn-d-nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .sn-d-nav { flex-direction: row-reverse; }
html[dir="rtl"] .sn-d-hero-cta { align-items: flex-start; }
html[dir="rtl"] .sn-d-card-label { flex-direction: row-reverse; justify-content: flex-end; }

/* v2 additions 2026-06-10: real OLED sprite + live mode */
.sn-d-oled{display:flex;justify-content:center;align-items:center;padding:16px 0}
.sn-d-oled img{image-rendering:pixelated;width:256px;height:128px;background:#06050A;
  border-radius:10px;padding:14px 18px;box-sizing:content-box;
  box-shadow:inset 0 0 0 1px rgba(184,173,219,.25),0 0 34px rgba(158,224,196,.16)}
.sn-d-live-badge{position:fixed;top:14px;right:14px;z-index:1200;background:rgba(158,224,196,.15);
  border:1px solid rgba(158,224,196,.5);color:#9EE0C4;font-size:12px;letter-spacing:.4px;
  padding:6px 12px;border-radius:999px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.sn-d-live-line{color:#9EE0C4;font-size:13px;margin-top:8px}
.sn-d-dream-line{color:#B8ADDB;font-style:italic}
