/* Basic styles for the new SaaS version. Extend as we port the full UI. */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Simple card and button styles matching the old teal theme */
.teal-btn {
    background-color: #0f766e;
    transition: background-color 0.1s ease;
}
.teal-btn:hover {
    background-color: #115e59;
}

/* Match the old version's header gradient + mobile app density */
.teal-gradient {
    background: linear-gradient(135deg, #0F766E, #115E59);
}

/* App brand lockup — matches marketing site */
.app-brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.38);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
@media (min-width: 640px) {
    .app-brand-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.25rem;
    }
}
.app-brand-wordmark {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #0F766E;
}
@media (min-width: 640px) {
    .app-brand-wordmark { font-size: 1.5rem; }
}
.app-brand-tagline {
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e4e4e7;
    margin-top: 0.15rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Top header: brand never crushed by Online + Sign out; no horizontal page scroll */
.app-top-header {
    width: 100%;
    max-width: 100%;
}
.app-brand-lockup {
    min-width: 0;
}
/* Email under Sign out — may clip on the right; page itself does not scroll sideways */
.user-header-email {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
}
@media (min-width: 640px) {
    .app-brand-tagline { font-size: 0.625rem; }
}
.app-light .app-brand-tagline { color: #18181b; }

/* Tighter mobile-first spacing to match the old polished PWA */
.mobile-dense {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .mobile-dense {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Proto notice style from old version */
.proto-notice {
    font-size: 10px;
    background: #1f2937;
    color: #64748b;
}

/* Light theme (white + teal) matching old mobile version */
.app-light {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.app-light .bg-zinc-900,
.app-light .bg-zinc-800,
.app-light .bg-zinc-950,
.app-light .bg-zinc-700 {
    background-color: #f8fafc !important;
}
.app-light input,
.app-light textarea,
.app-light select {
    background-color: #ffffff !important;
}
.app-light .text-white,
.app-light .text-zinc-400,
.app-light .text-zinc-500 {
    color: #334155 !important;
}
.app-light .border-zinc-700,
.app-light .border-zinc-800 {
    border-color: #cbd5e1 !important;
}
.app-light .proto-notice {
    background: #e0f2fe !important;
    color: #0e7490 !important;
}
.app-light .gantt-bar {
    color: white !important;
}
.app-light .bg-teal-600,
.app-light .bg-teal-700,
.app-light .bg-emerald-600,
.app-light .bg-emerald-700,
.app-light .teal-gradient {
    color: white !important;
}
.app-light #task-modal .bg-zinc-900,
.app-light #client-item-modal .bg-zinc-900,
.app-light #survey-modal .bg-zinc-900,
.app-light #survey-item-popup .bg-zinc-900 {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}
.app-light #task-modal input,
.app-light #task-modal textarea,
.app-light #client-item-modal input,
.app-light #client-item-modal textarea,
.app-light #survey-modal input,
.app-light #survey-modal textarea,
.app-light #survey-item-popup input,
.app-light #survey-item-popup textarea {
    background-color: #ffffff !important;
}

/* Modal + confirm polish for SaaS */
.modal {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Upgrade / limit modal — matches header teal gradient + card polish */
.upgrade-modal-panel {
    animation: upgrade-modal-in 0.28s ease-out;
}
@keyframes upgrade-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.upgrade-plan-card:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}
.upgrade-modal-body {
    margin-top: 0;
}

.subscription-banner-cta:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}
.app-light .subscription-banner-cta:hover {
    background-color: #e0f2fe !important;
}
.app-light .upgrade-modal-body {
    background-color: #ffffff !important;
}

.app-light .upgrade-modal-panel {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}
.app-light .upgrade-limit-callout {
    background-color: #fffbeb !important;
    border-color: #fcd34d !important;
}
.app-light .upgrade-limit-callout .text-amber-300,
.app-light .upgrade-limit-callout .text-zinc-200 {
    color: #92400e !important;
}
.app-light .upgrade-features {
    color: #64748b !important;
}
.app-light .upgrade-plan-card:not(.border-teal-600\\/70) {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
.app-light .upgrade-plan-card .text-white {
    color: #0f172a !important;
}
.app-light .upgrade-plan-card .text-zinc-500 {
    color: #64748b !important;
}

/* Free trial watermark text on Gantt containers (also done in JS for PDF) */
/* Sync banner: full width, wraps on narrow phones */
#network-banner {
    box-sizing: border-box;
}
.network-banner-inner {
    box-sizing: border-box;
    word-break: break-word;
}

.gantt-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: rotate(-20deg);
    font-size: 52px;
    font-weight: 900;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.08);
    user-select: none;
}
