/* ============================================================
   GSM Industrial — Base Design System
   Design tokens, typography, shared component classes.
   All GSM modules reference these. Do not put module-specific
   styles here.
   ============================================================ */

/* ---- HEADER ---- */
.header-page-title {
    font-size: var(--gsm-text-lg);
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    letter-spacing: 0.2px;
    margin-top:-15px;
}
.header-component-title {
    font-size: var(--gsm-text-lg);
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    letter-spacing: 0.2px;
}


:root {
    /* Surfaces, borders, text, and brand colours are defined in the
       MudBlazor theme (MainLayout.razor) and accessed via --mud-palette-*.
       Only truly custom tokens that have no MudBlazor equivalent live here. */

    /* Brand navy — the shell color. Use this for structural headers and
       surfaces that should stay navy regardless of the Primary theme color. */
    --gsm-brand-navy:      #1a2b3c;
    --gsm-brand-navy-text: rgba(255,255,255,0.9);
    --gsm-brand-navy-light:#3C4B59;
    --gsm-shop:            #FEB914;
    --gsm-field:           #636B2F;


    /* Score colors */
    --gsm-score-1-bg:      #f9fafb;
    --gsm-score-1-text:    #6b7280;
    --gsm-score-2-bg:      #eff6ff;
    --gsm-score-2-text:    #1d4ed8;
    --gsm-score-2-border:  #bfdbfe;
    --gsm-score-3-bg:      #f0fdf4;
    --gsm-score-3-text:    #166534;
    --gsm-score-3-border:  #bbf7d0;

    /* Classification colors */
    --gsm-assoc-bg:        #fefce8;
    --gsm-assoc-text:      #854d0e;
    --gsm-skilled-bg:      #eff6ff;
    --gsm-skilled-text:    #1e40af;
    --gsm-master-bg:       #f0fdf4;
    --gsm-master-text:     #166534;
    --gsm-lead-bg:         #faf5ff;
    --gsm-lead-text:       #6b21a8;

    /* Pay / money */
    --gsm-pay-text:        #166534;

    /* Skills matrix sticky row heights */
    --gsm-matrix-row1-height: 96px;
    --gsm-appbar-height: 48px;
    --gsm-space-xs:        4px;
    --gsm-space-sm:        8px;
    --gsm-space-md:        14px;
    --gsm-space-lg:        24px;

    /* Typography scale */
    --gsm-text-xs:         10px;
    --gsm-text-sm:         11px;
    --gsm-text-base:       12px;
    --gsm-text-md:         14px;
    --gsm-text-lg:         16px;
}


/* ---- SHOP AND FIELD ---- */
.gsm-shop.mud-chip-filled {
    background-color: var(--gsm-shop) !important;
    color: #212410 !important;
}

.gsm-shop.mud-chip-outlined {
    border-color: var(--gsm-shop) !important;
    color: var(--gsm-shop) !important;
}

.gsm-field.mud-chip-filled {
    background-color: var(--gsm-field) !important;
}

.gsm-field.mud-chip-outlined {
    border-color: var(--gsm-field) !important;
    color: var(--gsm-field) !important;
}



/* ---- CLASSIFICATION BADGES ---- */
/* Applied as class-associate, class-skilled, etc. */
.class-associate { background: var(--gsm-assoc-bg);   color: var(--gsm-assoc-text);   border-radius: 3px; padding: 2px 6px; }
.class-skilled   { background: var(--gsm-skilled-bg); color: var(--gsm-skilled-text); border-radius: 3px; padding: 2px 6px; }
.class-master    { background: var(--gsm-master-bg);  color: var(--gsm-master-text);  border-radius: 3px; padding: 2px 6px; }
.class-senior    { background: var(--gsm-master-bg);  color: var(--gsm-master-text);  border-radius: 3px; padding: 2px 6px; }
.class-lead      { background: var(--gsm-lead-bg);    color: var(--gsm-lead-text);    border-radius: 3px; padding: 2px 6px; }
.class-foreman   { background: var(--gsm-lead-bg);    color: var(--gsm-lead-text);    border-radius: 3px; padding: 2px 6px; }

/* Size variants for badges */
.gsm-badge       { font-size: var(--gsm-text-xs); font-weight: 500; display: inline-block; }
.gsm-badge-sm    { font-size: var(--gsm-text-xs); font-weight: 500; display: block; text-align: center; }
.gsm-badge-lg    { font-size: var(--gsm-text-lg); font-weight: 600; display: inline-block; margin-top: 10px; padding: 8px 12px; }

/* ---- TYPOGRAPHY UTILITIES ---- */
.gsm-text-xs     { font-size: var(--gsm-text-xs); }
.gsm-text-sm     { font-size: var(--gsm-text-sm); }
.gsm-text-base   { font-size: var(--gsm-text-base); }
.gsm-text-md     { font-size: var(--gsm-text-md); }
.gsm-text-muted  { color: var(--mud-palette-text-secondary); }
.gsm-text-faint  { color: var(--mud-palette-text-disabled); }
.gsm-text-link   { color: var(--mud-palette-info); text-decoration: none; }
.gsm-text-link:hover { text-decoration: underline; }
.gsm-text-pay    { color: var(--gsm-pay-text); font-weight: 500; }
.gsm-font-bold   { font-weight: 700; }
.gsm-font-semi   { font-weight: 600; }
.gsm-font-med    { font-weight: 500; }

/* ---- LAYOUT UTILITIES ---- */
.gsm-page-content  { padding: 0 24px 24px; }
.gsm-stack         { display: flex; flex-direction: column; }
.gsm-stack-center  { display: flex; flex-direction: column; align-items: center; }
.gsm-gap-xs        { gap: var(--gsm-space-xs); }
.gsm-gap-sm        { gap: var(--gsm-space-sm); }
.gsm-mb-md         { margin-bottom: var(--gsm-space-md); }
.gsm-display-block { display: block; }
.gsm-text-center   { text-align: center; }

/* ---- LOADING SPINNER ---- */
.gsm-spin-center {
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width:100%;
}


/* ---- COMPONENT UTILITIES ---- */
.gsm-stat-row      { margin-top: 16px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.gsm-admin-toolbar { margin-bottom: var(--gsm-space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--gsm-space-md); }
.gsm-admin-toolbar-left  { display: flex; align-items: center; gap: var(--gsm-space-md); flex-wrap: wrap; }
.gsm-admin-toolbar-right { display: flex; align-items: center; gap: var(--gsm-space-md); flex-shrink: 0; }

/* ---- SORT HEADER ---- */
.gsm-sort-header { cursor: pointer; user-select: none; white-space: nowrap; }
.gsm-sort-header:hover { opacity: 0.8; }

/* ---- CHECKBOX LIST ---- */
.gsm-checkbox-list { display: flex; flex-direction: column; gap: 8px; }

/* ---- USER MODAL LAYOUT ---- */
.gsm-user-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }
.gsm-user-modal-left  { display: flex; flex-direction: column; }
.gsm-user-modal-right { display: flex; flex-direction: column; padding-top: 4px; }

/* ---- PERMISSIONS MATRIX ---- */
.gsm-permissions-table { width: 100%; border-collapse: collapse; }
.gsm-permissions-table th,
.gsm-permissions-table td { padding: 10px 16px; border-bottom: 1px solid var(--mud-palette-lines-default); text-align: center; }
.gsm-permissions-table thead th { background: var(--mud-palette-background-gray); font-weight: 600; font-size: var(--gsm-text-sm); color: var(--mud-palette-text-secondary); white-space: nowrap; }
.gsm-permissions-role { text-align: left !important; font-weight: 500; white-space: nowrap; }
.gsm-permissions-cell { min-width: 80px; }

.ppe-chip {
    min-width: 150px;
    justify-content: center;
}