/* =========================================================
   StayFitOS Frontend
========================================================= */


/* =========================================================
   StayFitOS Dashboard
========================================================= */

.sfos-dashboard {
    width: 100%;
    min-height: 100vh;
    background: #f5f7fb;
    color: #172033;
    font-family: Arial, sans-serif;
}


/* =========================================================
   StayFitOS Header
========================================================= */

.sfos-dashboard-header {
    width: 100%;
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e8ebf0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;
    box-sizing: border-box;
}

.sfos-dashboard-brand h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #172033;
}

.sfos-dashboard-brand p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #7b8497;
}

.sfos-dashboard-owner {
    font-size: 14px;
    font-weight: 600;
    color: #172033;
}


/* =========================================================
   Dashboard Content
========================================================= */

.sfos-dashboard-content {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 72px);
}


/* =========================================================
   Sidebar
========================================================= */

.sfos-dashboard-sidebar {
    width: 230px;
    min-width: 230px;

    background: #111827;

    padding: 24px 14px;

    box-sizing: border-box;
}

.sfos-dashboard-sidebar a {
    display: block;

    padding: 13px 15px;
    margin-bottom: 5px;

    border-radius: 8px;

    color: #c7cedb;
    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    transition: all 0.2s ease;
}

.sfos-dashboard-sidebar a:hover {
    background: #1f2937;
    color: #ffffff;
}

.sfos-dashboard-sidebar a.active {
    background: #2563eb;
    color: #ffffff;
}


/* =========================================================
   Main Area
========================================================= */

.sfos-dashboard-main {
    flex: 1;

    min-width: 0;

    padding: 32px;

    box-sizing: border-box;
}


/* =========================================================
   Welcome
========================================================= */

.sfos-dashboard-welcome {
    margin-bottom: 28px;
}

.sfos-dashboard-welcome h1 {
    margin: 0 0 7px;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;

    color: #172033;
}

.sfos-dashboard-welcome p {
    margin: 0;

    font-size: 14px;

    color: #7b8497;
}


/* =========================================================
   Stats
========================================================= */

.sfos-dashboard-stats {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 24px;
}

.sfos-stat-card {
    background: #ffffff;

    border: 1px solid #e8ebf0;
    border-radius: 12px;

    padding: 22px;

    box-sizing: border-box;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sfos-stat-card-label {
    margin-bottom: 10px;

    font-size: 13px;

    color: #7b8497;
}

.sfos-stat-card-value {
    font-size: 28px;
    line-height: 1;
    font-weight: 700;

    color: #172033;
}


/* =========================================================
   Panels
========================================================= */

.sfos-dashboard-panels {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.sfos-dashboard-panel {
    background: #ffffff;

    border: 1px solid #e8ebf0;
    border-radius: 12px;

    min-height: 210px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sfos-dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid #edf0f4;
}

.sfos-dashboard-panel-header h3 {
    margin: 0;

    font-size: 16px;
    font-weight: 700;

    color: #172033;
}

.sfos-dashboard-panel-header a {
    color: #2563eb;

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;
}

.sfos-dashboard-panel-body {
    padding: 28px 20px;

    text-align: center;

    color: #8a93a5;

    font-size: 14px;
}


/* =========================================================
   Empty State
========================================================= */

.sfos-dashboard-empty {
    padding: 35px 20px;

    text-align: center;

    color: #8a93a5;

    font-size: 14px;
}


/* =========================================================
   Members Table
========================================================= */

.sfos-members-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.sfos-members-table {
    width: 100%;

    min-width: 850px;

    border-collapse: collapse;

    background: #ffffff;
}

.sfos-members-table th {
    padding: 14px 16px;

    background: #f8fafc;

    border-bottom: 1px solid #e8ebf0;

    color: #7b8497;

    font-size: 12px;
    font-weight: 600;

    text-align: left;

    white-space: nowrap;
}

.sfos-members-table td {
    padding: 15px 16px;

    border-bottom: 1px solid #edf0f4;

    color: #172033;

    font-size: 13px;

    vertical-align: middle;
}

.sfos-members-table tbody tr {
    transition: background 0.2s ease;
}

.sfos-members-table tbody tr:hover {
    background: #f8fafc;
}

.sfos-members-table tbody tr:last-child td {
    border-bottom: none;
}


/* ---------- Member ID ---------- */

.sfos-members-table td:first-child {
    color: #2563eb;

    font-weight: 600;

    white-space: nowrap;
}


/* ---------- Status ---------- */

.sfos-member-status {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;

    line-height: 1;
}

.sfos-member-status.active {
    background: #ecfdf3;
    color: #15803d;
}

.sfos-member-status.inactive {
    background: #fef3c7;
    color: #a16207;
}

.sfos-member-status.trash {
    background: #fef2f2;
    color: #dc2626;
}


/* =========================================================
   Add Member Form
========================================================= */

.sfos-member-form {
    width: 100%;
}

.sfos-member-form-body {
    padding: 28px 32px 30px;
}


/* ---------- Form Grid ---------- */

.sfos-form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 22px 24px;
}


/* ---------- Form Field ---------- */

.sfos-form-field {
    width: 100%;
}

.sfos-form-field label {
    display: block;

    margin: 0 0 8px;

    color: #172033;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    text-align: left;
}

.sfos-form-field label span {
    margin-left: 2px;

    color: #ef4444;
}


/* ---------- Inputs ---------- */

.sfos-form-field input {
    display: block;

    width: 100%;
    height: 46px;

    margin: 0;
    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid #dfe4ec;
    border-radius: 8px;

    background: #ffffff;

    color: #172033;

    font-family: Arial, sans-serif;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.sfos-form-field input::placeholder {
    color: #9aa3b2;
}

.sfos-form-field input:focus {
    border-color: #2563eb;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}


/* ---------- Form Actions ---------- */

.sfos-form-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 28px;
}


/* ---------- Cancel ---------- */

.sfos-cancel-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border-radius: 8px;

    background: transparent;

    color: #667085;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: all 0.2s ease;
}

.sfos-cancel-button:hover {
    background: #f3f5f8;

    color: #172033;
}


/* ---------- Save Button ---------- */

.sfos-save-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 20px;

    border: 0;
    border-radius: 8px;

    background: #2563eb;

    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.sfos-save-button:hover {
    background: #1d4ed8;
}

.sfos-save-button:active {
    transform: translateY(1px);
}


/* ---------- Error ---------- */

.sfos-form-error {
    margin-bottom: 20px;

    padding: 12px 14px;

    border: 1px solid #fecaca;
    border-radius: 8px;

    background: #fef2f2;

    color: #b91c1c;

    font-size: 14px;
}
/* =========================================================
   StayFitOS Tablet
   768px - 1024px
========================================================= */

@media (min-width: 768px) and (max-width: 1024px) {

    .sfos-dashboard-header {
        padding: 0 24px;
    }

    .sfos-dashboard-sidebar {
        width: 210px;
        min-width: 210px;

        padding: 20px 12px;
    }

    .sfos-dashboard-main {
        padding: 24px;
    }

    .sfos-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sfos-dashboard-panels {
        grid-template-columns: 1fr;
    }

    .sfos-member-form-body {
        padding: 24px;
    }

}
/* =========================================================
   StayFitOS Mobile
   767px and below
========================================================= */

@media (max-width: 767px) {

    .sfos-dashboard-header {
        height: auto;

        padding: 18px 20px;
    }

    .sfos-dashboard-content {
        flex-direction: column;
    }

    .sfos-dashboard-sidebar {
        width: 100%;
        min-width: 0;

        display: flex;

        overflow-x: auto;

        padding: 10px;
    }

    .sfos-dashboard-sidebar a {
        flex: 0 0 auto;

        margin: 0 4px 0 0;
    }

    .sfos-dashboard-main {
        padding: 20px;
    }

    .sfos-dashboard-stats {
        grid-template-columns: 1fr;
    }

    .sfos-dashboard-panels {
        grid-template-columns: 1fr;
    }

    .sfos-dashboard-welcome h1 {
        font-size: 24px;
    }

    .sfos-dashboard-panel-body {
        padding: 16px;
    }

    .sfos-member-form-body {
        padding: 22px 20px 24px;
    }

    .sfos-form-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .sfos-form-actions {
        justify-content: stretch;
    }

    .sfos-cancel-button,
    .sfos-save-button {
        flex: 1;
    }

}