:root {
    --ink: #9eb7af;
    --navy: #9eb7af;
    --navy-2: #c0c8d1;
    --text: #1d2939;
    --muted: #667085;
    --line: #e4e7ec;
    --bg: #f5f7fa;
    --card: #ffffff;
    --accent: #2f6fed;
    --accent-soft: #eaf1fe;
    --teal: #0e9f8e;
    --teal-soft: #e5f6f4;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
    --shadow-hover: 0 2px 4px rgba(16, 24, 40, .05), 0 16px 36px rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- Login */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:#9eb7af;
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
    pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .logo { height: 34px; width: 100px; }

.auth-brand h2 {
    margin: 0 0 14px;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
    max-width: 440px;
}

.auth-brand p {
    margin: 0;
    max-width: 400px;
    color: rgba(255, 255, 255, .68);
    font-size: 16px;
}

.auth-brand small { color: rgba(255, 255, 255, .45); font-size: 12.5px; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fff;
}

.auth-card { width: 100%; max-width: 380px; }

.auth-card .eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
}

.auth-card .lead { margin: 0 0 32px; color: var(--muted); }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 18px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.btn-google:hover { background: #f9fafb; border-color: #98a2b3; box-shadow: 0 4px 12px rgba(16, 24, 40, .08); }
.btn-google:active { transform: translateY(1px); }
.btn-google:focus-visible { outline: 3px solid rgba(47, 111, 237, .35); outline-offset: 2px; }

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecdca;
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13.5px;
}

.alert svg { flex-shrink: 0; margin-top: 2px; }

.auth-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-brand { padding: 28px 24px; min-height: 0; }
    .auth-brand .pitch, .auth-brand small { display: none; }
    .auth-panel { align-items: flex-start; padding: 40px 16px; }
}

/* ------------------------------------------------------------ Dashboard */

.topbar {
    background: linear-gradient(180deg, var(--navy) 0%, var(--ink) 100%);
    color: #fff;
}

.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar .logo { height: 28px; width: auto; display: block; }

.user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-meta { text-align: right; min-width: 0; }
.user-meta strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .2);
    background: var(--navy-2);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.hero { background: var(--ink); }

.hero-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 24px 80px;
    color: #fff;
}

.hero h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .62); }

.wrap { max-width: 1120px; margin: -56px auto 0; padding: 0 24px 56px; }

.section-label {
    margin: 40px 0 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d0d5dd; }
.tile:focus-visible { outline: 3px solid rgba(47, 111, 237, .35); outline-offset: 2px; }

.tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
}

.tile-icon.blue { background: var(--accent-soft); color: var(--accent); }
.tile-icon.teal { background: var(--teal-soft); color: var(--teal); }

.tile h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
.tile p { margin: 0 0 22px; color: var(--muted); font-size: 14px; flex: 1; }

.tile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.tile-link svg { transition: transform .18s ease; }
.tile:hover .tile-link svg { transform: translateX(3px); }

.tile .host {
    position: absolute;
    top: 26px;
    right: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
}

.foot {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 32px;
    color: #98a2b3;
    font-size: 12.5px;
}

@media (max-width: 640px) {
    .topbar-inner, .hero-inner, .wrap, .foot { padding-left: 16px; padding-right: 16px; }
    .user-meta { display: none; }
    .hero h1 { font-size: 24px; }
    .grid { grid-template-columns: 1fr; }
}
