/* LegiTracker - Styles */

:root {
    --primary: #1a3a5c;
    --primary-light: #2c5f8a;
    --accent: #c4a43e;
    --success: #2e7d32;
    --danger: #c62828;
    --info: #1565c0;
    --neutral: #616161;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #212121;
    --text-light: #757575;
    --border: #e0e0e0;
    --republican: #d32f2f;
    --democrat: #1976d2;
}

[data-theme="dark"] {
    --primary: #1e3a5f;
    --primary-light: #2c5f8a;
    --accent: #d4b44e;
    --success: #4caf50;
    --danger: #ef5350;
    --info: #42a5f5;
    --neutral: #9e9e9e;
    --bg: #1a1a2e;
    --card-bg: #16213e;
    --text: #e0e0e0;
    --text-light: #9e9e9e;
    --border: #2a2a4a;
    --republican: #ef5350;
    --democrat: #42a5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background: var(--primary);
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-brand {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: var(--primary-light);
    color: #fff;
}

/* Navbar alert badge */
.nav-alerts {
    position: relative;
}

.alert-count {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    margin-left: 2px;
    vertical-align: top;
}

/* Keyword Alerts page */
.alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alerts-header h1 {
    margin-bottom: 0;
}

.keyword-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.keyword-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.keyword-form input:focus {
    border-color: var(--primary-light);
    outline: none;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.4rem 0.5rem 0.4rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.keyword-chip.paused {
    opacity: 0.5;
    text-decoration: line-through;
}

.keyword-chip-actions {
    display: flex;
    gap: 2px;
}

.keyword-chip-actions form {
    display: inline;
}

.keyword-chip-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.15rem 0.35rem;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.2s;
}

.keyword-chip-actions .btn-pause {
    color: var(--neutral);
}

.keyword-chip-actions .btn-pause:hover {
    background: #f5f5f5;
}

.keyword-chip-actions .btn-delete-keyword {
    color: var(--danger);
}

.keyword-chip-actions .btn-delete-keyword:hover {
    background: #ffebee;
}

.match-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.match-card .match-info {
    flex: 1;
    min-width: 0;
}

.match-card .match-bill {
    font-weight: 700;
    color: var(--info);
    text-decoration: none;
    font-size: 0.95rem;
}

.match-card .match-bill:hover {
    text-decoration: underline;
}

.match-card .match-title {
    font-size: 0.9rem;
    margin-top: 0.25rem;
    color: var(--text);
}

.match-card .match-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.35rem;
}

.match-card .match-keyword {
    background: #fff8e1;
    color: #a68300;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.match-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.match-actions form {
    display: inline;
}

.btn-add-watchlist {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #a5d6a7;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-watchlist:hover {
    background: #c8e6c9;
}

.btn-dismiss {
    background: #f5f5f5;
    color: var(--neutral);
    border: 1px solid var(--border);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-dismiss:hover {
    background: #e0e0e0;
}

.already-tracked {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
    padding: 0.35rem 0;
}

/* Main content */
main.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 140px);
}

h1 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

h3 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--info);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Search bar */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-bar form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary-light);
    outline: none;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #ccc;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Data tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.data-table th {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f9f9f9;
}

.data-table a {
    color: var(--info);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-danger {
    background: #ffebee;
    color: var(--danger);
}

.badge-info {
    background: #e3f2fd;
    color: var(--info);
}

.badge-neutral {
    background: #f5f5f5;
    color: var(--neutral);
    border: 1px solid var(--border);
}

.badge-republican {
    background: #ffebee;
    color: var(--republican);
}

.badge-democrat {
    background: #e3f2fd;
    color: var(--democrat);
}

/* Activity list */
.activity-list {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.activity-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-date {
    font-size: 0.85rem;
    color: var(--text-light);
    min-width: 90px;
}

.activity-bill {
    font-weight: 600;
    color: var(--info);
    text-decoration: none;
    min-width: 70px;
}

.activity-bill:hover {
    text-decoration: underline;
}

.activity-desc {
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
}

/* Bill detail */
.bill-header {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.bill-header h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.bill-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.bill-meta a {
    color: var(--info);
    text-decoration: none;
}

.bill-meta a:hover {
    text-decoration: underline;
}

.bill-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-lis {
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-lis:hover {
    background: var(--primary-light);
    color: #fff;
}

.btn-fiscal {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-fiscal:hover {
    background: #fff3c4;
    color: #e65100;
}

.lis-link {
    color: var(--info);
    text-decoration: none;
    font-size: 0.85rem;
}

.lis-link:hover {
    text-decoration: underline;
}

.bill-status {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Member meta */
.member-meta {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

/* Vote header */
.vote-header {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 2;
}

.vote-header a {
    color: var(--info);
    text-decoration: none;
}

.vote-header a:hover {
    text-decoration: underline;
}

/* Sections */
.section {
    margin-top: 2rem;
}

/* Sponsor list */
.sponsor-list {
    list-style: none;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.sponsor-list li {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sponsor-list li:last-child {
    border-bottom: none;
}

.sponsor-list a {
    color: var(--info);
    text-decoration: none;
}

.sponsor-list a:hover {
    text-decoration: underline;
}

/* Timeline */
.timeline {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    padding: 0.5rem 0;
}

.timeline-item {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-light);
    min-width: 90px;
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.9rem;
}

.timeline-fiscal {
    background: #fff8e1;
    border-left: 3px solid #f9a825;
    margin: 0 -0.5rem;
    padding-left: calc(1rem + 0.5rem);
    padding-right: calc(1rem + 0.5rem);
}

.fiscal-link {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--info);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.empty-state code {
    background: #e8e8e8;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Flash messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.flash-success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #c8e6c9;
}

.flash-warning {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffecb3;
}

.flash-error {
    background: #ffebee;
    color: var(--danger);
    border: 1px solid #ffcdd2;
}

/* Footer */
.footer {
    background: var(--primary);
    color: #ccc;
    padding: 1rem 0;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.refresh-form {
    display: inline;
}

.btn-refresh {
    background: var(--primary-light);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-refresh:hover:not(:disabled) {
    background: var(--accent);
    color: var(--primary);
}

.btn-refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Watchlist - Position dropdown */
.position-select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 2px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

.position-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.position-select.position-support {
    background: #e8f5e9;
    color: var(--success);
    border-color: #a5d6a7;
}

.position-select.position-oppose {
    background: #ffebee;
    color: var(--danger);
    border-color: #ef9a9a;
}

.position-select.position-noposition {
    background: #f5f5f5;
    color: var(--neutral);
    border-color: var(--border);
}

/* Watchlist - Position badges (dashboard) */
.badge-support {
    background: #e8f5e9;
    color: var(--success);
}

.badge-oppose {
    background: #ffebee;
    color: var(--danger);
}

.badge-noposition {
    background: #f5f5f5;
    color: var(--neutral);
    border: 1px solid var(--border);
}

/* Watchlist - Remove button */
.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    line-height: 1;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #ffebee;
}

/* Watchlist - Add/Active button */
.btn-watchlist {
    background: #fff8e1;
    color: #a68300;
    border: 1px solid #ffe082;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-watchlist:hover {
    background: #fff3c4;
    color: #7a6100;
}

.btn-watchlist-active {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #a5d6a7;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.btn-watchlist-active:hover {
    background: #c8e6c9;
    color: var(--success);
    text-decoration: none;
}

/* Watchlist - Bulk actions bar */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
}

/* Watchlist - Checkbox column */
.data-table th.col-check,
.data-table td.col-check {
    width: 40px;
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.data-table td.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.data-table th.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tracked-check {
    color: var(--success);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Watchlist page header */
.watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.watchlist-header h1 {
    margin-bottom: 0;
}

.watchlist-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-export {
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-export:hover {
    background: var(--primary-light);
    color: #fff;
}

/* Legislator profile card */
.legislator-profile {
    display: flex;
    gap: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.legislator-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}

.legislator-photo-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    background: var(--bg);
    vertical-align: middle;
    flex-shrink: 0;
}

.legislator-info {
    flex: 1;
    min-width: 0;
}

.legislator-info h1 {
    margin-bottom: 0.5rem;
}

.legislator-meta-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.legislator-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-lis-profile {
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-lis-profile:hover {
    background: var(--primary-light);
    color: #fff;
}

.btn-lis-outline {
    background: transparent;
    color: var(--primary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--primary);
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}

.btn-lis-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* Legislator name cell with photo */
.legislator-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Vote proportion bar */
.vote-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.5rem;
    background: var(--border);
}

.vote-bar-yea {
    background: var(--success);
}

.vote-bar-nay {
    background: var(--danger);
}

.vote-bar-other {
    background: var(--neutral);
}

.vote-bar-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.vote-bar-legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.vote-bar-legend .legend-yea::before {
    background: var(--success);
}

.vote-bar-legend .legend-nay::before {
    background: var(--danger);
}

.vote-bar-legend .legend-other::before {
    background: var(--neutral);
}

/* Bill status badge */
.badge-passed {
    background: #e8f5e9;
    color: var(--success);
}

.badge-approved {
    background: #c8e6c9;
    color: #1b5e20;
}

.badge-vetoed {
    background: #ffebee;
    color: var(--danger);
}

.badge-failed {
    background: #ffebee;
    color: var(--danger);
}

.badge-introduced {
    background: #e3f2fd;
    color: var(--info);
}

/* Notes toggle button */
.btn-notes-toggle {
    background: none;
    border: none;
    color: var(--info);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.2s;
}

.btn-notes-toggle:hover {
    background: #e3f2fd;
}

.btn-notes-toggle.has-notes {
    color: var(--accent);
}

/* Notes row */
.notes-row td {
    padding: 0 1rem 0.75rem 1rem !important;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
}

.notes-row:hover td {
    background: #fafafa !important;
}

.notes-container {
    padding: 0.5rem 0;
}

.notes-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.5;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
}

.notes-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 4px;
}

.notes-saved {
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

.notes-error {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Activity date headers */
.activity-date-header {
    position: sticky;
    top: 0;
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-light);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Logout nav link */
.nav-logout {
    color: #ef9a9a !important;
}

.nav-logout:hover {
    color: #fff !important;
    background: var(--danger) !important;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #e0e0e0;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.theme-toggle:hover {
    background: var(--primary-light);
    color: #fff;
}

/* Dark mode overrides for hardcoded colors */
[data-theme="dark"] .data-table tr:hover td {
    background: #1e2d4a;
}

[data-theme="dark"] .filter-select {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .badge-success {
    background: #1b3a1b;
    color: var(--success);
}

[data-theme="dark"] .badge-danger {
    background: #3a1b1b;
    color: var(--danger);
}

[data-theme="dark"] .badge-info {
    background: #1b2a3a;
    color: var(--info);
}

[data-theme="dark"] .badge-neutral {
    background: #2a2a3a;
    color: var(--neutral);
    border-color: var(--border);
}

[data-theme="dark"] .badge-republican {
    background: #3a1b1b;
    color: var(--republican);
}

[data-theme="dark"] .badge-democrat {
    background: #1b2a3a;
    color: var(--democrat);
}

[data-theme="dark"] .btn-secondary {
    background: var(--border);
    color: var(--text);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #3a3a5a;
}

[data-theme="dark"] .btn-watchlist {
    background: #2a2510;
    color: var(--accent);
    border-color: #4a4020;
}

[data-theme="dark"] .btn-watchlist:hover {
    background: #3a3515;
}

[data-theme="dark"] .btn-watchlist-active {
    background: #1b3a1b;
    color: var(--success);
    border-color: #2a5a2a;
}

[data-theme="dark"] .btn-watchlist-active:hover {
    background: #2a4a2a;
}

[data-theme="dark"] .bulk-actions {
    background: #2a2510;
    border-color: #4a4020;
}

[data-theme="dark"] .btn-fiscal {
    background: #2a2510;
    color: #ffb74d;
    border-color: #4a4020;
}

[data-theme="dark"] .btn-fiscal:hover {
    background: #3a3515;
    color: #ffa726;
}

[data-theme="dark"] .timeline-fiscal {
    background: #2a2510;
    border-left-color: #f9a825;
}

[data-theme="dark"] .flash-success {
    background: #1b3a1b;
    color: var(--success);
    border-color: #2a5a2a;
}

[data-theme="dark"] .flash-warning {
    background: #2a2510;
    color: #ffb74d;
    border-color: #4a4020;
}

[data-theme="dark"] .flash-error {
    background: #3a1b1b;
    color: var(--danger);
    border-color: #5a2a2a;
}

[data-theme="dark"] .notes-row td {
    background: #0e1629 !important;
}

[data-theme="dark"] .notes-row:hover td {
    background: #0e1629 !important;
}

[data-theme="dark"] .btn-notes-toggle:hover {
    background: #1b2a3a;
}

[data-theme="dark"] .position-select.position-support {
    background: #1b3a1b;
    color: var(--success);
    border-color: #2a5a2a;
}

[data-theme="dark"] .position-select.position-oppose {
    background: #3a1b1b;
    color: var(--danger);
    border-color: #5a2a2a;
}

[data-theme="dark"] .position-select.position-noposition {
    background: #2a2a3a;
    color: var(--neutral);
    border-color: var(--border);
}

[data-theme="dark"] .badge-support {
    background: #1b3a1b;
}

[data-theme="dark"] .badge-oppose {
    background: #3a1b1b;
}

[data-theme="dark"] .badge-noposition {
    background: #2a2a3a;
    border-color: var(--border);
}

[data-theme="dark"] .btn-remove:hover {
    background: #3a1b1b;
}

[data-theme="dark"] .empty-state code {
    background: #2a2a3a;
}

[data-theme="dark"] .activity-date-header {
    background: #0e1629;
    color: var(--accent);
}

[data-theme="dark"] .match-card .match-keyword {
    background: #2a2510;
    color: var(--accent);
}

[data-theme="dark"] .btn-add-watchlist {
    background: #1b3a1b;
    color: var(--success);
    border-color: #2a5a2a;
}

[data-theme="dark"] .btn-add-watchlist:hover {
    background: #2a4a2a;
}

[data-theme="dark"] .btn-dismiss {
    background: #2a2a3a;
    color: var(--neutral);
    border-color: var(--border);
}

[data-theme="dark"] .btn-dismiss:hover {
    background: #3a3a5a;
}

[data-theme="dark"] .keyword-chip-actions .btn-pause:hover {
    background: #2a2a3a;
}

[data-theme="dark"] .keyword-chip-actions .btn-delete-keyword:hover {
    background: #3a1b1b;
}

[data-theme="dark"] .badge-passed {
    background: #1b3a1b;
}

[data-theme="dark"] .badge-approved {
    background: #1b3a1b;
    color: var(--success);
}

[data-theme="dark"] .badge-vetoed,
[data-theme="dark"] .badge-failed {
    background: #3a1b1b;
}

[data-theme="dark"] .badge-introduced {
    background: #1b2a3a;
}

[data-theme="dark"] .form-group input {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .keyword-form input {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .search-input {
    background: var(--card-bg);
    color: var(--text);
}

[data-theme="dark"] .notes-textarea {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"] {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .nav-logout {
    color: #ef9a9a !important;
}

/* Responsive */
@media (max-width: 768px) {
    .legislator-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .legislator-meta-row {
        justify-content: center;
    }

    .legislator-actions {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .bill-meta,
    .member-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .activity-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Multi-Tenancy Styles ─────────────────────────────────── */

/* Invite code styling */
code.invite-code {
    background: #e8f5e9;
    color: var(--success);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: "SF Mono", "Fira Code", monospace;
}

[data-theme="dark"] code.invite-code {
    background: #1b3a1b;
    color: var(--success);
}

/* Watchlist filter bar */
.watchlist-filter-bar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

/* Share checkbox inline */
.share-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.share-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Watchlist add inline form (bill detail) */
.watchlist-add-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

/* Role select dropdown */
.role-select {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
}

.role-form {
    display: inline;
}

/* Org settings page */
.org-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.org-section h3 {
    margin-bottom: 0.75rem;
}

.org-rename-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.org-name-input {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    flex: 1;
    max-width: 400px;
    background: var(--card-bg);
    color: var(--text);
}

.org-name-input:focus {
    border-color: var(--primary-light);
    outline: none;
}

.org-name-display {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Invite form */
.invite-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.invite-uses-select {
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    background: var(--card-bg);
    color: var(--text);
}

.invite-help {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.invite-help code {
    background: #e0e0e0;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

[data-theme="dark"] .invite-help {
    background: #0e1629;
}

[data-theme="dark"] .invite-help code {
    background: #2a2a3a;
}

[data-theme="dark"] .org-name-input {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .role-select {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .invite-uses-select {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

/* ── Floor Badge & Watch Link ──────────────────────────── */

.badge-floor {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
    animation: floor-pulse 2s ease-in-out infinite;
}

@keyframes floor-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #a5d6a7;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-watch:hover {
    background: #c8e6c9;
    color: var(--success);
    text-decoration: none;
}

[data-theme="dark"] .badge-floor {
    background: #2a1a00;
    color: #ffb74d;
    border-color: #4a3010;
}

[data-theme="dark"] .btn-watch {
    background: #1b3a1b;
    color: var(--success);
    border-color: #2a5a2a;
}

[data-theme="dark"] .btn-watch:hover {
    background: #2a4a2a;
}

/* ── Bill Categories ──────────────────────────────────── */

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.category-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0 0.1rem;
    opacity: 0.6;
    color: inherit;
    transition: opacity 0.2s;
}

.category-tag-remove:hover {
    opacity: 1;
}

.category-add-dropdown {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

.category-add-btn {
    background: var(--card-bg);
    border: 1px dashed var(--border);
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.category-add-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: #f0f0f0;
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.25rem 0;
    min-width: 140px;
    max-height: 200px;
    overflow-y: auto;
}

.category-dropdown-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.category-dropdown-item:hover {
    background: #f5f5f5;
}

.category-create-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.category-color-picker {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: var(--card-bg);
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.category-chip:last-child {
    border-bottom: none;
}

.category-tags-cell {
    white-space: normal;
    min-width: 100px;
}

[data-theme="dark"] .category-add-btn {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text-light);
}

[data-theme="dark"] .category-add-btn:hover {
    background: #2a2a3a;
    border-color: var(--primary-light);
}

[data-theme="dark"] .category-dropdown-menu {
    background: var(--card-bg);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] .category-dropdown-item:hover {
    background: #1e2d4a;
}

[data-theme="dark"] .category-color-picker {
    background: var(--card-bg);
    border-color: var(--border);
}

/* ── SMTP Form Layout ──────────────────────────────────── */

.smtp-form {
    max-width: 600px;
}

.smtp-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.smtp-row .form-group {
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .smtp-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ── Settings Page ──────────────────────────────────────── */

.settings-form {
    max-width: 600px;
}

.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.settings-section h3 {
    margin-bottom: 1rem;
}

.settings-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: var(--card-bg);
    color: var(--text);
}

.settings-input:focus {
    border-color: var(--primary-light);
    outline: none;
}

.settings-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.radio-option:hover {
    border-color: var(--primary-light);
    background: #f9f9f9;
}

.radio-option input[type="radio"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    cursor: pointer;
}

.radio-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

.radio-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.radio-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.radio-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.info-banner {
    background: #e3f2fd;
    color: var(--info);
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Dark mode overrides for settings */
[data-theme="dark"] .settings-input {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .radio-option:hover {
    background: #1e2d4a;
}

[data-theme="dark"] .info-banner {
    background: #1b2a3a;
    color: var(--info);
    border-color: #1e3a5f;
}

/* ── Priority Dropdown ─────────────────────────────────────── */

.priority-select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 2px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

.priority-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.priority-select.priority-critical {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.priority-select.priority-high {
    background: #fd7e14;
    color: white;
    border-color: #fd7e14;
}

.priority-select.priority-normal {
    background: #f5f5f5;
    color: var(--neutral);
    border-color: var(--border);
}

.priority-select.priority-low {
    background: #adb5bd;
    color: #333;
    border-color: #adb5bd;
}

[data-theme="dark"] .priority-select.priority-critical {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

[data-theme="dark"] .priority-select.priority-high {
    background: #fd7e14;
    color: white;
    border-color: #fd7e14;
}

[data-theme="dark"] .priority-select.priority-normal {
    background: #2a2a3a;
    color: var(--neutral);
    border-color: var(--border);
}

[data-theme="dark"] .priority-select.priority-low {
    background: #4a4a5a;
    color: #adb5bd;
    border-color: #4a4a5a;
}

/* ── Activity Log Styles ───────────────────────────────────── */

.notes-activity-container {
    display: flex;
    gap: 2rem;
    padding: 0.5rem 0;
}

.notes-section {
    flex: 0 0 35%;
    min-width: 250px;
}

.activity-section {
    flex: 1;
    min-width: 0;
}

.notes-section h4,
.activity-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--primary);
}

.activity-add-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.activity-type-select {
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text);
    min-width: 130px;
}

.activity-content-input {
    flex: 1;
    min-width: 200px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text);
}

.activity-content-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.activity-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
}

.activity-loading,
.activity-empty,
.activity-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.activity-error {
    color: var(--danger);
}

.activity-entry {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.activity-entry:last-child {
    border-bottom: none;
}

.activity-entry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.activity-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Activity type colors */
.activity-type-note {
    background: #e3f2fd;
    color: var(--info);
}

.activity-type-phone-call {
    background: #e8f5e9;
    color: var(--success);
}

.activity-type-email {
    background: #fff3e0;
    color: #e65100;
}

.activity-type-meeting {
    background: #f3e5f5;
    color: #7b1fa2;
}

.activity-type-testimony {
    background: #ffebee;
    color: var(--danger);
}

.activity-type-action-alert {
    background: #fff8e1;
    color: #f57f17;
}

.activity-type-letter {
    background: #e0f2f1;
    color: #00695c;
}

.activity-type-social-media {
    background: #e8eaf6;
    color: #3f51b5;
}

.activity-type-press {
    background: #fce4ec;
    color: #c2185b;
}

.activity-type-coalition-meeting {
    background: #f1f8e9;
    color: #558b2f;
}

.activity-type-site-visit {
    background: #eceff1;
    color: #546e7a;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    flex: 1;
}

.btn-activity-delete {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-activity-delete:hover {
    opacity: 1;
}

.activity-entry-content {
    font-size: 0.85rem;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Bill detail page activity section */
.bill-detail-activity {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bill-detail-activity .activity-add-form {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.bill-detail-activity .activity-list-container {
    max-height: 400px;
}

/* ── Latest Action Badges ─────────────────────────────────── */

.latest-action-cell {
    min-width: 200px;
    max-width: 300px;
}

.action-badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
    border-left: 3px solid transparent;
}

.action-date-sub {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    padding-left: 0.25rem;
}

.bill-number-link {
    font-weight: 700;
    font-size: 0.95rem;
}

.bill-patron-sub {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.15rem;
}

/* Dead / Failed / Tabled */
.action-dead {
    background: #ffebee;
    color: #b71c1c;
    border-left-color: #c62828;
}

/* Signed / Approved by Governor */
.action-signed {
    background: #e8f5e9;
    color: #1b5e20;
    border-left-color: #2e7d32;
}

/* Passed chamber */
.action-passed {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #43a047;
}

/* Progress - reported/reading */
.action-progress {
    background: #e3f2fd;
    color: #0d47a1;
    border-left-color: #1565c0;
}

/* On agenda */
.action-agenda {
    background: #fff3e0;
    color: #e65100;
    border-left-color: #f57c00;
}

/* In committee */
.action-committee {
    background: #f3e5f5;
    color: #6a1b9a;
    border-left-color: #8e24aa;
}

/* Warning - continued / incorporated */
.action-warning {
    background: #fff8e1;
    color: #f57f17;
    border-left-color: #fbc02d;
}

/* Neutral / default */
.action-neutral {
    background: #f5f5f5;
    color: var(--neutral);
    border-left-color: var(--border);
}

/* Dark mode action badges */
[data-theme="dark"] .action-dead {
    background: #3a1b1b;
    color: #ef5350;
    border-left-color: #ef5350;
}

[data-theme="dark"] .action-signed {
    background: #1b3a1b;
    color: #66bb6a;
    border-left-color: #66bb6a;
}

[data-theme="dark"] .action-passed {
    background: #1b3a1b;
    color: #4caf50;
    border-left-color: #4caf50;
}

[data-theme="dark"] .action-progress {
    background: #1b2a3a;
    color: #42a5f5;
    border-left-color: #42a5f5;
}

[data-theme="dark"] .action-agenda {
    background: #2a1a00;
    color: #ffb74d;
    border-left-color: #ffb74d;
}

[data-theme="dark"] .action-committee {
    background: #2a1a3a;
    color: #ce93d8;
    border-left-color: #ce93d8;
}

[data-theme="dark"] .action-warning {
    background: #2a2510;
    color: var(--accent);
    border-left-color: var(--accent);
}

[data-theme="dark"] .action-neutral {
    background: #2a2a3a;
    color: var(--neutral);
    border-left-color: var(--border);
}

[data-theme="dark"] .action-date-sub {
    color: var(--text-light);
}

/* Excel export button */
.btn-excel {
    background: #217346;
    color: #fff;
}

.btn-excel:hover {
    background: #1a5c38;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notes-activity-container {
        flex-direction: column;
        gap: 1rem;
    }

    .notes-section {
        flex: 1;
    }

    .activity-add-form {
        flex-direction: column;
    }

    .activity-type-select,
    .activity-content-input {
        width: 100%;
    }
}

/* Dark mode overrides for activity styles */
[data-theme="dark"] .activity-type-select {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .activity-content-input {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .activity-list-container {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .activity-type-note {
    background: #1b2a3a;
    color: var(--info);
}

[data-theme="dark"] .activity-type-phone-call {
    background: #1b3a1b;
    color: var(--success);
}

[data-theme="dark"] .activity-type-email {
    background: #2a2010;
    color: #ffb74d;
}

[data-theme="dark"] .activity-type-meeting {
    background: #2a1a3a;
    color: #ce93d8;
}

[data-theme="dark"] .activity-type-testimony {
    background: #3a1b1b;
    color: var(--danger);
}

[data-theme="dark"] .activity-type-action-alert {
    background: #2a2510;
    color: var(--accent);
}

[data-theme="dark"] .activity-type-letter {
    background: #1a2a2a;
    color: #4db6ac;
}

[data-theme="dark"] .activity-type-social-media {
    background: #1a1a3a;
    color: #7986cb;
}

[data-theme="dark"] .activity-type-press {
    background: #3a1a2a;
    color: #f48fb1;
}

[data-theme="dark"] .activity-type-coalition-meeting {
    background: #1a2a1a;
    color: #aed581;
}

[data-theme="dark"] .activity-type-site-visit {
    background: #2a2a3a;
    color: #90a4ae;
}

[data-theme="dark"] .bill-detail-activity {
    background: var(--card-bg);
    border-color: var(--border);
}

[data-theme="dark"] .btn-excel {
    background: #1a5c38;
}

[data-theme="dark"] .btn-excel:hover {
    background: #217346;
}
