:root {
    --app-ink: #132321;
    --app-muted: #62706d;
    --app-line: rgba(19, 35, 33, 0.12);
    --app-card: rgba(255, 255, 255, 0.86);
    --app-danger: #8b2f2f;
    --app-danger-bg: #fff0f0;
    --app-success: #236145;
    --app-success-bg: #eef8f2;
}

.app-alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin: 0 0 18px;
    font-size: 0.95rem;
    line-height: 1.45;
    border: 1px solid var(--app-line);
}

.app-alert-success {
    color: var(--app-success);
    background: var(--app-success-bg);
    border-color: rgba(35, 97, 69, 0.18);
}

.app-alert-error {
    color: var(--app-danger);
    background: var(--app-danger-bg);
    border-color: rgba(139, 47, 47, 0.2);
}

.marketing-alert-wrap {
    position: fixed;
    left: 50%;
    top: 92px;
    transform: translateX(-50%);
    width: min(92vw, 760px);
    z-index: 40;
}

.app-auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 15%, rgba(201, 168, 92, 0.16), transparent 32rem),
        linear-gradient(135deg, #f7f4ec, #edf2ed 48%, #f9f8f3);
    color: var(--app-ink);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.auth-card {
    width: min(100%, 520px);
    padding: clamp(28px, 5vw, 48px);
    border-radius: 30px;
    background: var(--app-card);
    border: 1px solid rgba(19, 35, 33, 0.12);
    box-shadow: 0 32px 90px rgba(19, 35, 33, 0.14);
    backdrop-filter: blur(18px);
}

.auth-logo {
    display: inline-flex;
    margin-bottom: 28px;
}

.auth-logo img {
    width: min(250px, 68vw);
    height: auto;
    display: block;
}

.auth-card h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-lede {
    color: var(--app-muted);
    margin: 0 0 26px;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    color: var(--app-ink);
    font-weight: 650;
}

.auth-form input {
    width: 100%;
    border: 1px solid rgba(19, 35, 33, 0.16);
    border-radius: 15px;
    padding: 14px 15px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--app-ink);
    font: inherit;
}

.auth-form button {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

.auth-footnote {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 22px;
    color: var(--app-muted);
    font-size: 0.96rem;
}

.auth-footnote a {
    color: var(--app-ink);
    font-weight: 750;
}

.app-dashboard-page {
    min-height: 100vh;
    background: #f7f4ec;
    color: var(--app-ink);
}

.app-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 14px clamp(18px, 4vw, 54px);
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 244, 236, 0.88);
    border-bottom: 1px solid rgba(19, 35, 33, 0.1);
    backdrop-filter: blur(18px);
}

.app-brand img {
    display: block;
    width: min(235px, 56vw);
    height: auto;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-nav a,
.app-nav button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--app-ink);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.app-nav form {
    margin: 0;
}

.app-main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(28px, 6vw, 72px) 0;
}

.dashboard-hero {
    padding: clamp(30px, 6vw, 64px);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(19, 35, 33, 0.94), rgba(26, 54, 49, 0.92)),
        radial-gradient(circle at 85% 20%, rgba(201, 168, 92, 0.22), transparent 26rem);
    color: white;
    box-shadow: 0 26px 70px rgba(19, 35, 33, 0.18);
}

.dashboard-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.dashboard-hero p:last-child {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.74);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.7;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.dashboard-card,
.dashboard-panel {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(19, 35, 33, 0.1);
    border-radius: 26px;
    box-shadow: 0 18px 44px rgba(19, 35, 33, 0.06);
}

.dashboard-card {
    padding: 24px;
}

.dashboard-kicker {
    color: var(--app-muted);
    font-weight: 800;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.dashboard-card h2 {
    margin: 10px 0 8px;
    font-size: clamp(1.45rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
    text-transform: capitalize;
}

.dashboard-card p {
    margin: 0;
    color: var(--app-muted);
    line-height: 1.55;
}

.dashboard-panel {
    padding: clamp(22px, 4vw, 34px);
    margin-top: 20px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    letter-spacing: -0.05em;
}

.empty-state {
    margin: 0;
    padding: 22px;
    border: 1px dashed rgba(19, 35, 33, 0.18);
    border-radius: 20px;
    color: var(--app-muted);
    background: rgba(255, 255, 255, 0.46);
}

.case-list,
.activity-list {
    display: grid;
    gap: 14px;
}

.case-row,
.activity-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(19, 35, 33, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
}

.case-row h3 {
    margin: 0 0 6px;
    font-size: 1.12rem;
}

.case-row p,
.activity-row p {
    margin: 0;
    color: var(--app-muted);
    line-height: 1.5;
}

.case-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-end;
    min-width: 160px;
}

.case-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(19, 35, 33, 0.06);
    color: var(--app-muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-transform: capitalize;
}

.activity-row {
    display: grid;
    gap: 6px;
}

.activity-row span {
    color: var(--app-muted);
    font-size: 0.9rem;
}

@media (max-width: 860px) {
    .app-topbar,
    .app-nav,
    .case-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .case-meta {
        align-items: flex-start;
    }
}
