/* ===== VARIABLES ===== */
:root {
    --red: #ED1C24;
    --red-dark: #c41820;
    --red-glow: rgba(237, 28, 36, 0.15);
    --black: #1a1a1a;
    --grey-900: #2a2a2a;
    --grey-800: #333;
    --grey-600: #666;
    --grey-400: #999;
    --grey-200: #e5e5e5;
    --grey-100: #f0eeeb;
    --grey-50: #fafafa;
    --white: #ffffff;
    --green: #22a822;
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    height: 100%;
}

body { 
    font-family: var(--font-body);
    background: var(--grey-100);
    color: var(--grey-800);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading state - hide content until auth check completes */
body.loading .phone-login,
body.loading .view-login,
body.loading .view-home,
body.loading .desktop-main {
    opacity: 0;
}

body:not(.loading) .phone-login,
body:not(.loading) .view-login,
body:not(.loading) .view-home,
body:not(.loading) .desktop-main {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: var(--red);
    color: var(--white);
}
.toast.visible { opacity: 1; }

/* ===== PIN SCREEN ===== */
.pin-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.pin-screen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
}

.pin-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 32px;
}

.pin-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pin-title {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--grey-400);
    margin-bottom: 28px;
    text-transform: uppercase;
}

.pin-dots {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    border: 2px solid var(--grey-200);
    background: transparent;
    transition: all 0.2s var(--ease-bounce);
}

.pin-dot.filled {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--red-glow);
}

.pin-dot.error {
    border-color: var(--red);
    animation: shake 0.5s var(--ease-out);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.pin-key {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--grey-50);
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 500;
    color: var(--grey-800);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.pin-key:hover { background: var(--grey-100); }
.pin-key:active {
    transform: scale(0.92);
    background: var(--red);
    color: var(--white);
}
.pin-key.empty {
    background: transparent;
    cursor: default;
}
.pin-key.empty:hover { background: transparent; }
.pin-key.delete {
    font-size: 22px;
    color: var(--grey-400);
}
.pin-key.delete:active {
    background: var(--grey-200);
    color: var(--grey-600);
}

.pin-error-msg {
    font-size: 14px;
    font-weight: 500;
    color: var(--red);
    margin-top: 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s var(--ease-out);
}
.pin-error-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

.pin-footer-logo {
    height: 24px;
    width: auto;
    margin-top: 40px;
    opacity: 0.6;
}
/* ===== LOGIN STYLES ===== */

/* Phone Login */
.phone-login {
    display: none;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
}

.phone-login .login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Login View */
.view-login {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

/* Login Container - mirrors home-state layout */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.login-left {
    flex: 0 0 auto;
}

.login-hello-img {
    width: 280px;
    height: auto;
}

.login-right {
    flex: 1;
    max-width: 576px;
}

/* Login States */
.login-state {
    width: 100%;
}

.login-state.hidden {
    display: none;
}

/* Sent state styling */
.login-message {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: var(--grey-800);
    margin: 0 0 20px 0;
}

.login-retry-btn {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 14px 28px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-retry-btn:hover {
    background: var(--red-dark);
    transform: scale(1.02);
}

.login-retry-btn:active {
    transform: scale(0.98);
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-email {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    padding: 16px 24px;
    border: 2px solid var(--grey-200);
    border-radius: var(--radius-full);
    outline: none;
    background: var(--white);
    transition: all 0.2s var(--ease-out);
}

.login-email:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-glow);
}

.login-email::placeholder {
    color: var(--grey-400);
    font-weight: 400;
}

.login-btn {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 16px 32px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-btn:hover {
    background: var(--red-dark);
    transform: scale(1.02);
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    background: var(--grey-400);
    cursor: not-allowed;
    transform: none;
}

.login-error {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #ED1C24;
    margin: 16px 0 0 0;
    min-height: 20px;
}

/* ===== LOGGED OUT STATE ===== */
/* Hide nav elements when logged out */
body.logged-out .header-nav,
body.logged-out .user-dropdown,
body.logged-out .hamburger {
    display: none;
}

/* Show login views when logged out */
body.logged-out .phone-login {
    display: flex;
}

body.logged-out .view-login {
    display: flex;
}

/* Hide other content when logged out */
body.logged-out .phone-home,
body.logged-out .phone-conversation,
body.logged-out .phone-wip,
body.logged-out .phone-desktop-only,
body.logged-out .view-home,
body.logged-out .view-wip,
body.logged-out .view-tracker {
    display: none !important;
}

/* Mobile adjustments for login */
@media (max-width: 500px) {
    .login-logo {
        height: 150px;
    }
    
    .login-title {
        font-size: 22px;
    }
}
/* ===== LAYOUT SWITCHING ===== */
.phone-container { display: none; }
.desktop-container { display: none; }

@media (max-width: 899px) {
    .phone-container { display: flex; flex-direction: column; }
    body { background: var(--white); }
}

@media (min-width: 900px) {
    .desktop-container { display: flex; flex-direction: column; }
}

/* =================================================================
   PHONE LAYOUT
   ================================================================= */

.phone-container {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

/* Phone Header */
.phone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--grey-100);
    position: relative;
    z-index: 100;
    background: var(--white);
}

.header-logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
}
.header-logo:hover { opacity: 0.7; }
.header-logo-img { height: 32px; width: auto; }

/* Hamburger */
.hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.hamburger:hover { background: var(--grey-50); }
.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--grey-800);
    border-radius: 1px;
    transition: all 0.3s var(--ease-out);
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Dropdown */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transform-origin: top right;
    transition: all 0.25s var(--ease-out);
    min-width: 200px;
    overflow: hidden;
    z-index: 99;
}
.dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--grey-800);
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--grey-50);
    -webkit-tap-highlight-color: transparent;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--grey-50); }
.dropdown-item:active { background: var(--grey-100); }
.dropdown-item .chevron-icon-right {
    color: var(--red);
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-out);
}
.dropdown-item:hover .chevron-icon-right { transform: translateX(3px); }
.dropdown-item.muted { color: var(--grey-400); }
.dropdown-item.muted .chevron-icon-right { color: var(--grey-300); }

/* Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
    z-index: 50;
}
.overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Phone Home */
.phone-home {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    gap: 28px;
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.phone-home.hidden {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    position: absolute;
}

.hello-container {
    margin-bottom: 24px;
    width: 100%;
    max-width: 320px;
    display: flex;
    justify-content: center;
}
.hello-img {
    width: 80%;
    height: auto;
    object-fit: contain;
    animation: helloAppear 0.6s var(--ease-bounce);
}

/* Home Input */
.home-input-area {
    width: 100%;
    max-width: 320px;
    position: relative;
    display: flex;
    align-items: center;
}
.home-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    border: 2px solid var(--grey-200);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s var(--ease-out);
    background: var(--white);
}
.home-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-glow);
}
.home-input::placeholder {
    color: var(--grey-400);
    font-weight: 400;
}

.input-send {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--red);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
    color: var(--white);
}
.input-send:hover {
    background: var(--red-dark);
    transform: translateY(-50%) scale(1.05);
}
.input-send:active { transform: translateY(-50%) scale(0.95); }
.input-send .send-icon {
    width: 18px;
    height: 18px;
    transform: rotate(45deg);
}

/* Example buttons */
.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 440px;
}
.example-btn {
    padding: 10px 18px;
    background: var(--grey-50);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-600);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}
.example-btn:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--white);
}
.example-btn:active { transform: scale(0.96); }

/* Phone Footer */
.phone-footer {
    margin-top: auto;
    padding: 18px 22px;
    border-top: 1px solid var(--grey-100);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-logo { height: 28px; width: auto; }

/* Phone Conversation */
.phone-conversation {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.phone-conversation.visible {
    display: flex;
}

/* Phone Desktop-Only Message */
.phone-desktop-only {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 16px;
    flex: 1;
}
.phone-desktop-only.visible { display: flex; }
.phone-desktop-only img { width: 80px; }
.phone-desktop-only h2 { font-size: 20px; font-weight: 600; color: var(--grey-800); }
.phone-desktop-only p { color: var(--grey-600); font-size: 15px; }

/* =================================================================
   DESKTOP LAYOUT (Full Screen)
   ================================================================= */

.desktop-container {
    width: 100%;
    height: 100vh;
    background: var(--grey-100);
    display: flex;
    flex-direction: column;
}

/* Desktop Header */
.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: var(--white);
    border-bottom: 3px solid var(--red);
}
.desktop-header .header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}
.desktop-header .header-logo-img {
    height: 40px;
    width: auto;
}
.desktop-header .header-right {
    display: flex;
    align-items: center;
}
.desktop-header .header-ai-logo {
    height: 40px;
    width: auto;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    margin-right: 24px;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-600);
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-dropdown-trigger:hover {
    background: var(--grey-100);
    color: var(--grey-800);
}

.user-dropdown-trigger svg {
    transition: transform 0.2s ease;
}

.user-dropdown.open .user-dropdown-trigger svg {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s var(--ease-out);
    min-width: 140px;
    overflow: hidden;
    z-index: 200;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-600);
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-dropdown-item:hover {
    background: var(--grey-50);
    color: var(--grey-800);
}

/* Nav Tabs */
.header-nav {
    display: flex;
    gap: 8px;
}
.nav-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-400);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    outline: none;
}
.nav-tab:focus { outline: none; }
.nav-tab:hover { color: var(--grey-800); }
.nav-tab.active {
    background: var(--red);
    color: var(--white);
}

/* Desktop Main */
.desktop-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Views */
.view {
    display: none;
    flex: 1;
    flex-direction: column;
}
.view.active { display: flex; }

/* =================================================================
   HOME VIEW (Ask Dot - Desktop)
   ================================================================= */

.view-home {
    background: var(--white);
    min-height: 0;
    overflow: hidden;
}

.home-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}
.home-state.hidden { display: none; }

.home-left {
    flex: 0 0 auto;
}
.home-hello-img {
    width: 280px;
    height: auto;
    animation: helloAppear 0.6s var(--ease-bounce);
}

.home-right {
    flex: 1;
    max-width: 480px;
}
.home-title {
    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 700;
    color: var(--grey-800);
    margin-bottom: 24px;
}
.home-right .home-input-area {
    max-width: 100%;
    margin-bottom: 20px;
}
.home-right .home-input {
    font-size: 15px;
}

/* Conversation State */
.conversation-state {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    height: 100%;
}
.conversation-state.visible { display: flex; }

.conversation-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    padding-bottom: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Dot icon inline with smart prompts */
.prompt-dot {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

.chat-input-area {
    padding: 16px 24px 20px;
    background: var(--white);
    border-top: 1px solid var(--grey-100);
    flex-shrink: 0;
}
.chat-input-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}
.chat-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    border: 2px solid var(--grey-200);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s var(--ease-out);
}
.chat-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px var(--red-glow);
}
.chat-input::placeholder { color: var(--grey-400); font-weight: 400; }

.chat-send {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--red);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.2s var(--ease-out);
}
.chat-send:hover { background: var(--red-dark); }
.chat-send .send-icon {
    width: 18px;
    height: 18px;
    transform: rotate(45deg);
}

/* Desktop Footer */
.desktop-footer {
    padding: 16px 32px;
    background: var(--white);
    border-top: 1px solid var(--grey-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.desktop-footer.hidden { display: none; }
.desktop-footer .footer-logo { height: 24px; }
.desktop-footer .footer-right {
    font-size: 13px;
    color: var(--grey-400);
}

/* Minimal footer for non-home views - just hide it */
.desktop-footer.minimal {
    display: none;
}

/* =================================================================
   WIP VIEW (What's What)
   ================================================================= */

.view-wip {
    background: var(--grey-100);
}

.wip-controls {
    background: var(--white);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grey-200);
}

.wip-content {
    flex: 1;
    padding: 24px 48px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.wip-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =================================================================
   TRACKER VIEW
   ================================================================= */

.view-tracker {
    background: var(--grey-100);
}

.tracker-controls {
    background: var(--white);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grey-200);
}
.tracker-controls .controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tracker-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* =================================================================
   SHARED COMPONENTS
   ================================================================= */

/* Custom Dropdown */
.custom-dropdown { position: relative; display: inline-block; }
.custom-dropdown-trigger {
    padding: 8px 14px;
    padding-right: 28px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}
.custom-dropdown-trigger:hover { color: var(--red); }
.custom-dropdown-trigger.open { color: var(--red); }
.custom-dropdown-trigger svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.custom-dropdown-trigger.open svg { transform: rotate(180deg); }
.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.15s ease;
}
.custom-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-dropdown-option {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--grey-600);
    cursor: pointer;
    transition: all 0.1s ease;
}
.custom-dropdown-option:hover { background: var(--grey-100); color: var(--grey-800); }
.custom-dropdown-option.selected { color: var(--red); font-weight: 600; }

/* Form Dropdown variant (for modal forms) */
.form-dropdown {
    display: block;
    width: 100%;
}
.form-dropdown-trigger {
    width: 100%;
    padding: 10px 12px;
    padding-right: 32px;
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--grey-800);
    justify-content: space-between;
}
.form-dropdown-trigger:hover {
    border-color: var(--grey-300);
    color: var(--grey-800);
}
.form-dropdown-trigger.open {
    border-color: var(--red);
    color: var(--grey-800);
}
.form-dropdown-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.form-dropdown .custom-dropdown-menu {
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mode-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey-400);
    cursor: pointer;
    transition: color 0.15s ease;
}
.mode-label.active { color: var(--red); }
.mode-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.mode-switch input { opacity: 0; width: 0; height: 0; }
.mode-switch-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--red);
    border-radius: var(--radius-full);
    transition: 0.2s;
}
.mode-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}
.mode-switch input:checked + .mode-switch-slider:before { transform: translateX(20px); }

/* Section Title */
.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--grey-400);
    padding: 10px 0;
    margin-bottom: 8px;
}

/* Pill Button */
.pill-btn {
    padding: 12px 24px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.15s ease;
}
.pill-btn:hover { background: var(--red-dark); }
.pill-btn:disabled { background: var(--grey-200); cursor: not-allowed; }
.pill-btn.success { background: var(--green); }

/* =============================================================================
   LOADING STATES
   ============================================================================= */

/*
   TWO TREATMENTS:
   1. Modal (view transitions)  → showLoadingModal() — Dot + heart + "Just a sec"
   2. Inline (sections/inputs)  → loadingDots() — three bouncing red dots
   
   Sizes: default (10px) for Job Bag sections, small (6px) for dropdowns
*/

/* Inline Loading Dots */
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 0;
    grid-column: 1 / -1;
}

.loading-dots--small {
    gap: 4px;
    padding: 12px 0;
}

.loading-dots__dot {
    width: 10px;
    height: 10px;
    background: #ED1C24;
    border-radius: 50%;
    animation: loadingBounce 1.4s infinite ease-in-out;
}

.loading-dots--small .loading-dots__dot {
    width: 6px;
    height: 6px;
}

.loading-dots__dot:nth-child(1) { animation-delay: 0s; }
.loading-dots__dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dots__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes loadingBounce {
    0%, 80%, 100% { 
        transform: translateY(0);
        opacity: 0.5;
    }
    40% { 
        transform: translateY(-6px);
        opacity: 1;
    }
}

.loading-dots--small .loading-dots__dot {
    animation-name: loadingBounceSmall;
}

@keyframes loadingBounceSmall {
    0%, 80%, 100% { 
        transform: translateY(0);
        opacity: 0.5;
    }
    40% { 
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Empty Section */
.empty-section {
    color: var(--grey-400);
    font-size: 14px;
    font-weight: 500;
    padding: 16px 18px;
    min-height: 90px;
    text-align: center;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.empty-section img { width: 48px; height: auto; }

/* =================================================================
   JOB CARDS (WIP)
   ================================================================= */

.job-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 480px;
}
.job-card:hover { box-shadow: var(--shadow-md); }

.bag-icon {
    color: var(--red);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.job-card:hover .bag-icon { opacity: 1; }

.job-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.job-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 9px;
    color: var(--white);
    flex-shrink: 0;
    overflow: hidden;
}
.job-logo img { width: 100%; height: 100%; object-fit: cover; }

.job-main { flex: 1; min-width: 0; }
.job-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.job-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--grey-800);
}

.job-update-preview {
    font-size: 13px;
    color: var(--grey-600);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-meta-compact {
    font-size: 12px;
    color: var(--grey-400);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.job-meta-compact svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.job-meta-compact .dot { color: #ddd; }
.stage-tag {
    background: var(--grey-100);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--grey-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.days-ago.stale { color: var(--red); font-weight: 500; }

/* Expanded Card */
.job-expanded {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-100);
}
.job-card.expanded .job-expanded { display: block; }

.section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
    margin-bottom: 4px;
}
.job-description {
    font-size: 14px;
    color: var(--grey-600);
    margin-bottom: 4px;
    line-height: 1.5;
}
.job-owner {
    font-size: 13px;
    color: var(--grey-600);
    margin-bottom: 16px;
}

.job-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.control-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
}
.control-select {
    padding: 8px 28px 8px 10px;
    border: 1.5px solid var(--grey-200);
    border-radius: 20px;
    font-size: 13px;
    color: var(--grey-600);
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ED1C24' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}
.control-select:focus { outline: none; border-color: var(--red); }

.job-dates {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.date-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.date-input {
    padding: 8px 12px;
    border: 1.5px solid var(--grey-200);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: var(--grey-600);
    cursor: pointer;
}
.date-input:focus { outline: none; border-color: var(--red); }

.update-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 12px;
}
.update-input:focus { outline: none; border-color: var(--red); }
.update-input::placeholder { color: #bbb; }

.job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--grey-100);
}
.teams-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--grey-400);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
}
.teams-link:hover { border-color: var(--red); color: var(--red); }

.with-client-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}
.with-client-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
}

/* Teams checkbox */
.teams-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-left: 16px;
}
.teams-checkbox input {
    display: none;
}
.teams-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--grey-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: transparent;
    transition: all 0.15s ease;
}
.teams-checkbox input:checked + .teams-checkmark {
    border-color: var(--red);
    color: var(--red);
}
.teams-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--grey-200);
    border-radius: var(--radius-full);
    transition: 0.2s;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background-color: var(--red); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* =================================================================
   CONVERSATION MESSAGES
   ================================================================= */

.user-message {
    align-self: flex-end;
    background: var(--red);
    color: var(--white);
    padding: 14px 20px;
    border-radius: 24px 24px 6px 24px;
    max-width: 80%;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(237, 28, 36, 0.2);
}

.dot-response {
    align-self: flex-start;
    max-width: 90%;
}
.dot-text {
    font-size: 15px;
    color: var(--grey-800);
    margin-bottom: 14px;
    line-height: 1.6;
}
.dot-text p {
    margin-bottom: 8px;
}
.dot-text p:last-child {
    margin-bottom: 0;
}
.dot-list {
    list-style: none;
    margin: 8px 0;
    padding: 0;
}
.dot-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    line-height: 1.5;
}
.dot-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: bold;
}

.thinking-dots {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

/* SVG Robot with beating heart - used in chat */
.dot-thinking {
    position: relative;
    width: 34px;
    height: 46px;
    flex-shrink: 0;
}

.dot-thinking .dot-robot {
    width: 100%;
    height: 100%;
}

.dot-thinking .dot-heart-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: heartbeat-svg 0.8s ease-in-out infinite;
}

@keyframes heartbeat-svg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.thinking-helper {
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-400);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.thinking-helper.visible {
    opacity: 1;
}

.thinking-helper::before {
    content: '>';
    color: var(--red);
    font-weight: 700;
    margin-right: 8px;
}

/* Client Cards */
.client-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.client-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--white);
    border: 2px solid var(--grey-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.client-card:hover {
    border-color: var(--red);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}
.client-name { font-size: 16px; font-weight: 600; color: var(--grey-800); }
.client-count { font-size: 13px; color: var(--grey-400); margin-top: 2px; }
.card-chevron {
    color: var(--grey-300);
    font-size: 28px;
    font-weight: 300;
    transition: all 0.2s var(--ease-out);
}
.client-card:hover .card-chevron { color: var(--red); transform: translateX(4px); }

/* Smart Prompts */
.smart-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.smart-prompt {
    padding: 6px 0;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    color: var(--grey-400);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.smart-prompt:hover {
    color: var(--red);
}

/* Job Cards in conversation */
.job-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

@keyframes helloAppear {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-16px) scale(1.1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s var(--ease-out); }

/* =================================================================
   TRACKER VIEW
   ================================================================= */

.view-tracker {
    background: var(--grey-100);
}

.tracker-controls {
    background: var(--white);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grey-200);
}

.tracker-controls .controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tracker-content {
    flex: 1;
    padding: 24px 48px;
    overflow-y: auto;
}

.tracker-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* Tracker Numbers Section */
.numbers-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-box {
    background: var(--grey-100);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--grey-800);
}

.stat-value.grey { color: var(--grey-600); }
.stat-value.red { color: var(--red); }
.stat-value.orange { color: #f59e0b; }

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.tracker-progress-bar {
    position: relative;
    height: 8px;
    background: var(--grey-200);
    border-radius: 4px;
    overflow: hidden;
}

.tracker-progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tracker-progress-fill.over { background: #f59e0b; }

.rollover-credit {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--grey-100);
}

.rollover-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--grey-400);
    margin-bottom: 4px;
}

.rollover-amount {
    font-size: 13px;
    color: var(--grey-600);
}

.rollover-amount strong {
    font-weight: 600;
    color: var(--grey-600);
}

/* Tracker Projects Table */
.projects-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.projects-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    border-bottom: 2px solid var(--grey-100);
}

.projects-table th.chevron-col { width: 24px; }
.projects-table th.project-col { width: 35%; }
.projects-table th.owner-col { width: 18%; }
.projects-table th.amount-col { text-align: right; width: 80px; }

.projects-table td {
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-50);
    font-size: 13px;
    color: var(--grey-600);
    overflow: hidden;
    text-overflow: ellipsis;
}

.projects-table tr:last-child td { border-bottom: none; }

.projects-table .project-name {
    font-weight: 600;
    color: var(--grey-800);
}

.projects-table .amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-800);
    text-align: right;
}

.projects-table .amount.ballpark { color: var(--red); }

.chevron-cell { width: 24px; padding-right: 8px !important; }
.chevron-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--red);
    transition: opacity 0.15s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chevron-btn:hover { opacity: 0.7; }
.chevron-btn .chevron-icon { width: 16px; height: 16px; }

/* Tracker Bottom Row (Chart + Notes) */
.tracker-bottom-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
}

/* Tracker Chart */
.chart-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: 280px;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    position: relative;
    padding-left: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex: 1;
    position: relative;
}

.y-axis {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 20px;
    width: 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.y-label {
    font-size: 9px;
    color: var(--grey-400);
    text-align: right;
    padding-right: 6px;
}

.committed-line {
    position: absolute;
    left: 40px;
    right: 0;
    height: 0;
    border-top: 2px dashed #c0c0c0;
    z-index: 5;
    bottom: 20px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.bar-stack {
    position: relative;
    width: 32px;
}

.bar-committed {
    width: 100%;
    background: #e0e0e0;
    border-radius: 3px 3px 0 0;
}

.bar-committed.future { opacity: 0.5; }

.bar-spend {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--red);
    border-radius: 3px 3px 0 0;
}

.bar-spend.future { opacity: 0.4; }

.bar-ballpark {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(237, 28, 36, 0.15);
    border-radius: 3px 3px 0 0;
}

.bar-label {
    font-size: 9px;
    color: var(--grey-400);
    text-transform: uppercase;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--grey-100);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--grey-600);
}

.legend-swatch {
    width: 16px;
    height: 10px;
    border-radius: 2px;
}

.legend-swatch.projects { background: var(--red); }
.legend-swatch.committed-swatch { background: #e0e0e0; }
.legend-swatch.incoming-swatch {
    background: rgba(237, 28, 36, 0.15)
}

/* Tracker Notes */
.notes-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 280px;
}

.notes-list {
    list-style: none;
    flex: 1;
}

.notes-list li {
    font-size: 13px;
    color: var(--grey-600);
    padding: 8px 0 8px 16px;
    position: relative;
    line-height: 1.5;
}

.notes-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: bold;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid var(--red);
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    margin-top: 16px;
    align-self: flex-start;
}

.pdf-btn:hover {
    background: var(--red);
    color: var(--white);
}

.pdf-btn svg {
    width: 14px;
    height: 14px;
}

/* Tracker Edit Modal */
.tracker-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tracker-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.tracker-modal {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.tracker-modal-overlay.visible .tracker-modal {
    transform: translateY(0);
}

.tracker-modal.ballpark-active {
    border: 2px solid rgba(237, 28, 36, 0.3);
}

.tracker-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tracker-modal-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tracker-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--grey-800);
}

.ballpark-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ballpark-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
    transition: color 0.15s ease;
}

.ballpark-label.active { color: var(--red); }

.tracker-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--grey-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tracker-modal-close:hover { color: var(--red); }

.tracker-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tracker-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tracker-form-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
}

.tracker-form-input {
    padding: 10px 12px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--grey-800);
}

.tracker-form-input:is(select) {
    padding-right: 32px;
}

.tracker-form-input:focus {
    outline: none;
    border-color: var(--red);
}

.tracker-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tracker-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-100);
}

.tracker-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tracker-btn-secondary {
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    color: var(--grey-600);
}

.tracker-btn-secondary:hover { border-color: var(--grey-400); }

.tracker-btn-primary {
    background: var(--red);
    border: none;
    color: var(--white);
}

.tracker-btn-primary:hover { background: var(--red-dark); }

/* Quarter context label */
.quarter-context {
    color: var(--grey-300);
    margin-left: 8px;
}

/* =================================================================
   UNIVERSAL JOB CARD
   ================================================================= */

/* Recent Activity */
.recent-activity {
    margin-bottom: 16px;
}

.activity-item {
    font-size: 13px;
    color: var(--grey-600);
    padding: 8px 0;
    border-bottom: 1px solid var(--grey-100);
    line-height: 1.5;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item.latest {
    font-weight: 500;
    color: var(--grey-800);
}

.no-activity {
    font-size: 13px;
    color: var(--grey-400);
    font-style: italic;
    padding: 12px 0;
}

/* Update button in expanded footer */
.job-expanded-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--grey-100);
}

.update-btn {
    padding: 10px 24px;
}

/* =================================================================
   JOB EDIT MODAL
   ================================================================= */

.job-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.job-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.job-modal {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.job-modal-overlay.visible .job-modal {
    transform: translateY(0);
}

/* Files modal - compact, no scroll */
.files-modal {
    max-height: none;
    overflow: visible;
}

.files-modal .job-modal-logo {
    width: 48px;
    height: 48px;
}

.job-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--grey-100);
}

.job-modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.job-modal-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.job-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--grey-800);
}

.job-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--grey-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.job-modal-close:hover {
    color: var(--red);
    background: var(--grey-50);
}

.job-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Summary Card (read-only) styles */
.summary-section {
    margin-bottom: 16px;
}

.summary-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-text {
    font-size: 14px;
    color: var(--grey-800);
    line-height: 1.5;
}

.summary-row {
    display: flex;
    gap: 24px;
}

.summary-row .summary-section {
    flex: 1;
    margin-bottom: 0;
}

.job-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.job-form-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
}

.job-form-input {
    padding: 10px 12px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--grey-800);
    background-color: var(--white);
    transition: border-color 0.15s ease;
}

.job-form-input::placeholder {
    color: var(--grey-400);
}

select.job-form-input {
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ED1C24' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
}

input[type="date"].job-form-input {
    accent-color: var(--red);
    color-scheme: light;
}

input[type="date"].job-form-input::-webkit-calendar-picker-indicator {
    filter: invert(23%) sepia(98%) saturate(7041%) hue-rotate(354deg) brightness(93%) contrast(98%);
    cursor: pointer;
}

.job-form-input:focus {
    outline: none;
    border-color: var(--red);
}

.job-form-textarea {
    resize: none;
    min-height: 44px;
    max-height: 120px;
    overflow: hidden;
    line-height: 1.4;
}

.job-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.job-modal-links {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 8px;
    padding-top: 16px;
    padding-bottom: 4px;
    border-top: 1px solid var(--grey-100);
}

.job-modal-link {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--grey-500);
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-modal-link:hover {
    color: var(--grey-700);
}

.job-modal-link .link-chevron {
    margin-top: 1px;
}

.job-modal-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-500);
}

.job-modal-edit-btn:hover {
    opacity: 0.8;
}

.job-modal-divider {
    height: 1px;
    background: var(--grey-100);
    margin: 8px 0;
}

/* Job Name Edit Modal */
.job-name-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.job-modal-overlay.visible .job-name-modal {
    transform: translateY(0);
}

.job-name-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--grey-800);
}

.job-name-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.job-btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--grey-100);
    color: var(--grey-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.job-btn-secondary:hover {
    background: var(--grey-200);
}

.job-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--grey-100);
}

.job-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.job-btn-secondary {
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    color: var(--grey-600);
}

.job-btn-secondary:hover {
    border-color: var(--grey-400);
}

.job-btn-primary {
    background: var(--red);
    border: none;
    color: var(--white);
}

.job-btn-primary:hover {
    background: var(--red-dark);
}

.job-btn-primary:disabled {
    background: var(--grey-300);
    cursor: not-allowed;
}

/* Teams link in modal */
.job-modal-footer .teams-link {
    font-size: 11px;
}

/* =================================================================
   PLUS BUTTON & MENU
   ================================================================= */

.input-plus {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--white);
    border: 2px solid var(--grey-300);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
    color: var(--grey-400);
    z-index: 10;
}

.input-plus:hover {
    border-color: var(--red);
    color: var(--red);
}

.input-plus:active {
    transform: translateY(-50%) scale(0.95);
}

.input-plus svg {
    width: 18px;
    height: 18px;
}

/* Adjust input padding to make room for the + button */
.home-input-area .home-input,
.chat-input-wrapper .chat-input {
    padding-left: 52px;
}

/* Plus Menu */
.plus-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    min-width: 160px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transform-origin: bottom left;
    transition: all 0.2s var(--ease-out);
    overflow: hidden;
    z-index: 200;
}

.plus-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.plus-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-800);
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid var(--grey-50);
    -webkit-tap-highlight-color: transparent;
}

.plus-menu-item:last-child {
    border-bottom: none;
}

.plus-menu-item:hover {
    background: var(--grey-50);
}

.plus-menu-item:active {
    background: var(--grey-100);
}

.plus-menu-item .chevron-icon-right {
    color: var(--red);
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-out);
}

.plus-menu-item:hover .chevron-icon-right {
    transform: translateX(3px);
}

/* =================================================================
   COMING SOON MODAL
   ================================================================= */

.coming-soon-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.coming-soon-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.coming-soon-modal {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.25s var(--ease-out);
    position: relative;
    max-width: 280px;
}

.coming-soon-modal-overlay.visible .coming-soon-modal {
    transform: translateY(0) scale(1);
}

.coming-soon-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--grey-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.coming-soon-close:hover {
    color: var(--red);
    background: var(--grey-50);
}

.coming-soon-img {
    width: 64px;
    height: auto;
    margin-bottom: 16px;
}

/* ===== LOADING MODAL ===== */
.loading-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.loading-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loading-modal {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 32px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.25s var(--ease-out);
    position: relative;
    max-width: 280px;
}

.loading-modal-overlay.visible .loading-modal {
    transform: translateY(0) scale(1);

}
.loading-modal .dot-thinking {
    margin: 0 auto 16px auto;
    width: 50px;
    height: 68px;
}

.loading-modal-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--grey-800);
}

.coming-soon-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-800);
}

/* ===== NEW JOB MODAL ===== */
.new-job-modal {
    max-width: 520px;
    width: 90%;
}

.new-job-step {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.new-job-prompt {
    font-size: 14px;
    color: var(--grey-600);
    margin-bottom: 16px;
    text-align: center;
}

/* Client Picker */
.client-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.client-picker-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.client-picker-btn:hover {
    background: white;
    border-color: var(--grey-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.client-picker-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.client-picker-btn span {
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-800);
}

/* Loading/Error text */
.loading-text,
.error-text {
    text-align: center;
    padding: 32px;
    color: var(--grey-500);
    font-size: 14px;
}

.error-text {
    color: var(--red);
}

/* Required field indicator */
.required {
    color: var(--red);
}

/* Title chevron */
.title-chevron {
    vertical-align: middle;
    margin: 0 4px;
}

/* Select wrapper with red chevron */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-wrapper .select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    pointer-events: none;
}

/* Date wrapper with red calendar */
.date-wrapper {
    position: relative;
    width: 100%;
}

.date-wrapper input {
    padding-right: 36px;
}

.date-wrapper input::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    width: 36px;
    height: 100%;
    cursor: pointer;
}

.date-wrapper .calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Input error state */
.input-error {
    border-color: var(--red) !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Confirmation Screen */
.new-job-confirmation {
    text-align: center;
    padding: 24px 16px;
}

.new-job-success-icon {
    width: 56px;
    height: 56px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    margin: 0 auto 16px;
}

.new-job-confirm-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: 8px;
}

.new-job-confirm-subtext {
    font-size: 14px;
    color: var(--grey-500);
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .client-picker {
        grid-template-columns: 1fr;
    }
    
    .client-picker-btn {
        padding: 10px 14px;
    }
    
    .now-soon-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

/* ===== WIP LIST VIEW ===== */
.list-view {
    display: flex;
    flex-direction: column;
}

.list-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--grey-200);
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    border-radius: 8px;
    margin: 0 -12px;
}

.list-row:hover {
    background: var(--grey-50);
}

.list-row:last-child {
    border-bottom: none;
}

.list-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 10px;
    color: var(--grey-400);
    overflow: hidden;
}

.list-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-job-num {
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-900);
}

.list-job-name {
    font-size: 14px;
    font-weight: 400;
    color: var(--grey-600);
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--grey-400);
}

.list-due,
.list-ago {
    display: flex;
    align-items: center;
    gap: 4px;
}

.list-due svg,
.list-ago svg {
    width: 14px;
    height: 14px;
}

.list-due.overdue {
    color: var(--grey-400);
}

.list-due.overdue svg {
    stroke: var(--grey-400);
}

.list-ago.stale {
    color: var(--red);
}

.list-ago.stale svg {
    stroke: var(--red);
}

.list-chevron {
    flex-shrink: 0;
    transition: transform 0.15s;
}

.list-row:hover .list-chevron {
    transform: translateX(2px);
}

/* Responsive adjustments for list view */
@media (max-width: 1200px) {
    .list-meta {
        gap: 12px;
    }
    
    .list-job-name {
        max-width: 150px;
    }
}

@media (max-width: 1000px) {
    .list-job-name {
        max-width: 120px;
    }
}

/* Single column list layout */
.wip-list-single {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.wip-list-single .section {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.wip-list-single .section-title {
    margin-bottom: 8px;
    padding-left: 4px;
}

.wip-list-single .section-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    box-shadow: var(--shadow-sm);
}

.wip-list-single .list-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.list-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-description {
    font-size: 13px;
    color: var(--grey-400);
    line-height: 1.4;
}

/* Phone WIP View */
.phone-wip {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    padding-top: 70px;
    overflow-y: auto;
}

.phone-wip.visible {
    display: flex;
}

.phone-wip-controls {
    margin-bottom: 16px;
}

.phone-wip-content {
    flex: 1;
    overflow-y: auto;
}

.phone-wip .wip-list-single {
    gap: 16px;
}

.phone-wip .section {
    padding: 16px;
}

.phone-wip .list-row {
    padding: 12px 8px;
}

.phone-wip .list-logo {
    width: 32px;
    height: 32px;
}

.phone-wip .list-job-num {
    font-size: 13px;
}

.phone-wip .list-job-name {
    font-size: 13px;
}

.phone-wip .list-description {
    font-size: 12px;
}

.phone-wip .list-due {
    font-size: 11px;
}

/* ===================================================
   JOB BAG
   =================================================== */

.view-job-bag {
    padding: 0 28px 60px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* View header image — matches WIP/Tracker pattern */
.jb-view-header {
    padding: 32px 0 24px;
}

.jb-view-header-img {
    height: 32px;
    width: auto;
    display: block;
}

/* Job Header */
.jb-header {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
}

.jb-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jb-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #F7F7F7;
    flex-shrink: 0;
}

.jb-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jb-job-title {
    font-size: 17px;
    font-weight: 700;
    color: #444;
    letter-spacing: -0.02em;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.2;
}

.jb-job-desc {
    display: none;
}

/* Job Switcher */
.jb-job-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.jb-job-chevron {
    background: none;
    border: none;
    color: var(--red, #E8291C);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.jb-job-chevron:hover {
    background: rgba(232, 41, 28, 0.08);
}

.jb-job-chevron.open svg {
    transform: rotate(180deg);
}

.jb-job-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
}

.jb-job-dropdown.open {
    display: block;
}

.jb-job-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.1s;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #333;
    gap: 8px;
}

.jb-job-dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.jb-job-dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.jb-job-dropdown-item:hover {
    background: #f5f5f5;
}

.jb-job-dropdown-item.active {
    background: rgba(232, 41, 28, 0.06);
}

.jb-job-dropdown-item.active .jb-job-dropdown-num {
    color: var(--red, #E8291C);
}

.jb-job-dropdown-num {
    font-weight: 600;
    color: #333;
    min-width: 70px;
}

.jb-job-dropdown-name {
    color: #666;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jb-job-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.jb-job-dropdown-item.all-jobs {
    color: var(--red, #E8291C);
    font-weight: 500;
}

.jb-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jb-wc-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jb-wc-label {
    font-size: 11px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}

.jb-wc-label.active { color: var(--red, #E8291C); }
.jb-wc-label.inactive { color: #CCC; }

/* With client toggle */
.jb-toggle {
    width: 36px;
    height: 20px;
    background: var(--red, #E8291C);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.jb-toggle::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 3px;
    right: 3px;
    transition: right 0.2s, left 0.2s;
}

.jb-toggle.off {
    background: #E5E5E5;
}

.jb-toggle.off::after {
    right: auto;
    left: 3px;
}

/* Story Band */
.jb-story {
    background: white;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 0;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.jb-story-eyebrow {
    display: none;
}

.jb-story-wrap {
    position: relative;
    height: calc(13px * 1.6 * 3);
    overflow: hidden;
}

.jb-story.expanded .jb-story-wrap {
    height: auto;
    overflow: visible;
}

.jb-story-text {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    font-weight: 400;
    font-family: 'DM Sans', sans-serif;
}

.jb-story-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(to bottom, transparent, white);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-left: 2px;
    pointer-events: none;
}

.jb-story-fade-btn {
    pointer-events: all;
    background: none;
    border: none;
    color: var(--red, #E8291C);
    font-size: 11px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.15s;
}

.jb-story-fade-btn:hover { opacity: 0.7; }

.jb-story.expanded .jb-story-fade {
    display: none;
}

.jb-story-more {
    background: none;
    border: none;
    color: var(--red, #E8291C);
    font-size: 11px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    padding: 4px 0 0;
    display: block;
    transition: opacity 0.15s;
}

.jb-story-more:hover { opacity: 0.7; }

.jb-story-textarea {
    resize: none;
    line-height: 1.6;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.jb-story-char-count {
    text-align: right;
    font-size: 11px;
    color: #999;
    font-family: 'DM Sans', sans-serif;
    margin-top: 4px;
}

/* Page Grid */
.jb-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0 20px;
    align-items: stretch;
}

.jb-left {
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

/* Section labels — matches .section-title pattern */
.jb-section-label-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0 8px;
}

.jb-section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--red, #E8291C);
    font-family: 'DM Sans', sans-serif;
}

.jb-section-action {
    font-size: 11px;
    color: var(--red, #E8291C);
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
}

.jb-section-action:hover {
    text-decoration: underline;
}

/* Cards */
.jb-card {
    background: white;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4px;
    box-shadow: var(--shadow-sm);
}

.jb-label-pencil {
    color: #CCC;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 0;
    margin-left: 6px;
}

.jb-label-pencil:hover {
    color: var(--red, #E8291C);
}

/* Summary */
.jb-summary-body {
    padding: 14px 18px 12px;
}

.jb-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #F7F7F7;
    font-family: 'DM Sans', sans-serif;
}

.jb-meta-key {
    font-size: 12px;
    color: #999;
}

.jb-meta-val {
    font-size: 12px;
    font-weight: 500;
    color: #222;
}

.jb-meta-val.overdue {
    color: var(--red, #E8291C);
}

/* Budget */
.jb-budget-body {
    padding: 14px 18px;
    font-family: 'DM Sans', sans-serif;
}

.jb-spend-total {
    font-size: 22px;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.jb-spend-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

.jb-progress-bar {
    height: 5px;
    background: #F0F0F0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.jb-progress-fill {
    height: 100%;
    background: var(--red, #E8291C);
    border-radius: 3px;
}

.jb-spend-entries {
    margin-top: 8px;
    border-top: 1px solid #F7F7F7;
    padding-top: 8px;
}

.jb-spend-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
}

.jb-spend-month { color: #999; }
.jb-spend-amount { font-weight: 500; color: #222; }
.jb-spend-ballpark { color: #999; font-style: italic; margin-left: 2px; }

/* Files */
.jb-files-body {
    padding: 6px 18px 6px;
    font-family: 'DM Sans', sans-serif;
}

.jb-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F7F7F7;
    cursor: pointer;
    text-decoration: none;
}

.jb-file-row:last-child { border-bottom: none; }
.jb-file-row:hover .jb-file-name { color: var(--red, #E8291C); }

.jb-file-left { display: flex; align-items: center; gap: 10px; }
.jb-file-icon { font-size: 16px; width: 22px; text-align: center; line-height: 1; display: flex; align-items: center; justify-content: center; }
.jb-file-name { font-size: 13px; font-weight: 500; color: #222; transition: color 0.15s; }
.jb-file-arrow { font-size: 11px; color: #CCC; }
.jb-files-empty { font-size: 12px; color: #999; padding: 8px 0; display: block; }

/* Thread wrapper — section label sits above */
.jb-thread-wrap {
    display: flex;
    flex-direction: column;
}

/* Tabs — sit in the RH side of the Updates section-label-row */
.jb-tabs {
    display: flex;
    gap: 0;
}

.jb-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #999;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.jb-tab.active {
    color: var(--red, #E8291C);
    border-bottom-color: var(--red, #E8291C);
}

.jb-tab:hover:not(.active) {
    color: #555;
}

/* Thread */
.jb-thread {
    background: white;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.jb-thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.jb-thread-body::-webkit-scrollbar { width: 4px; }
.jb-thread-body::-webkit-scrollbar-track { background: transparent; }
.jb-thread-body::-webkit-scrollbar-thumb { background: #E5E5E5; border-radius: 2px; }

.jb-thread-count {
    font-size: 11px;
    color: #999;
    font-family: 'DM Sans', sans-serif;
}

/* Thread entries */
.jb-entry {
    padding: 10px 20px;
    display: flex;
    gap: 12px;
    font-family: 'DM Sans', sans-serif;
}

.jb-entry:hover { background: #FAFAFA; }

.jb-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
    font-family: 'DM Sans', sans-serif;
}

.jb-av-michael,
.jb-av-stu,
.jb-av-dot,
.jb-av-client { background: var(--red, #E8291C); color: white; }

.jb-entry-content { flex: 1; }

.jb-entry-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
    position: relative;
}

.jb-entry-author { font-size: 13px; font-weight: 600; color: #111; }
.jb-entry-time { font-size: 11px; color: #999; }

.jb-entry-edit {
    display: none;
    background: none;
    border: none;
    color: #CCC;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    transition: color 0.15s;
    line-height: 0;
}

.jb-entry:hover .jb-entry-edit { display: block; }
.jb-entry-edit:hover { color: var(--red, #E8291C); }

.jb-entry-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.jb-entry-text {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    flex: 2;
}

.jb-entry-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-start;
    padding-top: 1px;
}

.jb-entry-pill {
    background: #F5F5F5;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: #999;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.jb-entry-pill:hover {
    background: #EDEDED;
    color: #555;
}

.jb-files-pill-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid #F0F0F0;
}

.jb-files-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #F5F5F5;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: #666;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.jb-files-pill:hover {
    background: #EDEDED;
    color: #333;
}

.jb-date-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 20px;
}

.jb-date-line { flex: 1; height: 1px; background: #E5E5E5; }

.jb-date-label {
    font-size: 10px;
    color: #999;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

.jb-empty-thread {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
}

/* Compose */
.jb-compose {
    border-top: 2px solid var(--border, #E5E5E5);
    padding: 10px 16px 12px;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

/* Attachment preview — hidden until file attached */
.jb-attach-preview {
    display: none;
    margin-bottom: 8px;
    background: white;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 8px;
    padding: 6px 10px;
}

.jb-attach-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #555;
}

.jb-attach-name {
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jb-attach-remove {
    background: none;
    border: none;
    color: #BBB;
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.jb-attach-remove:hover { color: var(--red, #E8291C); }

/* Subfolder picker */
.jb-subfolder-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jb-subfolder-label {
    font-size: 11px;
    color: #999;
    font-family: 'DM Sans', sans-serif;
    flex-shrink: 0;
}

.jb-subfolder-btn {
    background: #F0F0F0;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-family: 'DM Sans', sans-serif;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
}

.jb-subfolder-btn.active {
    background: #111;
    border-color: #111;
    color: white;
}

/* Compose row */
.jb-compose-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* Paperclip button */
.jb-attach-btn {
    background: none;
    border: none;
    color: #CCC;
    cursor: pointer;
    padding: 0 4px;
    height: 38px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    flex-shrink: 0;
}

.jb-attach-btn:hover,
.jb-attach-btn.active {
    color: var(--red, #E8291C);
}

/* Drag over state */
.jb-thread.jb-drag-over {
    border-color: var(--red, #E8291C);
    background: #FFF8F8;
}

.jb-compose-input {
    flex: 1;
    background: white;
    border: 1px solid var(--border, #E5E5E5);
    border-radius: 8px;
    padding: 9px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #222;
    outline: none;
    resize: none;
    min-height: 38px;
    max-height: 80px;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.jb-compose-input:focus { border-color: var(--red, #E8291C); }
.jb-compose-input::placeholder { color: #CCC; }

.jb-post-btn {
    background: var(--red, #E8291C);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    height: 38px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.jb-post-btn:hover { background: #C41F14; }
.jb-post-btn:disabled { background: #E5E5E5; color: #999; cursor: default; }

.jb-compose-hint {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    font-family: 'DM Sans', sans-serif;
}

/* Backdate pill — shown when a past date is selected */
