/*
 * ==========================================================
 * TUAMEKA MERCHANT PORTAL
 * Central Stylesheet
 * ==========================================================
 */

/* ----------------------------------------------------------
   RESET / GLOBAL
---------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f4f7fb;
    color: #1f2937;

    line-height: 1.5;
}

a {
    color: #0f4c81;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}


/* ----------------------------------------------------------
   TYPOGRAPHY
---------------------------------------------------------- */

h1,
h2,
h3,
h4 {
    color: #111827;
    margin-top: 0;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

.text-muted {
    color: #6b7280;
}

.text-small {
    font-size: 13px;
}

.text-center {
    text-align: center;
}


/* ----------------------------------------------------------
   PAGE CONTAINERS
---------------------------------------------------------- */

.container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 24px;
}

.container-small {
    width: 100%;
    max-width: 520px;

    margin: 0 auto;
    padding: 24px;
}


/* ----------------------------------------------------------
   CARDS
---------------------------------------------------------- */

.card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    padding: 24px;

    margin-bottom: 20px;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.04);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;

    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    margin: 0;
}


/* ----------------------------------------------------------
   TUAMEKA LOGO
---------------------------------------------------------- */

.portal-logo {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 22px;
}

.portal-logo img {
    width: 190px;
    max-width: 80%;
    height: auto;
}


/* ----------------------------------------------------------
   LOGIN / AUTHENTICATION PAGES
---------------------------------------------------------- */

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    padding: 42px 38px;

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.06);
}

.portal-header {
    text-align: center;
    margin-bottom: 32px;
}

.portal-title {
    margin: 0;

    font-size: 25px;
    font-weight: 700;

    letter-spacing: 0.5px;

    color: #111827;
}

.portal-subtitle {
    margin-top: 8px;

    font-size: 14px;

    color: #6b7280;
}

.auth-footer {
    text-align: center;

    margin-top: 20px;

    font-size: 12px;

    color: #9ca3af;
}

.security-note {
    margin-top: 26px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;

    text-align: center;

    font-size: 12px;
    line-height: 1.5;

    color: #9ca3af;
}


/* ----------------------------------------------------------
   FORMS
---------------------------------------------------------- */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 600;

    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {

    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d1d5db;
    border-radius: 7px;

    background: #ffffff;

    color: #111827;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {

    border-color: #0f4c81;

    box-shadow:
        0 0 0 3px
        rgba(15, 76, 129, 0.10);
}

input:disabled,
select:disabled,
textarea:disabled {

    background: #f3f4f6;

    color: #6b7280;

    cursor: not-allowed;
}

.form-help {
    margin-top: 5px;

    font-size: 12px;

    color: #6b7280;
}


/* ----------------------------------------------------------
   PASSWORD FIELD
---------------------------------------------------------- */

.password-header {

    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 7px;
}

.password-header label {
    margin: 0;
}

.forgot-password {
    font-size: 13px;
}


/* ----------------------------------------------------------
   BUTTONS
---------------------------------------------------------- */

.btn {

    display: inline-block;

    padding: 11px 18px;

    border: 0;
    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    text-align: center;
    text-decoration: none;

    transition:
        background 0.2s,
        transform 0.1s;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {

    background: #0f4c81;

    color: #ffffff;
}

.btn-primary:hover {

    background: #0b3d68;

    color: #ffffff;
}

.btn-secondary {

    background: #e5e7eb;

    color: #374151;
}

.btn-secondary:hover {

    background: #d1d5db;

    color: #111827;
}

.btn-danger {

    background: #b91c1c;

    color: #ffffff;
}

.btn-danger:hover {

    background: #991b1b;

    color: #ffffff;
}

.btn-success {

    background: #15803d;

    color: #ffffff;
}

.btn-success:hover {

    background: #166534;

    color: #ffffff;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 7px 12px;
    font-size: 13px;
}


/* ----------------------------------------------------------
   ALERTS / MESSAGES
---------------------------------------------------------- */

.alert {

    padding: 13px 15px;

    margin-bottom: 20px;

    border-radius: 7px;

    font-size: 14px;
}

.alert-success {

    background: #ecfdf5;

    border: 1px solid #a7f3d0;

    color: #065f46;
}

.alert-error {

    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #991b1b;
}

.alert-warning {

    background: #fffbeb;

    border: 1px solid #fde68a;

    color: #92400e;
}

.alert-info {

    background: #eff6ff;

    border: 1px solid #bfdbfe;

    color: #1e40af;
}


/* ----------------------------------------------------------
   MAIN PORTAL HEADER
---------------------------------------------------------- */

.portal-nav {

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    box-shadow:
        0 1px 3px
        rgba(0, 0, 0, 0.04);
}

.portal-nav-inner {

    max-width: 1200px;

    margin: 0 auto;

    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-nav-logo img {

    width: 130px;

    display: block;
}

.portal-nav-links {

    display: flex;
    align-items: center;

    gap: 8px;
}

.portal-nav-links a {

    padding: 8px 11px;

    border-radius: 6px;

    font-size: 14px;
    font-weight: 500;

    color: #374151;
}

.portal-nav-links a:hover {

    background: #f3f4f6;

    color: #0f4c81;

    text-decoration: none;
}

.portal-nav-links .active {

    background: #eef5fb;

    color: #0f4c81;
}


/* ----------------------------------------------------------
   PAGE HEADERS
---------------------------------------------------------- */

.page-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.page-title {

    margin: 0;

    font-size: 25px;
}

.page-description {

    margin-top: 5px;

    color: #6b7280;

    font-size: 14px;
}


/* ----------------------------------------------------------
   DASHBOARD
---------------------------------------------------------- */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(230px, 1fr));

    gap: 20px;

    margin-bottom: 24px;
}

.stat-card {

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    padding: 20px;
}

.stat-label {

    font-size: 13px;

    color: #6b7280;

    margin-bottom: 8px;
}

.stat-value {

    font-size: 21px;
    font-weight: 700;

    color: #111827;
}


/* ----------------------------------------------------------
   TABLES
---------------------------------------------------------- */

.table-responsive {

    width: 100%;

    overflow-x: auto;
}

table {

    width: 100%;

    border-collapse: collapse;

    background: #ffffff;
}

th {

    background: #f9fafb;

    color: #374151;

    font-size: 13px;
    font-weight: 600;

    text-align: left;

    padding: 12px;

    border-bottom: 1px solid #e5e7eb;
}

td {

    padding: 12px;

    border-bottom: 1px solid #e5e7eb;

    font-size: 14px;

    vertical-align: middle;
}

tbody tr:hover {
    background: #fafafa;
}


/* ----------------------------------------------------------
   API KEYS
---------------------------------------------------------- */

.api-key {

    padding: 12px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 13px;

    word-break: break-all;
}

.api-environment {

    display: inline-block;

    padding: 4px 8px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
}

.env-test {

    background: #fef3c7;

    color: #92400e;
}

.env-live {

    background: #dcfce7;

    color: #166534;
}


/* ----------------------------------------------------------
   STATUS BADGES
---------------------------------------------------------- */

.badge {

    display: inline-block;

    padding: 4px 8px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 600;
}

.badge-active {

    background: #dcfce7;

    color: #166534;
}

.badge-inactive {

    background: #f3f4f6;

    color: #6b7280;
}

.badge-suspended {

    background: #fee2e2;

    color: #991b1b;
}


/* ----------------------------------------------------------
   ACCOUNT / BANK DETAILS
---------------------------------------------------------- */

.details-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 18px;
}

.detail-label {

    margin-bottom: 4px;

    font-size: 12px;

    color: #6b7280;
}

.detail-value {

    font-size: 15px;
    font-weight: 600;

    color: #111827;
}


/* ----------------------------------------------------------
   FORM ACTIONS
---------------------------------------------------------- */

.form-actions {

    display: flex;

    gap: 10px;

    margin-top: 24px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}


/* ----------------------------------------------------------
   FOOTER
---------------------------------------------------------- */

.portal-footer {

    margin-top: 40px;

    padding: 24px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


/* ----------------------------------------------------------
   UTILITIES
---------------------------------------------------------- */

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}


/* ----------------------------------------------------------
   RESPONSIVE DESIGN
---------------------------------------------------------- */

@media (max-width: 768px) {

    .container {
        padding: 16px;
    }

    .portal-nav-inner {

        flex-direction: column;
        align-items: flex-start;

        gap: 12px;
    }

    .portal-nav-links {

        width: 100%;

        overflow-x: auto;

        padding-bottom: 4px;
    }

    .page-header {

        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-grid {

        grid-template-columns: 1fr;
    }

    .details-grid {

        grid-template-columns: 1fr;
    }

    .form-actions {

        flex-direction: column;
    }

    .form-actions .btn {

        width: 100%;
    }
}


@media (max-width: 500px) {

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .portal-logo img {
        width: 165px;
    }

    .portal-title {
        font-size: 22px;
    }

}