* {
    box-sizing: border-box;
}

:root {
    --ink: #0f172a;
    --muted: #64748b;
    --brand: #080130;
    --brand-soft: #12045c;
    --accent: #0f766e;
    --accent-soft: #d9f5ef;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dbe3ee;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.07);
}

body {
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    background:
        linear-gradient(135deg, rgba(8, 1, 48, 0.06) 0%, rgba(15, 118, 110, 0.05) 42%, rgba(255, 255, 255, 0.2) 100%),
        repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.025) 0 1px, transparent 1px 52px),
        repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.02) 0 1px, transparent 1px 52px),
        #eef3f8;
    color: var(--ink);
    min-height: 100vh;
}

.navbar {
    background: rgba(8, 1, 48, 0.96);
    color: #fff;
    padding: 14px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 30px rgba(8, 1, 48, 0.22);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar .brand {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    border-radius: 8px;
    padding: 8px 10px;
    font-weight: 600;
    transition: background 160ms ease, color 160ms ease;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar .nav-links a {
    margin-left: 0;
}

.nav-institution {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.container {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.login-box {
    width: 400px;
    margin: 70px auto;
    background: rgba(255, 255, 255, 0.96);
    padding: 34px;
    border: 1px solid rgba(219, 227, 238, 0.9);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.login-box h2 {
    margin: 0;
    text-align: center;
    color: var(--brand);
}

.login-subtitle {
    margin: 8px 0 24px;
    text-align: center;
    color: var(--muted);
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #334155;
}

input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover {
    background: var(--brand-soft);
    box-shadow: 0 10px 22px rgba(8, 1, 48, 0.16);
    transform: translateY(-1px);
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-soft);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.dashboard h1 {
    margin: 0;
    color: var(--brand);
}

.dashboard-top {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(219, 227, 238, 0.92);
    border-radius: 12px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.dashboard-top p {
    margin: 8px 0 0;
    color: var(--muted);
}

.credit-panel {
    min-width: 260px;
    background: linear-gradient(135deg, var(--brand), #0f766e);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.credit-panel span,
.credit-panel small {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.credit-panel strong {
    display: block;
    margin: 8px 0 4px;
    color: #fff;
    font-size: 28px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    padding: 25px;
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.card:hover {
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card h3 {
    margin-top: 0;
    color: var(--brand);
    font-size: 21px;
}

.card p {
    color: var(--muted);
    line-height: 1.5;
}

.card-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 14px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    align-self: flex-start;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card-btn:hover {
    background: var(--brand-soft);
    box-shadow: 0 10px 22px rgba(8, 1, 48, 0.16);
    transform: translateY(-1px);
}

@media (max-width: 1100px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.page-header {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(219, 227, 238, 0.92);
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: var(--shadow-soft);
}

.page-header h1 {
    color: var(--brand);
    margin-bottom: 5px;
}

.page-header p {
    color: var(--muted);
    margin-top: 6px;
}

.form-card {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.94);
    padding: 25px;
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

.balance-box {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    padding: 18px;
    border-radius: 10px;
}

.balance-box h3 {
    margin-top: 0;
    color: #080130;
}

pre {
    background: #111827;
    color: #e5e7eb;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
}

.wallet-card {
    max-width: 750px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.wallet-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 18px;
}

.wallet-top h2 {
    margin: 0;
    color: #080130;
    font-size: 22px;
}

.wallet-top p {
    margin: 6px 0 0;
    color: #6b7280;
}

.status-badge {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.wallet-balance {
    margin: 30px 0;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    padding: 28px;
    border-radius: 10px;
}

.wallet-balance span {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.wallet-balance h1 {
    margin: 0;
    font-size: 38px;
    letter-spacing: -1px;
}

.wallet-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.wallet-details div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 12px;
}

.wallet-details small {
    display: block;
    color: #6b7280;
    margin-bottom: 6px;
}

.wallet-details strong {
    color: #111827;
}

@media (max-width: 700px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .login-box {
        width: 100%;
        margin: 35px auto;
    }

    .dashboard-top {
        flex-direction: column;
    }

    .credit-panel {
        min-width: 0;
    }

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

    .wallet-top {
        flex-direction: column;
    }

    .wallet-details {
        grid-template-columns: 1fr;
    }

    .wallet-balance h1 {
        font-size: 30px;
    }
}

.verify-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 25px;
    align-items: start;
}

.form-card h3 {
    margin-top: 0;
    color: #080130;
}

select {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
}

.result-card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.result-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

.result-top h3 {
    margin: 0;
    color: #080130;
}

.result-message {
    margin: 18px 0;
    color: #374151;
    font-weight: 600;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.result-details div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 15px;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.result-details small {
    display: block;
    color: #6b7280;
    margin-bottom: 6px;
    font-size: 12px;
}

.result-details strong {
    color: #111827;
    font-size: 14px;
}

.bvn-photo-wrap {
    flex: 0 0 auto;
}

.bvn-photo {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #f8fafc;
}

.bvn-report {
    padding: 0;
    overflow: hidden;
}

.bvn-report-header {
    background: #080130;
    color: #fff;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.bvn-report-logo {
    display: block;
    max-width: 135px;
    height: auto;
    margin-bottom: 14px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
}

.bvn-report-header h2 {
    margin: 0;
    font-size: 24px;
}

.bvn-report-header p {
    margin: 8px 0 0;
    opacity: 0.85;
}

.bvn-summary {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 25px 30px;
    border-bottom: 1px solid #e5e7eb;
}

.bvn-summary-text small {
    display: block;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 6px;
}

.bvn-summary-text h3 {
    margin: 0;
    color: #080130;
    font-size: 24px;
}

.bvn-summary-text p {
    margin: 8px 0 0;
    color: #475569;
    font-weight: 700;
}

.bvn-report .result-details {
    padding: 25px 30px 30px;
}

.api-response-box pre {
    background: #111827;
    color: #e5e7eb;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
}

.nin-response {
    padding: 0 30px 30px;
}

@media (max-width: 900px) {
    .verify-grid {
        grid-template-columns: 1fr;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .bvn-report-header,
    .bvn-summary {
        flex-direction: column;
    }
}

.cac-report {
    padding: 0;
    overflow: hidden;
}

.cac-report-header {
    background: #080130;
    color: #fff;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.cac-report-header h2 {
    margin: 0;
    font-size: 24px;
}

.cac-report-header p {
    margin: 8px 0 0;
    opacity: 0.85;
}

.cac-section {
    padding: 25px 30px;
    border-bottom: 1px solid #e5e7eb;
}

.cac-section h3 {
    margin: 0 0 18px;
    color: #080130;
    font-size: 18px;
}

.cac-details-grid,
.director-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cac-details-grid div,
.director-details-grid div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 14px;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.cac-details-grid .full-width,
.director-details-grid .full-width {
    grid-column: 1 / -1;
}

.cac-details-grid small,
.director-details-grid small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 6px;
}

.cac-details-grid strong,
.director-details-grid strong {
    color: #111827;
    font-size: 14px;
}

.directors-list {
    display: grid;
    gap: 18px;
}

.director-card {
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.director-card-top {
    background: #f1f5f9;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
    border-bottom: 1px solid #dbe3ee;
}

.director-card-top h4 {
    margin: 0;
    color: #080130;
    font-size: 17px;
}

.director-card-top p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 14px;
}

.director-details-grid {
    padding: 18px;
}

.mini-status {
    background: #d1fae5;
    color: #065f46;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .cac-report-header {
        flex-direction: column;
    }

    .cac-details-grid,
    .director-details-grid {
        grid-template-columns: 1fr;
    }
}

.result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pdf-btn {
    background: #ffffff;
    color: #080130;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.pdf-btn:hover {
    background: #f3f4f6;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.admin-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.admin-panel-header {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.admin-panel-header h2 {
    color: #080130;
    font-size: 18px;
    margin: 0;
}

.admin-price-grid,
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    align-items: end;
}

.admin-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
}

.admin-table input,
.admin-table select {
    min-width: 120px;
    padding: 8px;
}

.admin-table strong {
    color: #111827;
    font-size: 14px;
}

.small-btn {
    min-width: 72px;
    padding: 9px 12px;
    width: auto;
}

.logs-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.logs-toolbar label {
    margin-bottom: 0;
}

.logs-toolbar select {
    width: auto;
    min-width: 150px;
}

@media (max-width: 900px) {
    .admin-grid,
    .admin-price-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Visual refresh overrides */
.balance-box h3,
.form-card h3,
.wallet-top h2,
.result-top h3,
.cac-section h3,
.director-card-top h4,
.admin-panel-header h2 {
    color: var(--brand);
}

select,
.admin-table input,
.admin-table select {
    border-color: #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.wallet-top {
    border-bottom-color: var(--line);
}

.wallet-details div,
.result-details div,
.cac-details-grid div,
.director-details-grid div {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.result-card,
.admin-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(219, 227, 238, 0.95);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.result-top {
    border-bottom-color: var(--line);
}

.bvn-photo {
    border-color: var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    box-shadow: var(--shadow-soft);
}

.bvn-report-header,
.cac-report-header {
    background: linear-gradient(135deg, var(--brand), #122154);
}

.bvn-summary,
.cac-section {
    background: #fff;
    border-bottom-color: var(--line);
}

.director-card {
    border-color: var(--line);
    border-radius: 10px;
}

.director-card-top {
    background: #eef6f5;
    border-bottom-color: var(--line);
}

.admin-panel-header,
.admin-table th,
.admin-table td {
    border-bottom-color: var(--line);
}

.admin-table tbody tr:hover {
    background: rgba(15, 118, 110, 0.04);
}

.small-btn {
    box-shadow: none;
}

.small-btn:hover {
    transform: none;
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 24px, 1240px);
        padding-top: 22px;
    }
}
