/* Base styles for Top Docs voting POC */
:root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --accent: #22d3ee;
    --link: #7dd3fc;
    --muted: #9ca3af;
    --panel: rgba(255, 255, 255, 0.03);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 20%, #0b1223, var(--bg)),
                radial-gradient(circle at 80% 0%, #0a1a2f, var(--bg)),
                radial-gradient(900px at 50% 10%, rgba(34, 211, 238, 0.06), transparent 55%);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

a,
a:visited,
a:-webkit-any-link {
    color: var(--link);
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.site-header {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    padding-left: 16px;
    padding-right: 16px;
}

.site-header .nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 14px 0;
    gap: 12px;
}

.logo-img {
    height: 52px;
    width: auto;
    max-width: 90vw;
}

.page-home .brand-logo {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-name {
    font-size: 1rem;
    color: rgba(229, 231, 235, 0.92);
}

.nav-rail {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: space-between;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    position: relative;
    color: var(--link);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, #22d3ee, #38bdf8);
    opacity: 0;
    transform: scaleX(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    opacity: 0.9;
    transform: scaleX(1);
}

.nav-link.active {
    color: #d8f5ff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.account-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    font-weight: 600;
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.24);
}

.ghost-button:focus-visible,
.profile-trigger:focus-visible,
.dropdown-item:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.7);
    outline-offset: 2px;
}

.ghost-button .icon,
.profile-trigger .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.ghost-button svg,
.profile-trigger svg,
.profile-menu .icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    /* background: rgba(255, 255, 255, 0.08); */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--link);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.profile-trigger span {
    color: inherit;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.23);
    border-color: rgba(255, 255, 255, 0.28);
}

.chevron svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 220px;
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    padding: 8px;
    display: none;
    backdrop-filter: blur(10px);
}

.profile-menu.is-open {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}

.dropdown-item .icon {
    opacity: 0.85;
    display: inline-flex;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e5f6ff;
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.26);
}

.hero {
    padding: 40px 0 28px;
}

.hero-shell {
    display: flex;
    justify-content: center;
}

.hero-panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px 36px 32px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    text-align: center;
    width: min(1180px, 100%);
    position: relative;
    overflow: hidden;
}

.hero-panel.wide {
    width: 100%;
    max-width: 100%;
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: -40% -10% auto -10%;
    height: 80%;
    background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.12), transparent 65%);
    pointer-events: none;
}

.hero-logo {
    max-width: 390px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.hero h1 {
    margin: 10px 0 6px;
    font-size: 2.8rem;
    letter-spacing: -0.01em;
}

.hero p {
    margin: 0;
    color: rgba(229, 231, 235, 0.82);
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary-cta {
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    color: #0a1728;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3);
}

.btn-primary-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.35);
}

.btn-primary-cta:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary-cta {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.btn-secondary-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.btn-secondary-cta:active {
    transform: translateY(0);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 30px 0;
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.card h3 {
    margin: 0 0 8px;
}

.card p {
    margin: 0;
    color: var(--muted);
}

button,
.button {
    display: inline-block;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    /* color: #0a1728 !important; */
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34, 211, 238, 0.25);
    opacity: 0.95;
}

.page-content {
    min-height: 70vh;
}

.site-footer {
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vote-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
}

.vote-search-input {
    flex: 1;
    min-width: 240px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #1f2937;
    background: #0f172a;
    color: #e5e7eb;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.category-card,
.nominee-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px;
    border-radius: 14px;
    background: #0d1527;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    gap: 6px;
}

.category-card .title {
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.category-card .button {
    margin-top: auto;
    width: 100%;
    text-align: center;
}

.search-results-card {
    position: relative;
    z-index: 2;
}

.category-card.selected-cat {
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(34, 211, 238, 0.25);
}

.category-card.complete-cat {
    border-color: #22c55e;
    background: #0f1f14;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.25);
}

.category-card.partial-cat {
    border-color: #f59e0b;
    background: #1a150a;
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.25);
}

.category-card.hidden {
    display: none;
}

@media (min-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #1f2a44;
    background: #0b1220;
    color: #e5e7eb;
}

.nominee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.ballot-box {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: #0d1527;
}

.ballot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
}

.ballot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ballot-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 211, 238, 0.12);
    color: #e5e7eb;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.4);
}

.chip-remove {
    background: transparent;
    border: none;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
}

.ballot-empty {
    color: #9ca3af;
}

.close-detail {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
    text-decoration: none;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.close-detail:hover {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.3);
}

.nominee-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.nominee-filter {
    flex: 1;
    min-width: 200px;
}

.cast-votes-btn {
    width: 100%;
    margin: 10px 0 14px;
    padding: 12px 14px;
    background: linear-gradient(90deg, #22d3ee, #0ea5e9);
    color: #0b1220;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.cast-votes-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.25);
}

.cast-votes-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.limit-warning {
    color: #fbbf24;
    margin-bottom: 8px;
    min-height: 18px;
}

.nominee-card.hidden {
    display: none;
}

.nominee-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nominee-card input {
    margin-right: 8px;
}

.nominee-card input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
    transform: translateY(2px);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 28px 0 34px;
}

.action-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.action-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.action-card p {
    margin: 0 0 14px;
    color: rgba(229, 231, 235, 0.85);
    line-height: 1.5;
}

.card-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.12);
    border-radius: 10px;
    margin-bottom: 12px;
}

.card-icon svg {
    width: 20px;
    height: 20px;
    stroke: #38bdf8;
    stroke-width: 2;
    fill: none;
}

.card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #0b1223 !important;
    font-weight: 700;
    background: linear-gradient(135deg, #1ea6d6, #0b7eb2);
    box-shadow: 0 10px 24px rgba(14, 126, 178, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(11, 126, 178, 0.36);
}

.card-action:active {
    transform: translateY(0);
}

.tabbed-card .tab-header {
    gap: 10px;
}

.tabbed-card .tab-btn {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
   /*  background: rgba(255, 255, 255, 0.04); */
    color: var(--text);
    font-weight: 700;
    padding: 8px 14px;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tabbed-card .tab-btn.btn-primary,
.tabbed-card .tab-btn.active {
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    border-color: rgba(99, 102, 241, 0.6);
    color: #0b1223;
}

.tabbed-card .tab-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
    /* background: rgba(255, 255, 255, 0.08); */
}

@media (max-width: 900px) {
    .site-header .nav-shell {
        position: relative;
        flex-direction: row;
        align-items: center;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .nav-rail {
        display: none;
        position: absolute;
        top: 100%;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(17, 24, 39, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        padding: 12px;
        gap: 12px;
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32);
    }

    .nav-rail.is-open {
        display: flex;
    }

    .site-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 10px 12px;
    }

    .account-area {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-dropdown,
    .profile-trigger {
        width: 100%;
    }

    .profile-trigger {
        justify-content: space-between;
    }

    .profile-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 6px;
    }

    .hero-panel {
        padding: 22px 18px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 36px 0 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-cta {
        width: 100%;
        height: 44px;
    }

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

    .vote-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .nominee-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .nominee-controls {
        flex-direction: column;
        align-items: stretch;
    }
}
.vote-search-input {
    flex: 1;
    min-width: 240px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #1f2a44;
    background: #0b1220;
    color: #e5e7eb;
}
