/**
 * Title: Global Sourcing Core - SaaS Portal UI Engine (SS2 Lean Production Profile)
 * Description: Ultra-clean, high-density layout featuring compact table padding, 
 * slender borders, refined typography tracking, and streamlined form spacing.
 */

body {
    margin: 0;
    padding: 20px 15px;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #3c434a;
}

/* Shrunken Main Wrapper with Generous White Space Gutters */
.psp-page-wrapper {
    max-width: 1160px;
    margin: 0 auto;
    background: #ffffff;
    border: 0.5px solid #ccd0d4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    border-radius: 3px;
    overflow: hidden;
}

/* Top Header Bar: Clean, slender proportions with bottom accent line */
.psp-header {
    background: #1d2327;
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #0073aa;
}

.psp-brand {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.psp-brand span {
    font-weight: 400;
    font-size: 15px;
    color: #a7aaad;
}

.psp-user-nav {
    font-size: 14px;
    color: #ffffff;
}

.psp-user-nav span {
    color: #ffffff;
    margin-right: 12px;
}

.psp-user-nav a {
    color: #72bee1;
    text-decoration: none;
    font-weight: 600;
}

.psp-user-nav a:hover {
    text-decoration: underline;
}

.psp-container {
    padding: 24px 28px;
    background: #f6f7f7;
}

/* Login Card Structure */
.psp-login-card {
    max-width: 400px;
    margin: 30px auto;
    background: #ffffff;
    border: 0.5px solid #ccd0d4;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    padding: 24px;
}

.psp-login-card h2 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 0.5px solid #dcdcde;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.psp-form-group {
    margin-bottom: 10px;
}

.psp-form-group label {
    display: block;
    font-weight: 600;
    font-size: 10.5px;
    margin-bottom: 3px;
    color: #2c3338;
    letter-spacing: 0.4px;
}

.psp-form-group input[type="text"],
.psp-form-group input[type="password"],
.psp-form-group select {
    width: 100%;
    padding: 5px 8px;
    border: 0.5px solid #8c8f94;
    border-radius: 3px;
    font-size: 12.5px;
    box-sizing: border-box;
    background: #fff;
    outline: none;
    color: #3c434a;
}

.psp-form-group input:focus, 
.psp-form-group select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.psp-submit-btn {
    width: 100%;
    background: #1d2327;
    color: #fff;
    border: none;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
}

.psp-submit-btn:hover {
    background: #2c3338;
}

/* Lean Tab Navigation Styling (SS2 Profile) */
.psp-nav-tabs {
    display: flex;
    gap: 3px;
    border-bottom: 0.5px solid #ccd0d4;
    margin-bottom: 18px;
    padding-left: 0;
}

.psp-tab {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border: 0.5px solid #ccd0d4;
    border-bottom: none;
}

/* Tab Background Tints */
.psp-tab.tab-tenant { color: #0073aa; background: #f0f6fc; }
.psp-tab.tab-finance { color: #00a32a; background: #edfbf2; }
.psp-tab.tab-comm { color: #b25900; background: #fdf3ec; }
.psp-tab.tab-module { color: #7e57c2; background: #f5f3f9; }

/* Active Tab Overrides */
.psp-tab.active {
    background: #ffffff !important;
    border-bottom: 0.5px solid #ffffff;
    margin-bottom: -0.5px;
}
.psp-tab.tab-tenant.active { border-top: 3px solid #0073aa; color: #0073aa; }
.psp-tab.tab-finance.active { border-top: 3px solid #00a32a; color: #00a32a; }
.psp-tab.tab-comm.active { border-top: 3px solid #b25900; color: #b25900; }
.psp-tab.tab-module.active { border-top: 3px solid #7e57c2; color: #7e57c2; }

/* Lean Tables (SS2 High-Density: 12px text, tighter padding) */
.psp-table {
    width: 100%;
    border-collapse: collapse;
    border: 0.5px solid #ccd0d4;
    margin-top: 4px;
    background: #ffffff;
}

.psp-table th,
.psp-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 0.5px solid #ccd0d4;
    font-size: 12px;
    color: #3c434a;
}

.psp-table th {
    background: #f6f7f7;
    color: #1d2327;
    font-weight: 600;
}

.psp-card-box {
    background: #ffffff;
    border: 0.5px solid #ccd0d4;
    padding: 14px 18px;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.01);
}

.psp-checkbox-group label {
    display: block;
    font-size: 12px;
    color: #2c3338;
    margin-bottom: 5px;
    font-weight: normal;
}

.psp-checkbox-group input {
    margin-right: 5px;
}
/* Hide Agency Edit / Use Buyer buttons when viewing Buyers modal as Super Admin */
.psp-super-admin-buyers-view .psp-agency-edit-buyer-btn,
.psp-super-admin-buyers-view .psp-agency-use-buyer-btn {
    display: none !important;
}