@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;700;900&display=swap');

:root {
    --primary: #0F3D7D;
    --primary-light: #1A52A0;
    --accent: #C60000;
    --accent-hover: #700000;
    --success: #1B8A4E;
    --success-light: #E8F5EE;
    --danger: #C53030;
    --danger-light: #FEE8E8;
    --bg: #F5F6FA;
    --card-bg: #FFFFFF;
    --text: #111424;
    --text-muted: #4A4E69;
    --border: #E2E4ED;
    --shadow: 0 4px 12px rgba(10, 49, 97, 0.08);
    --shadow-lg: 0 8px 30px rgba(10, 49, 97, 0.12);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    line-height: 1.2;
}

header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.brand-icon {
    font-size: 2rem;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background-color: #EFF6FF;
}

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Bills Grid */
.bills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.bill-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.bill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bill-header {
    background: var(--primary);
    color: white;
    padding: 1.25rem 1.5rem;
}

.bill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.bill-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bill-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ai-summary {
    font-size: 0.95rem;
    color: var(--text);
    background: #F1F5F9;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--accent);
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pro-con-list {
    list-style: none;
}

.pro-con-list h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.pro-con-list.pros h4 { color: var(--success); }
.pro-con-list.cons h4 { color: var(--danger); }

.pro-con-list li {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
}

.pro-con-list.pros li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.pro-con-list.cons li::before {
    content: '×';
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: bold;
}

.impact-statement {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--primary-light);
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.bill-footer {
    padding: 1rem 1.5rem;
    background: #F8FAFC;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

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

/* Dictionary List */
.dictionary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dict-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dict-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Admin Auth / Admin Panel */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

.admin-panel {
    display: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.admin-table-container {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #F1F5F9;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success { background: var(--success-light); color: #065F46; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-error { background: var(--danger-light); color: #991B1B; }

.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid #E2E8F0;
    border-bottom-color: var(--accent);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin: 0 auto;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

[v-cloak] { display: none; }

/* ======== NEW FRONTEND REFACTOR CLASSES ======== */

.search-container {
    max-width: 600px;
    margin: 1.5rem auto 0 auto;
}

.hero-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
}

.hero-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: #FFFFFF;
}

/* ======== STATS BAR ======== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1.25rem auto 0 auto;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: fit-content;
}

.stat-btn {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.stat-btn:hover:not(.non-clickable) {
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    color: var(--primary);
}

.stat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.stat-btn.non-clickable {
    cursor: default;
}

/* ======== SEARCH + FILTER ROW ======== */
.search-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 750px;
    margin: 1.5rem auto 0 auto;
}

.search-filter-row .hero-search-input {
    flex: 1;
}

.year-filter {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A4E69' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    min-width: 130px;
}

.year-filter:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: #FFFFFF;
}

.btn-clear {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-clear:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}

.results-count {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-weight: 500;
}


.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.btn-paginate {
    border: none;
    background: white;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.btn-paginate:hover:not(:disabled) {
    background: #F8FAFC;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.btn-paginate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F1F5F9;
}

.page-indicator {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 1rem;
}

.dictionary-alphabet-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dictionary-letter-group {
    margin-bottom: 3rem;
    animation: fadeIn 0.4s ease-out;
}

.letter-header {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.5);
    display: inline-block;
}

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

.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    max-width: 1000px;
    margin: 2rem auto 0 auto;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.alphabet-btn {
    border: none;
    background: transparent;
    color: var(--text-dark);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.alphabet-btn:hover:not(:disabled) {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: var(--accent);
}

.alphabet-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.alphabet-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
