* { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: #f4f5f7; color: #1a1a2e; }
.container { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.container.narrow { max-width: 500px; }

.form-section-heading {
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 28px 0 4px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.form-section-heading:first-of-type { border-top: none; padding-top: 0; margin-top: 8px; }

.topnav { display: flex; justify-content: space-between; align-items: center; background: #1a2b4c; color: #fff; padding: 12px 24px; flex-wrap: wrap; gap: 8px; }
.topnav .brand { font-weight: 700; font-size: 1.1em; }
.topnav a { color: #fff; text-decoration: none; margin-right: 16px; opacity: 0.9; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.topnav .user { font-size: 0.9em; opacity: 0.85; }

.balance-card { background: #1a2b4c; color: #fff; border-radius: 10px; padding: 20px; display: flex; flex-direction: column; margin-bottom: 20px; }
.balance-card span { font-size: 0.85em; opacity: 0.8; }
.balance-card strong { font-size: 2em; margin-top: 4px; }
.balance-card.negative { background: #7a1f1f; }
.balance-card small { margin-top: 6px; color: #ffd7d7; }

.actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.btn, button, input[type=submit] { background: #2955c9; color: #fff; border: none; padding: 10px 16px; border-radius: 6px; text-decoration: none; cursor: pointer; font-size: 0.95em; }
.btn:hover, button:hover { background: #1e42a3; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 0.92em; }
.data-table th { background: #eef1f7; }

form { display: flex; flex-direction: column; gap: 10px; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
form.inline-form { flex-direction: row; padding: 0; box-shadow: none; background: none; align-items: center; margin-bottom: 12px; }
label { font-size: 0.88em; font-weight: 600; margin-top: 6px; }
input, select, textarea { padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.95em; width: 100%; }

.error { color: #b00020; background: #fde8e8; padding: 10px 14px; border-radius: 6px; }
.success { color: #14532d; background: #e6f4ea; padding: 10px 14px; border-radius: 6px; }
.hint { color: #666; font-size: 0.88em; }

form.stacked-form { max-width: 420px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.checkbox-row input { width: auto; }
.cash-toggle { background: #fff8e1; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; border: 1px solid #f0d97a; }
.btn-row { display: flex; gap: 8px; }
.btn-row button[value="flagged"] { background: #b8860b; }
.btn-row button[value="rejected"] { background: #b00020; }
.actions-cell { min-width: 160px; }
.actions-cell form.inline-form { margin-bottom: 6px; }
.btn-danger-small { background: #b00020; padding: 4px 10px; font-size: 0.82em; }
details summary { cursor: pointer; color: #2955c9; font-size: 0.9em; }
details form { margin-top: 8px; box-shadow: none; padding: 8px; background: #f4f5f7; }

.filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tabs a { padding: 6px 14px; border-radius: 20px; background: #fff; color: #1a2b4c; text-decoration: none; font-size: 0.88em; border: 1px solid #ddd; }
.filter-tabs a.active { background: #1a2b4c; color: #fff; border-color: #1a2b4c; }

.wa-preview { margin: 20px 0; }
.wa-message-box {
    background: #f0f2f5;
    border-left: 4px solid #25D366;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0 16px;
    line-height: 1.6;
}
.wa-button {
    display: inline-block;
    background: #25D366;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}
.wa-button:hover { background: #1da851; }
.continue-link { display: inline-block; margin-top: 24px; color: #2955c9; }

.auth-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-box { background: #fff; padding: 30px; border-radius: 10px; width: 320px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.auth-box h1 { font-size: 1.3em; margin-top: 0; text-align: center; }
