:root {
    --brand: #00e676;
    --brand-strong: #00c36a;
    --brand-soft: #e9fbf1;
    --ink: #111814;
    --muted: #6b7280;
    --bg: #f6f8f7;
    --surface: #ffffff;
    --border: #e5e7eb;
    --shadow-soft: 0 14px 34px -22px rgba(15, 23, 42, 0.35);
    --tg-theme-button-color: #00e676;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Manrope", "Inter", system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

#app {
    min-height: 100vh;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.card {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.card-soft {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1.25rem;
}

.btn-primary {
    background: var(--brand);
    color: #0b3d22;
    border-radius: 1.25rem;
    font-weight: 700;
    box-shadow: 0 18px 32px -18px rgba(0, 230, 118, 0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-secondary {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border: 1px solid rgba(0, 195, 106, 0.25);
    border-radius: 1.25rem;
    font-weight: 600;
    transition: transform 0.15s ease;
}

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

.btn-outline {
    background: #ffffff;
    color: var(--ink);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1.25rem;
    font-weight: 600;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #111827;
    white-space: nowrap;
}

.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #0b3d22;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #ffffff;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.2);
}

.input-shell input,
.input-shell select {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    color: var(--ink);
}

.input-shell input::placeholder {
    color: #94a3b8;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.muted {
    color: var(--muted);
}

.timer-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.35);
}

.timer-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.04em;
}

.timer-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.status-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-completed {
    background: rgba(0, 230, 118, 0.15);
    color: #087f47;
}

.status-progress {
    background: rgba(20, 184, 166, 0.18);
    color: #0f766e;
}

.status-planned {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.status-draft {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: rgba(148, 163, 184, 0.16);
    padding: 0.35rem;
    border-radius: 999px;
    gap: 0.35rem;
}

.segmented button {
    border-radius: 999px;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
}

.segmented button.is-active {
    background: #ffffff;
    color: #0b9f5b;
    box-shadow: 0 10px 20px -16px rgba(15, 23, 42, 0.3);
}

.period-toggle {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.period-toggle button {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #475569;
}

.period-toggle button.is-active {
    background: var(--brand-soft);
    border-color: rgba(0, 195, 106, 0.4);
    color: #0b9f5b;
}

/* Calendar view toggle buttons */
#btn-week,
#btn-twoweeks,
#btn-month {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.6rem !important;
    white-space: nowrap;
}

.segmented-compact {
    padding: 0.25rem;
    gap: 0.2rem;
}

.segmented-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}