/**
 * ============================================================================
 * Kasi Mattress Admin
 * ----------------------------------------------------------------------------
 * File: assets/css/customers.css
 * Module: Customer Management
 * Version: 1.0.0
 * ============================================================================
 *
 * PURPOSE
 *
 *     Complete styling for the Customer Administration module.
 *
 * APPLIES TO
 *
 *     - Customer index
 *     - Add Customer
 *     - Edit Customer
 *     - View Customer
 *     - Delete Customer
 *
 * ARCHITECTURE
 *
 *     Loaded globally by the Admin index.php router whenever the
 *     customers module is active.
 *
 *     No customer page should contain inline CSS.
 *
 * ============================================================================
 */


/* ==========================================================================
   CUSTOMER MODULE
   ========================================================================== */

.km-customers {

    width: 100%;
    max-width: 100%;

}


/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.km-customers-header {

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 2rem;

    margin-bottom: 2rem;

}


.km-customers-header-content {

    min-width: 0;

}


.km-customers-header-eyebrow {

    display: inline-block;

    margin-bottom: 0.5rem;

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #0F4C81;

}


.km-customers-header-title {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: clamp(
        1.75rem,
        3vw,
        2.25rem
    );

    line-height: 1.2;

    font-weight: 700;

    color: #333333;

}


.km-customers-header-description {

    max-width: 680px;

    margin: 0.65rem 0 0;

    font-size: 0.95rem;
    line-height: 1.6;

    color: #666666;

}


.km-customers-header-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 0.75rem;

    flex-shrink: 0;

}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.km-customers-button {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0.7rem 1.1rem;

    border: 1px solid transparent;
    border-radius: 8px;

    font-family: "Inter", sans-serif;

    font-size: 0.875rem;
    font-weight: 600;

    line-height: 1.2;

    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;

}


.km-customers-button:hover {

    transform: translateY(-1px);

}


.km-customers-button:focus-visible {

    outline: 3px solid rgba(
        15,
        76,
        129,
        0.2
    );

    outline-offset: 2px;

}


.km-customers-button-primary {

    background: #0F4C81;

    border-color: #0F4C81;

    color: #ffffff;

}


.km-customers-button-primary:hover {

    background: #0b3d69;

    border-color: #0b3d69;

    color: #ffffff;

    box-shadow:
        0 5px 14px rgba(
            15,
            76,
            129,
            0.2
        );

}


.km-customers-button-secondary {

    background: #ffffff;

    border-color: #d7dce2;

    color: #333333;

}


.km-customers-button-secondary:hover {

    background: #f6f8fa;

    border-color: #b9c1ca;

    color: #333333;

}


.km-customers-button-danger {

    background: #b42318;

    border-color: #b42318;

    color: #ffffff;

}


.km-customers-button-danger:hover {

    background: #8f1d15;

    border-color: #8f1d15;

    color: #ffffff;

    box-shadow:
        0 5px 14px rgba(
            180,
            35,
            24,
            0.18
        );

}


/* ==========================================================================
   SUMMARY
   ========================================================================== */

.km-customers-summary {

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 1rem;

    margin-bottom: 1.5rem;

}


.km-customers-summary-card {

    min-width: 0;

    padding: 1.25rem;

    background: #ffffff;

    border: 1px solid #e3e7eb;

    border-radius: 12px;

    box-shadow:
        0 2px 8px rgba(
            0,
            0,
            0,
            0.04
        );

}


.km-customers-summary-top {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

}


.km-customers-summary-label {

    font-size: 0.8rem;
    font-weight: 600;

    color: #666666;

}


.km-customers-summary-icon {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 8px;

    background: #eef5fa;

    color: #0F4C81;

    font-size: 0.8rem;
    font-weight: 700;

}


.km-customers-summary-value {

    display: block;

    margin-top: 0.85rem;

    font-family: "Poppins", sans-serif;

    font-size: 1.7rem;
    line-height: 1;

    color: #333333;

}


.km-customers-summary-meta {

    display: block;

    margin-top: 0.55rem;

    font-size: 0.75rem;
    line-height: 1.4;

    color: #858b93;

}


/* ==========================================================================
   MAIN CARD
   ========================================================================== */

.km-customers-card {

    width: 100%;

    background: #ffffff;

    border: 1px solid #e3e7eb;

    border-radius: 12px;

    box-shadow:
        0 2px 10px rgba(
            0,
            0,
            0,
            0.04
        );

    overflow: hidden;

}


.km-customers-card-header {

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 1.5rem;

    padding: 1.5rem;

    border-bottom: 1px solid #e8ebef;

}


.km-customers-card-eyebrow {

    display: block;

    margin-bottom: 0.35rem;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.07em;
    text-transform: uppercase;

    color: #0F4C81;

}


.km-customers-card-title {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: 1.25rem;
    line-height: 1.3;

    font-weight: 600;

    color: #333333;

}


.km-customers-card-description {

    margin: 0.45rem 0 0;

    font-size: 0.875rem;
    line-height: 1.5;

    color: #6b7280;

}


/* ==========================================================================
   RECORD NUMBER
   ========================================================================== */

.km-customers-record-number {

    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 0.25rem;

    flex-shrink: 0;

    padding: 0.65rem 0.85rem;

    background: #f7f9fb;

    border: 1px solid #e2e6ea;

    border-radius: 8px;

}


.km-customers-record-number span {

    font-size: 0.7rem;
    font-weight: 600;

    color: #777f88;

}


.km-customers-record-number strong {

    font-size: 0.85rem;

    color: #333333;

}


/* ==========================================================================
   FILTERS
   ========================================================================== */

.km-customers-filters {

    display: grid;

    grid-template-columns:
        minmax(
            220px,
            2fr
        )
        repeat(
            2,
            minmax(
                150px,
                1fr
            )
        )
        auto;

    gap: 1rem;

    align-items: end;

    padding: 1.25rem 1.5rem;

    background: #fafbfc;

    border-bottom: 1px solid #e8ebef;

}


.km-customers-filter-group {

    min-width: 0;

}


.km-customers-filter-label {

    display: block;

    margin-bottom: 0.45rem;

    font-size: 0.75rem;
    font-weight: 600;

    color: #4b5563;

}


.km-customers-filter-input,
.km-customers-filter-select {

    width: 100%;

    min-height: 42px;

    padding: 0.65rem 0.8rem;

    border: 1px solid #cfd5dc;

    border-radius: 8px;

    background: #ffffff;

    color: #333333;

    font-family: "Inter", sans-serif;

    font-size: 0.875rem;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;

}


.km-customers-filter-input::placeholder {

    color: #9aa1a9;

}


.km-customers-filter-input:focus,
.km-customers-filter-select:focus {

    border-color: #0F4C81;

    outline: none;

    box-shadow:
        0 0 0 3px rgba(
            15,
            76,
            129,
            0.1
        );

}


.km-customers-filter-actions {

    display: flex;
    align-items: center;

    gap: 0.5rem;

}


/* ==========================================================================
   TABLE
   ========================================================================== */

.km-customers-table-wrap {

    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

}


.km-customers-table {

    width: 100%;

    min-width: 900px;

    border-collapse: collapse;

}


.km-customers-table th {

    padding: 0.85rem 1rem;

    background: #f7f9fb;

    border-bottom: 1px solid #dfe4e9;

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    text-align: left;

    color: #66707a;

    white-space: nowrap;

}


.km-customers-table td {

    padding: 1rem;

    border-bottom: 1px solid #edf0f2;

    vertical-align: middle;

    font-size: 0.875rem;

    color: #444444;

}


.km-customers-table tbody tr {

    transition:
        background-color 140ms ease;

}


.km-customers-table tbody tr:hover {

    background: #fafcfd;

}


.km-customers-table tbody tr:last-child td {

    border-bottom: 0;

}


/* ==========================================================================
   CUSTOMER IDENTITY
   ========================================================================== */

.km-customers-identity {

    display: flex;
    align-items: center;

    gap: 0.75rem;

    min-width: 210px;

}


.km-customers-identity-avatar {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border-radius: 50%;

    background: #eef5fa;

    color: #0F4C81;

    font-size: 0.8rem;
    font-weight: 700;

}


.km-customers-identity-content {

    display: flex;
    flex-direction: column;

    min-width: 0;

}


.km-customers-identity-name {

    display: block;

    overflow: hidden;

    font-size: 0.875rem;
    font-weight: 700;

    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;

    color: #333333;

}


.km-customers-identity-description {

    display: block;

    margin-top: 0.2rem;

    overflow: hidden;

    font-size: 0.75rem;

    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;

    color: #858b93;

}


/* ==========================================================================
   CUSTOMER NUMBER
   ========================================================================== */

.km-customers-number {

    display: inline-block;

    padding: 0.3rem 0.5rem;

    border-radius: 5px;

    background: #f3f5f7;

    color: #4b5563;

    font-family: monospace;

    font-size: 0.75rem;
    font-weight: 600;

}


/* ==========================================================================
   CUSTOMER CONTACT
   ========================================================================== */

.km-customers-contact {

    display: flex;
    flex-direction: column;

    gap: 0.2rem;

}


.km-customers-contact a {

    color: #0F4C81;

    text-decoration: none;

}


.km-customers-contact a:hover {

    text-decoration: underline;

}


.km-customers-contact-muted {

    color: #9aa1a9;

}


/* ==========================================================================
   STATUS
   ========================================================================== */

.km-customers-status {

    display: inline-flex;
    align-items: center;

    min-height: 26px;

    padding: 0.3rem 0.65rem;

    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 700;

    line-height: 1;

}


.km-customers-status-active {

    background: #eaf7ef;

    color: #177245;

}


.km-customers-status-inactive {

    background: #f1f3f5;

    color: #66707a;

}


/* ==========================================================================
   SOURCE
   ========================================================================== */

.km-customers-source {

    font-size: 0.8rem;

    color: #59636d;

}


/* ==========================================================================
   ACTIONS
   ========================================================================== */

.km-customers-actions {

    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 0.45rem;

}


.km-customers-action {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 0.45rem 0.65rem;

    border: 1px solid #d9dee4;
    border-radius: 6px;

    background: #ffffff;

    color: #4b5563;

    font-size: 0.72rem;
    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        color 140ms ease;

}


.km-customers-action:hover {

    background: #f5f7f9;

    border-color: #bdc5cd;

    color: #333333;

}


.km-customers-action-danger {

    color: #b42318;

}


.km-customers-action-danger:hover {

    background: #fff4f2;

    border-color: #e4aaa3;

    color: #8f1d15;

}


/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.km-customers-empty {

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 300px;

    padding: 3rem 1.5rem;

    text-align: center;

}


.km-customers-empty-icon {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin-bottom: 1rem;

    border-radius: 50%;

    background: #eef5fa;

    color: #0F4C81;

    font-weight: 700;

}


.km-customers-empty-title {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: 1.1rem;

    color: #333333;

}


.km-customers-empty-description {

    max-width: 430px;

    margin: 0.5rem 0 1.25rem;

    font-size: 0.85rem;
    line-height: 1.55;

    color: #737b84;

}


/* ==========================================================================
   PAGINATION
   ========================================================================== */

.km-customers-pagination {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding: 1rem 1.5rem;

    border-top: 1px solid #e8ebef;

}


.km-customers-pagination-info {

    font-size: 0.8rem;

    color: #737b84;

}


.km-customers-pagination-links {

    display: flex;
    align-items: center;

    gap: 0.35rem;

}


.km-customers-page {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 34px;

    padding: 0 0.55rem;

    border: 1px solid #d9dee4;
    border-radius: 6px;

    background: #ffffff;

    color: #4b5563;

    font-size: 0.75rem;
    font-weight: 600;

    text-decoration: none;

}


.km-customers-page:hover {

    background: #f5f7f9;

    color: #333333;

}


.km-customers-page-active {

    background: #0F4C81;

    border-color: #0F4C81;

    color: #ffffff;

}


.km-customers-page-active:hover {

    background: #0b3d69;

    border-color: #0b3d69;

    color: #ffffff;

}


/* ==========================================================================
   FORM
   ========================================================================== */

.km-customers-form {

    width: 100%;

}


.km-customers-form-section {

    padding: 1.5rem;

    border-bottom: 1px solid #e8ebef;

}


.km-customers-form-section:last-of-type {

    border-bottom: 0;

}


.km-customers-form-section-header {

    margin-bottom: 1.25rem;

}


.km-customers-form-section-header h3 {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: 1rem;
    line-height: 1.35;

    color: #333333;

}


.km-customers-form-section-header p {

    margin: 0.35rem 0 0;

    font-size: 0.8rem;
    line-height: 1.5;

    color: #7a828b;

}


.km-customers-form-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 1.15rem;

}


.km-customers-form-group {

    min-width: 0;

}


.km-customers-form-group-full {

    grid-column: 1 / -1;

}


.km-customers-form-label {

    display: block;

    margin-bottom: 0.45rem;

    font-size: 0.78rem;
    font-weight: 600;

    color: #3f4852;

}


.km-customers-form-input,
.km-customers-form-select,
.km-customers-form-textarea {

    display: block;

    width: 100%;

    box-sizing: border-box;

    border: 1px solid #cfd5dc;
    border-radius: 8px;

    background: #ffffff;

    color: #333333;

    font-family: "Inter", sans-serif;

    font-size: 0.875rem;

    line-height: 1.45;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;

}


.km-customers-form-input,
.km-customers-form-select {

    min-height: 44px;

    padding: 0.65rem 0.8rem;

}


.km-customers-form-textarea {

    min-height: 120px;

    padding: 0.75rem 0.8rem;

    resize: vertical;

}


.km-customers-form-input::placeholder,
.km-customers-form-textarea::placeholder {

    color: #a0a6ad;

}


.km-customers-form-input:focus,
.km-customers-form-select:focus,
.km-customers-form-textarea:focus {

    border-color: #0F4C81;

    outline: none;

    box-shadow:
        0 0 0 3px rgba(
            15,
            76,
            129,
            0.1
        );

}


.km-customers-form-input:disabled,
.km-customers-form-select:disabled,
.km-customers-form-textarea:disabled {

    background: #f3f5f7;

    color: #8a9199;

    cursor: not-allowed;

}


/* ==========================================================================
   FORM ACTIONS
   ========================================================================== */

.km-customers-form-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 0.75rem;

    padding: 1.25rem 1.5rem;

    background: #fafbfc;

    border-top: 1px solid #e8ebef;

}


/* ==========================================================================
   ALERTS
   ========================================================================== */

.km-customers-alert {

    margin-bottom: 1.25rem;

    padding: 1rem 1.1rem;

    border: 1px solid transparent;

    border-radius: 8px;

    font-size: 0.85rem;

    line-height: 1.5;

}


.km-customers-alert strong {

    font-weight: 700;

}


.km-customers-alert-error {

    background: #fff5f4;

    border-color: #f0c4bf;

    color: #8f1d15;

}


.km-customers-alert-warning {

    background: #fff9eb;

    border-color: #f0d38a;

    color: #805b00;

}


.km-customers-alert ul {

    margin: 0.6rem 0 0;

    padding-left: 1.25rem;

}


.km-customers-alert li + li {

    margin-top: 0.25rem;

}


/* ==========================================================================
   DETAIL VIEW
   ========================================================================== */

.km-customers-details {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 1rem;

    padding: 1.5rem;

}


.km-customers-detail-item {

    min-width: 0;

    padding: 1rem;

    border: 1px solid #e5e9ed;

    border-radius: 8px;

    background: #fafbfc;

}


.km-customers-detail-item-full {

    grid-column: 1 / -1;

}


.km-customers-detail-label {

    display: block;

    margin-bottom: 0.4rem;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #7a828b;

}


.km-customers-detail-value {

    display: block;

    font-size: 0.875rem;
    line-height: 1.55;

    color: #333333;

    overflow-wrap: anywhere;

}


.km-customers-detail-link {

    color: #0F4C81;

    text-decoration: none;

}


.km-customers-detail-link:hover {

    text-decoration: underline;

}


/* ==========================================================================
   CUSTOMER SUMMARY / VIEW PAGE
   ========================================================================== */

.km-customer-summary {

    margin-bottom: 1.25rem;

}


.km-customer-summary-grid {

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 1rem;

    padding: 1.5rem;

}


.km-customer-summary-item {

    min-width: 0;

}


.km-customer-summary-label {

    display: block;

    margin-bottom: 0.35rem;

    font-size: 0.72rem;
    font-weight: 600;

    color: #7a828b;

}


.km-customer-summary-item strong {

    display: block;

    overflow-wrap: anywhere;

    font-size: 0.875rem;

    color: #333333;

}


.km-customer-status {

    flex-shrink: 0;

}


/* ==========================================================================
   CUSTOMER NOTES
   ========================================================================== */

.km-customer-notes {

    padding: 1.5rem;

}


.km-customer-notes p {

    margin: 0;

    font-size: 0.875rem;

    line-height: 1.7;

    color: #4b5563;

}


.km-customer-notes .km-empty-state {

    color: #8a9199;

}


/* ==========================================================================
   GENERIC EMPTY STATE COMPATIBILITY
   ========================================================================== */

.km-empty-state {

    color: #8a9199;

}


/* ==========================================================================
   DELETE PAGE
   ========================================================================== */

.km-customer-delete-card {

    max-width: 900px;

}


.km-customer-delete-form {

    width: 100%;

}


.km-customer-delete-card .km-detail-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 1rem;

    padding: 1.5rem;

}


.km-customer-delete-card .km-detail-item {

    min-width: 0;

    padding: 0.9rem;

    border: 1px solid #e5e9ed;

    border-radius: 8px;

    background: #fafbfc;

}


.km-customer-delete-card .km-detail-label {

    display: block;

    margin-bottom: 0.35rem;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #7a828b;

}


.km-customer-delete-card .km-detail-value {

    display: block;

    overflow-wrap: anywhere;

    font-size: 0.875rem;

    color: #333333;

}


.km-customer-delete-card .km-alert {

    margin: 0 1.5rem 1.5rem;

}


.km-customer-delete-card .km-alert p {

    margin: 0.35rem 0 0;

}


.km-customer-delete-card .km-form-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 0.75rem;

    padding: 1.25rem 1.5rem;

    background: #fafbfc;

    border-top: 1px solid #e8ebef;

}


/* ==========================================================================
   VIEW PAGE COMPATIBILITY
   ========================================================================== */

.km-page.km-customers-page {

    width: 100%;

}


.km-customers-page .km-page-header {

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 2rem;

    margin-bottom: 2rem;

}


.km-customers-page .km-page-header-content {

    min-width: 0;

}


.km-customers-page .km-page-header-content h1 {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: clamp(
        1.75rem,
        3vw,
        2.25rem
    );

    color: #333333;

}


.km-customers-page .km-page-header-content p {

    margin: 0.5rem 0 0;

    color: #737b84;

    font-size: 0.875rem;

}


.km-customers-page .km-page-header-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 0.65rem;

}


/* ==========================================================================
   VIEW PAGE CARDS
   ========================================================================== */

.km-customers-page .km-card {

    margin-bottom: 1.25rem;

    background: #ffffff;

    border: 1px solid #e3e7eb;

    border-radius: 12px;

    box-shadow:
        0 2px 10px rgba(
            0,
            0,
            0,
            0.04
        );

    overflow: hidden;

}


.km-customers-page .km-card-header {

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 1rem;

    padding: 1.35rem 1.5rem;

    border-bottom: 1px solid #e8ebef;

}


.km-customers-page .km-card-header h2 {

    margin: 0;

    font-family: "Poppins", sans-serif;

    font-size: 1.05rem;

    color: #333333;

}


.km-customers-page .km-card-header p {

    margin: 0.35rem 0 0;

    font-size: 0.8rem;

    color: #7a828b;

}


/* ==========================================================================
   VIEW PAGE DETAIL GRID
   ========================================================================== */

.km-customers-page .km-detail-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 1rem;

    padding: 1.5rem;

}


.km-customers-page .km-detail-item {

    min-width: 0;

}


.km-customers-page .km-detail-item-full {

    grid-column: 1 / -1;

}


.km-customers-page .km-detail-label {

    display: block;

    margin-bottom: 0.35rem;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #7a828b;

}


.km-customers-page .km-detail-value {

    display: block;

    overflow-wrap: anywhere;

    font-size: 0.875rem;
    line-height: 1.55;

    color: #333333;

}


.km-customers-page .km-detail-link {

    color: #0F4C81;

    text-decoration: none;

}


.km-customers-page .km-detail-link:hover {

    text-decoration: underline;

}


/* ==========================================================================
   VIEW PAGE STATUS
   ========================================================================== */

.km-customers-page .km-status {

    display: inline-flex;
    align-items: center;

    min-height: 27px;

    padding: 0.35rem 0.7rem;

    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 700;

}


.km-customers-page .km-status-active {

    background: #eaf7ef;

    color: #177245;

}


.km-customers-page .km-status-inactive {

    background: #f1f3f5;

    color: #66707a;

}


/* ==========================================================================
   VIEW PAGE ACTIONS
   ========================================================================== */

.km-customers-page .km-form-actions {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 0.75rem;

    margin-top: 1.25rem;

}


/*
 * Existing view.php uses the generic km-btn classes.
 * Keep them styled here so the Customer module remains self-contained.
 */

.km-customers-page .km-btn {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0.7rem 1.1rem;

    border: 1px solid transparent;
    border-radius: 8px;

    font-family: "Inter", sans-serif;

    font-size: 0.875rem;
    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;

}


.km-customers-page .km-btn:hover {

    transform: translateY(-1px);

}


.km-customers-page .km-btn-primary {

    background: #0F4C81;

    border-color: #0F4C81;

    color: #ffffff;

}


.km-customers-page .km-btn-primary:hover {

    background: #0b3d69;

    border-color: #0b3d69;

    color: #ffffff;

}


.km-customers-page .km-btn-secondary {

    background: #ffffff;

    border-color: #d7dce2;

    color: #333333;

}


.km-customers-page .km-btn-secondary:hover {

    background: #f6f8fa;

    border-color: #b9c1ca;

    color: #333333;

}


.km-customers-page .km-btn-danger {

    background: #b42318;

    border-color: #b42318;

    color: #ffffff;

}


.km-customers-page .km-btn-danger:hover {

    background: #8f1d15;

    border-color: #8f1d15;

    color: #ffffff;

}


/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (
    max-width: 1024px
) {

    .km-customers-summary {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

    }


    .km-customer-summary-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

    }


    .km-customers-filters {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

    }


    .km-customers-filter-actions {

        grid-column: 1 / -1;

        justify-content: flex-start;

    }


    .km-customers-header,
    .km-customers-page .km-page-header {

        flex-direction: column;

    }


    .km-customers-header-actions,
    .km-customers-page .km-page-header-actions {

        width: 100%;

        justify-content: flex-start;

    }

}


/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media (
    max-width: 767px
) {

    .km-customers-header {

        gap: 1.25rem;

        margin-bottom: 1.5rem;

    }


    .km-customers-header-title {

        font-size: 1.6rem;

    }


    .km-customers-header-actions {

        width: 100%;

        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

    }


    .km-customers-header-actions .km-customers-button {

        width: 100%;

    }


    .km-customers-summary {

        grid-template-columns:
            1fr;

    }


    .km-customers-summary-card {

        padding: 1rem;

    }


    .km-customers-card-header {

        flex-direction: column;

        padding: 1.15rem;

    }


    .km-customers-record-number {

        align-items: flex-start;

        width: 100%;

        box-sizing: border-box;

    }


    .km-customers-filters {

        grid-template-columns: 1fr;

        padding: 1rem;

    }


    .km-customers-filter-actions {

        grid-column: auto;

        width: 100%;

    }


    .km-customers-filter-actions .km-customers-button {

        flex: 1;

    }


    .km-customers-table {

        min-width: 820px;

    }


    .km-customers-pagination {

        flex-direction: column;

        align-items: flex-start;

        padding: 1rem;

    }


    .km-customers-pagination-links {

        width: 100%;

        overflow-x: auto;

        padding-bottom: 0.2rem;

    }


    .km-customers-form-section {

        padding: 1.15rem;

    }


    .km-customers-form-grid {

        grid-template-columns: 1fr;

    }


    .km-customers-form-group-full {

        grid-column: auto;

    }


    .km-customers-form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

        padding: 1rem 1.15rem;

    }


    .km-customers-form-actions .km-customers-button {

        width: 100%;

    }


    .km-customers-details,
    .km-customer-summary-grid {

        grid-template-columns: 1fr;

        padding: 1.15rem;

    }


    .km-customers-detail-item-full {

        grid-column: auto;

    }


    .km-customers-page .km-detail-grid {

        grid-template-columns: 1fr;

        padding: 1.15rem;

    }


    .km-customers-page .km-detail-item-full {

        grid-column: auto;

    }


    .km-customers-page .km-card-header {

        padding: 1.15rem;

    }


    .km-customers-page .km-form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

        padding: 0 0 1rem;

    }


    .km-customers-page .km-form-actions .km-btn {

        width: 100%;

    }


    .km-customer-delete-card .km-detail-grid {

        grid-template-columns: 1fr;

        padding: 1.15rem;

    }


    .km-customer-delete-card .km-alert {

        margin-right: 1.15rem;
        margin-left: 1.15rem;

    }


    .km-customer-delete-card .km-form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

        padding: 1rem 1.15rem;

    }


    .km-customer-delete-card .km-form-actions .km-btn {

        width: 100%;

    }

}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (
    max-width: 480px
) {

    .km-customers-header-actions {

        grid-template-columns: 1fr;

    }


    .km-customers-button {

        width: 100%;

    }


    .km-customers-page .km-page-header-actions {

        display: grid;

        grid-template-columns: 1fr;

    }


    .km-customers-page .km-page-header-actions .km-btn {

        width: 100%;

    }


    .km-customers-pagination-links {

        justify-content: flex-start;

    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (
    prefers-reduced-motion: reduce
) {

    .km-customers-button,
    .km-customers-action,
    .km-customers-table tbody tr {

        transition: none;

    }


    .km-customers-button:hover,
    .km-customers-page .km-btn:hover {

        transform: none;

    }

}
