/*
Theme Name: RateRun Theme
Author: RateRun Dev
Description: A lightweight SaaS App Shell.
Version: 2.3.0 (Daily Goal & Mobile Nav)
*/

:root {
    --bg-app: #0f1115;
    --bg-panel: #161b22;
    --border-subtle: #30363d;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --accent-primary: #238636;
    --accent-glow: rgba(35, 134, 54, 0.4);
    --gap: 16px;
    --radius: 12px;
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    overscroll-behavior-y: none;
}

button:active, a.nav-item:active { transform: scale(0.96); opacity: 0.8; transition: transform 0.05s; }

.responsive-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.responsive-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }

.app-grid {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    grid-template-rows: 60px 1fr;
    grid-template-areas: "sidebar header header" "sidebar content tools";
    height: 100vh;
    gap: var(--gap);
    padding: var(--gap);
}

.bento-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    overflow-y: auto;
}

/* --- MOBILE BOTTOM NAV --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-subtle);
    z-index: 2000;
    padding-bottom: env(safe-area-inset-bottom);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-bottom-nav::-webkit-scrollbar {
    display: none;
}

.mobile-bottom-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mobile-bottom-nav .nav-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    min-width: 70px;
    height: 70px;
    padding: 8px 5px;
    flex-shrink: 0;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--accent-primary);
}

/* --- TOASTS --- */
.raterun-toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.raterun-toast { background: var(--bg-panel); border: 1px solid var(--border-subtle); color: var(--text-main); padding: 12px 20px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 10px; min-width: 250px; border-left: 4px solid var(--text-muted); }
.raterun-toast.success { border-left-color: var(--accent-primary); }

@media screen and (max-width: 900px) {
    body { height: auto !important; overflow-y: auto !important; overflow-x: hidden; }
    .app-grid { display: block; height: auto; padding: 0; padding-bottom: 160px; }
    .mobile-bottom-nav { display: flex; }
    header.bento-panel { position: sticky; top: 0; z-index: 50; border-radius: 0; border: none; border-bottom: 1px solid var(--border-subtle); background: rgba(22, 27, 34, 0.95); backdrop-filter: blur(10px); }
    aside[style*="grid-area: sidebar"] { display: none; }
    main.bento-panel { border: none; background: transparent; padding: 15px; }
    .responsive-2-col { grid-template-columns: 1fr !important; }

    /* Floating Timer for Mobile */
    aside[style*="grid-area: tools"] { position: fixed; bottom: 85px; left: 15px; right: 15px; width: auto; z-index: 1000; border-radius: 16px; border: 1px solid var(--accent-primary); box-shadow: 0 5px 30px rgba(0,0,0,0.6); }
}