:root {
    --brand: #114e5f;
    --brand-dark: #0b3743;
    --brand-light: #e6eef0;
    --text: #114e5f;
    --muted: rgba(17, 78, 95, 0.65);
    --border: rgba(17, 78, 95, 0.18);
    --danger: #a53434;
    --warning: #8a6716;
    --bg: #ffffff;
    --footer-bg: #114e5f;
    --footer-text: #a1a1a1;
    font-family: "Anek Bangla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1200px;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--brand);
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.main-nav a {
    color: var(--brand);
    text-decoration: none;
    opacity: 0.85;
}

.main-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.nav-user {
    color: var(--brand);
    opacity: 0.7;
    font-size: 0.9rem;
}

main.container {
    flex: 1 0 auto;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.site-footer {
    flex-shrink: 0;
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    font-size: 10px;
    padding: 1rem 0;
}

.site-footer a {
    color: var(--footer-text);
    text-decoration: underline;
}

.site-footer a:hover {
    color: #fff;
}

h1 {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.muted {
    color: var(--muted);
}

a {
    color: var(--brand);
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.flash-success {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.flash-error {
    background: #fbeaea;
    color: var(--danger);
}

.auth-card {
    max-width: 380px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.auth-card h1 {
    margin-bottom: 0.25rem;
}

.auth-switch {
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type=text], input[type=email], input[type=password], textarea, select {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

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

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

.btn-secondary {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.btn-danger {
    background: #fff;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-success {
    background: #1a7a4a;
    color: #fff;
}

.btn-success:hover {
    background: #155e39;
}

.link-button {
    background: none;
    border: none;
    color: var(--brand);
    opacity: 0.85;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: underline;
}

.inline-form {
    display: inline;
}

.filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.tab {
    text-decoration: none;
    color: var(--muted);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.tab-active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.category-filter select {
    width: auto;
    margin-top: 0;
}

.question-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.question-list li {
    border-bottom: 1px solid var(--border);
}

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

.question-list a {
    display: block;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    color: var(--text);
}

.question-list a:hover {
    background: var(--brand-light);
}

.question-category {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--brand);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.question-detail {
    max-width: 640px;
}

.question-detail h1 {
    font-size: 1.4rem;
}

.status-note {
    background: var(--brand-light);
    color: var(--brand-dark);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.status-note-rejected {
    background: #fbeaea;
    color: var(--danger);
}

.status-note-warning {
    background: #fbf3e3;
    color: var(--warning);
}

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

.answer-form {
    margin-bottom: 1.5rem;
}

.reject-form {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.review-card h2 {
    font-size: 1.1rem;
    margin: 0.25rem 0 0.75rem;
}

.review-card-approved {
    border-color: var(--brand);
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0.75rem;
}

.answer-body {
    background: rgba(17, 78, 95, 0.03);
    border-radius: 6px;
    padding: 0.75rem;
}

.review-notes-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.review-notes-form input {
    margin-top: 0;
}

.form-error {
    color: var(--danger);
    font-size: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.data-table tbody tr {
    border-top: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: rgba(17, 78, 95, 0.03);
}

.data-table-actions {
    text-align: right;
}

.role-select {
    width: auto;
    min-width: 9rem;
    margin-top: 0;
    padding: 0.35rem 0.6rem;
    font-size: 0.88rem;
}

.role-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 0.8rem;
    font-weight: 600;
}

.link-button-danger {
    color: var(--danger);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    padding: 0;
}
