/* ===============================
   Mfumo wa Stoo - Global Styles
================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f6fb;
    color: #1f2937;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

/* Main Layout */
.clearfix {
    width: 100%;
}

.content {
    max-width: 760px;
    margin: 35px auto;
    padding: 0 15px;
}

.animated.fadeIn {
    animation: fadeIn 0.35s ease-in-out;
}

/* Card */
.card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
}

.cardheader {
    background: linear-gradient(135deg, #111827, #374151);
    padding: 0;
}

.card-header {
    padding: 18px 20px;
    background: transparent;
    border: none;
}

.card-header h5 {
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    margin: 0;
}

/* Panel */
.panel-body {
    padding: 24px !important;
}

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #111827;
    font-size: 14px;
}

.font-weight-bold {
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    padding: 10px 13px;
    font-size: 15px;
    outline: none;
    transition: 0.25s ease;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Button */
.text-left {
    margin-top: 22px;
}

.btn {
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-dark {
    background: linear-gradient(135deg, #111827, #2563eb);
    color: #ffffff;
}

.btn-sm {
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.btn-dark:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Mobile */
@media (max-width: 768px) {
    .content {
        margin: 22px auto;
        padding: 0 12px;
    }

    .card {
        border-radius: 14px;
    }

    .card-header {
        padding: 16px 14px;
    }

    .card-header h5 {
        font-size: 17px;
        line-height: 1.4;
    }

    .panel-body {
        padding: 18px 14px !important;
    }

    .form-control {
        min-height: 44px;
        font-size: 14px;
    }

    .btn-sm {
        width: 100%;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .content {
        margin: 16px auto;
    }

    body {
        font-size: 14px;
    }

    .card-header h5 {
        font-size: 16px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===============================
   Clients Table Page
================================ */

.table-content {
    max-width: 1100px;
}

.table-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.table-top-actions h4 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
}

.table-top-actions p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.btn-primary.btn-add {
    background: linear-gradient(135deg, #2563eb, #111827);
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    white-space: nowrap;
}

.table-responsive-wrap {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin: 0;
}

.custom-table thead {
    background: #f3f6fb;
}

.custom-table th {
    color: #111827;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.custom-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf0f4;
    color: #374151;
    font-size: 14px;
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: #f9fbff;
}

.empty-table {
    text-align: center;
    padding: 25px !important;
    color: #6b7280;
    font-weight: 600;
}

.pagination-wrap {
    margin-top: 20px;
}

/* Mobile Table */
@media (max-width: 768px) {
    .table-top-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary.btn-add {
        width: 100%;
        text-align: center;
    }

    .custom-table thead {
        display: none;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr,
    .custom-table td {
        display: block;
        width: 100%;
    }

    .custom-table tr {
        margin-bottom: 14px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 10px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .custom-table td {
        border-bottom: none;
        padding: 9px 6px;
        display: flex;
        justify-content: space-between;
        gap: 15px;
        text-align: right;
    }

    .custom-table td::before {
        content: attr(data-label);
        font-weight: 800;
        color: #111827;
        text-align: left;
    }

    .custom-table td:last-child {
        justify-content: flex-start;
    }

    .custom-table td:last-child::before {
        display: none;
    }

    .custom-table td .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===============================
   Client Details Page
================================ */

.client-details-content {
    max-width: 1100px;
}

.client-profile-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px solid #e5edf8;
    margin-bottom: 20px;
}

.client-profile-box h3 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 24px;
    font-weight: 800;
}

.client-profile-box p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.client-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 26px;
}

.client-info-card {
    background: #ffffff;
    border: 1px solid #edf0f4;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.client-info-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}

.client-info-card strong {
    color: #111827;
    font-size: 15px;
}

.table-section-title {
    margin-bottom: 14px;
}

.table-section-title h4 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
}

.table-section-title p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.invoice-link {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.invoice-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

/* Mobile */
@media (max-width: 768px) {
    .client-profile-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .client-info-grid {
        grid-template-columns: 1fr;
    }

    .client-profile-box .btn {
        width: 100%;
        text-align: center;
    }
}


/* ===============================
   Payment History
================================ */

.payment-history-row td {
    background: #f8fbff;
    padding: 16px !important;
}

.payment-history-box {
    border: 1px solid #e5edf8;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.payment-history-box h5 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
}

.payment-table th {
    font-size: 12px;
    background: #eef6ff;
}

.payment-table td {
    font-size: 13px;
}

.paid-text {
    color: #166534;
    font-weight: 800;
    font-size: 13px;
}

/* ===============================
   Payment Form Summary
================================ */

.payment-summary-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.payment-summary-box div {
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px solid #e5edf8;
    border-radius: 14px;
    padding: 16px;
}

.payment-summary-box span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
}

.payment-summary-box strong {
    color: #111827;
    font-size: 17px;
}

@media (max-width: 768px) {
    .payment-summary-box {
        grid-template-columns: 1fr;
    }
}


/* ===============================
   Welcome Page
================================ */

.welcome-page {
    min-height: calc(100vh - 80px);
    padding: 40px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f6fb;
}

.welcome-card {
    max-width: 850px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
    border: 1px solid #e5e7eb;
}

.welcome-card h1 {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
}

.welcome-card > p {
    text-align: center;
    color: #6b7280;
    max-width: 650px;
    margin: 0 auto 22px;
}

.notice-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.welcome-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
}

.steps-box {
    display: grid;
    gap: 12px;
}

.step-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e5edf8;
    border-radius: 12px;
}

.step-item span {
    width: 30px;
    height: 30px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.step-item p {
    margin: 0;
    color: #374151;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .welcome-card {
        padding: 24px 18px;
    }

    .welcome-card h1 {
        font-size: 24px;
    }

    .welcome-actions a {
        width: 100%;
        text-align: center;
    }
}