/* ═══════════════════════════════════════════════════════
   GOrecruitAI – Shared Component Styles
   Buttons, badges, cards, form inputs that repeat
   across many pages
   ═══════════════════════════════════════════════════════ */

/* ══════════════════════════════════
   Date-picker month/year quick-select (global – used by every inline calendar's nav)
   ══════════════════════════════════ */
.gr-dp-selects { display: inline-flex; align-items: center; gap: 6px; }
.gr-dp-select {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--g-text-heading, #1e293b);
    background: var(--g-bg-card, #fff);
    border: 1px solid var(--g-gray-200, #e2e8f0);
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.gr-dp-select:hover { border-color: var(--g-gray-300, #cbd5e1); }
.gr-dp-select:focus { border-color: var(--g-brand, #2c7cff); }

/* ══════════════════════════════════
   Find-in-resume highlight (global – used by the resume viewers' find bar)
   ══════════════════════════════════ */
mark.gr-find-hit {
    background: #fde68a;           /* amber-200 */
    color: inherit;
    padding: 0;
    border-radius: 2px;
    scroll-margin: 80px;
}
mark.gr-find-hit.gr-find-current {
    background: #f59e0b;           /* amber-500 — the active match */
    color: #1e293b;
    box-shadow: 0 0 0 1px #d97706;
}
/* Inside a PDF text layer the glyphs are normally transparent (the real text is on the canvas below),
   so a translucent background alone can be invisible. Make the matched glyphs themselves visible on a
   solid amber chip with an outline — unmistakable regardless of blend/stacking. */
.textLayer mark.gr-find-hit,
.gr-pdf-textlayer mark.gr-find-hit {
    background-color: #fde047 !important;                 /* amber-300 */
    color: #1e293b !important;                            /* reveal the text-layer glyphs */
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(202, 138, 4, 0.85);        /* amber-600 outline */
}
.textLayer mark.gr-find-hit.gr-find-current,
.gr-pdf-textlayer mark.gr-find-hit.gr-find-current {
    background-color: #fb923c !important;                 /* orange-400 — active match */
    color: #1e293b !important;
    box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.95);
}
/* The text layer must stay fully opaque and above the canvas or highlights get hidden/diluted. */
.gr-pdf-textlayer { opacity: 1 !important; z-index: 2; }
.gr-pdf-page canvas { position: relative; z-index: 1; }

/* ── PDF.js render (canvas pages + selectable text layer) ── */
.gr-pdf-view {
    background: var(--g-gray-100, #f1f5f9);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.gr-pdf-page {
    position: relative;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
    line-height: 0;
}
.gr-pdf-page canvas { display: block; }
.gr-pdf-textlayer {
    position: absolute;
    left: 0; top: 0;
    overflow: hidden;
    line-height: 1;
    opacity: 1;
    z-index: 2;
}
.gr-pdf-textlayer > span,
.gr-pdf-textlayer > br {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}
.gr-pdf-textlayer ::selection { background: rgba(37, 99, 235, 0.25); }

/* Find bar shared across resume viewers */
.gr-find-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--g-bg-card, #fff);
    border: 1px solid var(--g-gray-200, #e2e8f0);
    border-radius: 8px;
    box-shadow: var(--g-shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}
.gr-find-input {
    border: none;
    outline: none;
    font-size: 13px;
    padding: 4px 6px;
    width: 150px;
    background: transparent;
    color: var(--g-text-body, #1e293b);
}
.gr-find-count {
    font-size: 12px;
    color: var(--g-text-muted, #94a3b8);
    min-width: 34px;
    text-align: center;
    white-space: nowrap;
}
.gr-find-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--g-text-muted, #64748b);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.gr-find-btn:hover:not(:disabled) { background: var(--g-gray-100, #f1f5f9); color: var(--g-text-body, #1e293b); }
.gr-find-btn:disabled { opacity: 0.4; cursor: default; }

/* ══════════════════════════════════
   Full-Page Loader (global – not scoped)
   ══════════════════════════════════ */
.fpl-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.fpl-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.fpl-gif {
    min-width: 200px;
    height: auto;
}

/* ══════════════════════════════════
   Buttons
   ══════════════════════════════════ */

/* ── Primary action (gradient) ── */
.g-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--g-btn-height-sm);
    padding: 5px 22px;
    border: none;
    border-radius: var(--g-radius-md);
    background:var(--sidebar-active-bg);
    color: #fff;
    font-size: var(--g-btn-font-size);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 5px -1px var(--g-primary-shadow),
                0 5px 12px -4px var(--g-primary-shadow-deep);
    transition: opacity var(--g-transition),
                box-shadow var(--g-transition);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    text-decoration: none;
}

 
.g-btn-primary:focus-visible {
    box-shadow: var(--g-focus-shadow);
}

.g-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Cancel / secondary ── */
.g-btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--g-btn-height-sm);
    padding: 5px 22px;
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-md);
    background: #e5e7eb;
    color: var(--g-text-body);
    font-size: var(--g-btn-font-size);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--g-transition);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    text-decoration: none;
}

.g-btn-cancel:hover {
    background: #e5e7eb;
    border-color: var(--g-gray-300);
}

/* ── Icon button ── */
.g-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--g-radius-sm);
    background: transparent;
    color: var(--g-text-secondary);
    cursor: pointer;
    transition: background var(--g-transition),
                color var(--g-transition);
    padding: 0;
}

.g-btn-icon:hover {
    background: var(--g-border-light);
    color: var(--g-text-body);
}

/* ── Regenerate / icon-action ── */
.g-btn-regen {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1.5px solid var(--g-border);
    border-radius: var(--g-radius-lg);
    background: var(--g-bg-card);
    color: var(--g-indigo);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.g-btn-regen:hover {
    border-color: var(--g-indigo-light);
    background: var(--g-indigo-bg);
}

.g-btn-regen:hover i {
    transform: rotate(90deg);
}
.dr-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 28px;
    border: 1px solid var(--sidebar-active-bg);
    border-radius: var(--g-radius-md);
    background: #fff;
    color: var(--sidebar-active-bg);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.dr-btn-outline:hover {
    background: #d6d6d6;
}

/* ══════════════════════════════════
   Cards
   ══════════════════════════════════ */
.g-card {
    background: var(--g-bg-card);
    border: 1px solid #e4e4e4;
    border-radius: var(--g-radius-xl); 
}

/* ══════════════════════════════════
   Badges
   ══════════════════════════════════ */
.g-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--g-radius-full);
    font-size: var(--g-fs-xxxs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.g-badge-success {
    background: var(--g-success-bg);
    color: var(--g-success-text);
}

.g-badge-error {
    background: var(--g-error-bg);
    color: var(--g-error-text);
}

.g-badge-dark {
    background: var(--g-gray-900);
    color: #fff;
}

/* ══════════════════════════════════
   Form Inputs
   ══════════════════════════════════ */
.g-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-md);
    font-size: 0.8125rem;
    color: var(--g-text-heading);
    background: var(--g-bg-card);
    font-family: inherit;
    outline: none;
    transition: border-color var(--g-transition),
                box-shadow var(--g-transition);
    box-sizing: border-box;
}

.g-input::placeholder {
    color: var(--g-text-muted);
}

.g-input:focus {
    border-color: var(--g-focus-border);
    box-shadow: var(--g-focus-shadow);
}

.g-input[readonly] {
    background: var(--g-gray-50);
    color: var(--g-text-label);
    font-family: var(--g-font-mono);
    letter-spacing: 0.04em;
}

/* ══════════════════════════════════
   Click Catcher Overlay
   ══════════════════════════════════ */
.click-catcher {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    cursor: default;
}

/* ══════════════════════════════════
   Pagination
   ══════════════════════════════════ */
.g-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--g-border-light);
}

.g-pagination-info {
    font-size: var(--g-fs-xs);
    font-weight: 500;
    color: var(--g-text-secondary);
}

.g-pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.g-pg-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--g-border);
    border-radius: 50%;
    background: var(--g-bg-card);
    color: var(--g-gray-800);
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--g-transition);
    user-select: none;
}

.g-pg-btn:hover:not(.current):not(:disabled) {
    background: var(--g-gray-100);
    border-color: var(--g-gray-400);
}

.g-pg-btn.current {
   background:var(--sidebar-active-bg);
       color: var(--g-bg-card);
    box-shadow: 0 3px 8px -2px var(--g-primary-shadow-deep);
}

.g-pg-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.g-pg-nav {
    border-color: transparent;
    background: transparent;
}
.g-pg-nav:hover {
    background: var(--g-gray-100);
    border-color: var(--g-gray-200);
}

.g-page-ellipsis {
    padding: 0 4px;
    color: var(--g-text-muted);
    font-size: var(--g-fs-xs);
    user-select: none;
}

@media (max-width: 991px) {
    .g-pg-btn {
        width: 25px;
        height: 25px;
        font-size: 9px;
    }

    .g-pagination-controls {
        gap: 3px;
    }
}

@media (max-width: 640px) {
    .g-pagination {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .g-pagination-info {
        font-size: 11px;
        width: 100%;
        text-align: center;
    }
     .g-btn-primary {
        width: 100%;
        justify-content: center;
    }
    .g-btn-cancel{
        width: 100%;
        justify-content: center;
    }
}

/* ══════════════════════════════════
   Form Validation (Blazor EditForm)
   ══════════════════════════════════ */

/* Field error message */
.cu-field-error,
.validation-message {
    font-size: 0.75rem;
    color: var(--g-error-text);
    margin-top: 4px;
    display: block;
}

/* Invalid input */
.cu-input.invalid,
.cu-select.invalid,
.cu-input.modified.invalid,
.cu-select.modified.invalid {
    border-color: var(--g-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Valid input */
.cu-input.modified.valid,
.cu-select.modified.valid {
    border-color: var(--g-success);
}

/* Validation error banner */
.cu-validation-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--g-error-bg);
    border: 1px solid var(--g-error-border);
    border-radius: var(--g-radius-lg);
    animation: g-slideDown 0.25s ease-out;
}

.cu-validation-banner-icon {
    color: var(--g-error-text);
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cu-validation-banner-content {
    font-size: 0.8125rem;
    color: #7f1d1d;
    flex: 1;
}

.cu-validation-banner-content strong {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--g-error-text);
}

.cu-validation-banner-content ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.cu-validation-banner-content li {
    margin-bottom: 2px;
    line-height: 1.5;
}

/* Success banner */
.cu-success-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--g-success-bg);
    border: 1px solid var(--g-success-border);
    border-radius: var(--g-radius-lg);
    color: var(--g-success-text);
    font-size: 0.875rem;
    font-weight: 600;
    animation: g-slideDown 0.25s ease-out;
}

.cu-success-banner i {
    font-size: 1.125rem;
    color: var(--g-success);
}

/* ══════════════════════════════════
   Animations
   ══════════════════════════════════ */
@keyframes g-slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes g-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes g-spin {
    to { transform: rotate(360deg); }
}

/* ═════════════════════════════════════════════════════════════════════════════
   Load Error State  (shown when page data fails to load)
   ═════════════════════════════════════════════════════════════════════════════ */
.g-load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40vh;
    padding: 48px 24px;
    gap: 12px;
    animation: g-fadeIn 0.35s ease-out;
}

.g-load-error svg {
    color: var(--g-error);
    margin-bottom: 8px;
}

.g-load-error h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--g-text-heading);
    margin: 0;
}

.g-load-error p {
    font-size: var(--g-fs-sm);
    color: var(--g-text-secondary);
    margin: 0 0 8px;
    max-width: 400px;
    line-height: 1.5;
}

/* ═════════════════════════════════════════════════════════════════════════════
   Status Pages  (AccessDenied, Error, 404)
   ═════════════════════════════════════════════════════════════════════════════ */
.g-status-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 48px 24px;
    animation: g-fadeIn 0.35s ease-out;
}

.g-status-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--g-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.g-status-icon-denied {
    background: var(--g-error-bg);
    color: var(--g-error-text);
}

.g-status-icon-error {
    background: var(--g-warning-bg);
    color: var(--g-warning);
}

.g-status-icon-notfound {
    background: var(--g-info-bg);
    color: var(--g-info);
}

.g-status-icon-session {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(99,102,241,0.1));
    color: #3b82f6;
}

.g-status-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--g-text-heading);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.g-status-code {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--g-text-heading);
    margin: 0 0 8px;
    letter-spacing: -0.04em;
    line-height: 1;
}

.g-status-message {
    font-size: 1rem;
    color: var(--g-text-secondary);
    margin: 0 0 32px;
    max-width: 400px;
    line-height: 1.6;
}

/* ═════════════════════════════════════════════════════════════════════════════
   Authorizing Spinner
   ═════════════════════════════════════════════════════════════════════════════ */
.g-authorizing-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* ═════════════════════════════════════════════════════════════════════════════
   Skip Link  (keyboard accessibility)
   ═════════════════════════════════════════════════════════════════════════════ */
.g-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 100000;
    padding: 8px 16px;
    background: var(--g-gray-900);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--g-radius-md);
    text-decoration: none;
}

.g-skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
}

/* ═════════════════════════════════════════════════════════════════════════════
   Form Page Shared  (Create/Edit Role, Client, Target, User pages)
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── Page Shell ── */
.g-form-page {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: var(--g-font-sans);
}

.g-form-card { 
    overflow: visible;
}

/* ── Page Header ── */
.g-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border-card);
    border-radius: var(--g-radius-xl);
    box-shadow: var(--g-shadow-xs);
    position: sticky;
    top: 66px;
    z-index: 50;
}

.g-form-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.g-form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--g-text-heading);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.g-form-subtitle {
    font-size: var(--g-fs-sm);
    font-weight: 400;
    color: var(--g-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.g-form-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Form Section Card ── */
.g-form-section {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border-card);
    border-radius: var(--g-radius-xl);
    padding: 28px 32px 32px;
    box-shadow: var(--g-shadow-xs);
    margin: 24px 0;
}

.g-form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: -28px -32px 28px;
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--g-border);
    background: var(--g-bg-card);
    border-radius: var(--g-radius-xl) var(--g-radius-xl) 0 0;
}

.g-form-section-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.g-form-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--g-brand);
    flex-shrink: 0;
}

.g-form-section-title {
    font-size: var(--g-fs-card-title);
    font-weight: var(--g-fw-bold);
    color: var(--g-text-heading);
    margin: 0;
    letter-spacing: -0.02em;
}

/* ── Form Fields ── */
.g-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.g-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.g-form-label {
    font-size: var(--g-fs-sm);
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-heading);
}

.g-form-required {
    color: var(--g-error);
}

.g-form-input {
    width: 100%;
    max-width: 520px;
    height: 35px;
    padding: 0 14px;
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-md);
    font-size: var(--g-fs-sm);
    font-family: inherit;
    color: var(--g-text-heading);
    background: var(--g-bg-card);
    outline: none;
    transition: border-color var(--g-transition), box-shadow var(--g-transition);
}

.g-form-input::placeholder {
    color: var(--g-text-muted);
}

.g-form-input:focus {
    border-color: var(--g-focus-border);
    box-shadow: var(--g-focus-shadow);
}

.g-form-input.input-error {
    border-color: var(--g-error);
}

.g-form-input.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

select.g-form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%23555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.field-error {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--g-error);
    margin-top: 2px;
}

.g-form-input-disabled {
    background: var(--g-gray-100);
    color: var(--g-text-secondary);
    cursor: not-allowed;
    border-color: var(--g-border);
}

.g-form-hint {
    font-size: 0.75rem;
    color: var(--g-text-muted);
    font-style: italic;
}

.g-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius-md);
    font-size: var(--g-fs-sm);
    font-family: inherit;
    color: var(--g-text-heading);
    background: var(--g-bg-card);
    outline: none;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    transition: border-color var(--g-transition), box-shadow var(--g-transition);
}

.g-form-textarea::placeholder {
    color: var(--g-text-muted);
}

.g-form-textarea:focus {
    border-color: var(--g-focus-border);
    box-shadow: var(--g-focus-shadow);
}

/* ── Permissions Grid ── */
.g-perm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.g-perm-item {
    padding: 18px 20px;
    border-bottom: 1px solid var(--g-border-light);
}

.g-perm-item:nth-child(odd) {
    border-right: 1px solid var(--g-border-light);
}

.g-perm-item:nth-last-child(1),
.g-perm-item:nth-last-child(2):nth-child(odd) ~ .g-perm-item:nth-last-child(1),
.g-perm-item:nth-last-child(2) {
    border-bottom: none;
}

.g-perm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.g-perm-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.g-perm-name {
    font-size: var(--g-fs-body);
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-heading);
}

.g-perm-desc {
    font-size: var(--g-fs-sm);
    color: var(--g-text-secondary);
    line-height: 1.4;
}

/* ── Toggle Switch ── */
.g-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.g-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.g-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--g-gray-300);
    border-radius: 24px;
    transition: background 0.2s ease;
}

.g-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--g-bg-card);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.g-toggle input:checked + .g-toggle-slider {
    
  background:var(--sidebar-active-bg);
}

.g-toggle input:checked + .g-toggle-slider::before {
    transform: translateX(20px);
}

.g-toggle input:focus-visible + .g-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 147, 255, 0.15);
}

/* ── Form Page Responsive ── */
@media (max-width: 1024px) {
    .g-form-section {
        margin: 16px;
        padding: 24px;
    }
}

@media (max-width: 991px) {
    .g-form-header {
        flex-direction: row;
        gap: 12px;
        padding: 12px 16px;
    }

    .g-form-header-actions {
        width: 100%;
    }

    .g-form-header-actions .g-btn-cancel,
    .g-form-header-actions .g-btn-primary {
        flex: 1;
        width: 100%;
        justify-content: center;
    }

    .g-form-section {
        padding: 20px 16px 24px;
        border-radius: var(--g-radius-lg);
        margin: 12px;
    }

    .g-form-section-header {
        margin: -20px -16px 20px;
        padding: 20px 16px 16px;
    }

    .g-form-input {
        max-width: 100%;
    }

    .g-perm-grid {
        grid-template-columns: 1fr;
    }

    .g-perm-item:nth-child(odd) {
        border-right: none;
    }

    .g-perm-item:nth-last-child(1) {
        border-bottom: none;
    }

    .g-perm-name {
        font-size: 0.8125rem;
    }

    .g-perm-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .g-form-title {
        font-size: 1.2rem;
    }

    .g-form-header {
        padding: 10px 12px;
    }

    .g-form-section {
        padding: 16px 12px 20px;
        margin: 8px;
    }

    .g-form-section-header {
        margin: -16px -12px 16px;
        padding: 16px 12px 12px;
    }

    .g-form-section-title {
        font-size: 0.95rem;
    }
}

/* ═══════════════════════════════════
   GLOBAL: Score Ring
   ═══════════════════════════════════ */
.g-score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.g-score-ring svg {
    width: 44px;
    height: 44px;
}

.g-score-ring-value {
    position: absolute;
    top: 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.g-score-ring-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
}

/* ═══════════════════════════════════
   GLOBAL: Accessible checkbox button
   ═══════════════════════════════════ */
.g-check-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.g-check-btn:focus-visible {
    outline: 2px solid var(--primary, #3b82f6);
    outline-offset: 2px;
}

/* ═══════════════════════════════════
   GLOBAL: Search wrapper (role=search)
   ═══════════════════════════════════ */
.g-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* ═══════════════════════════════════
   GLOBAL: Status dot
   ═══════════════════════════════════ */
.g-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.g-status-dot.active {
    background: #22c55e;
}

/* ═══════════════════════════════════
   GLOBAL: Overlay / Backdrop
   ═══════════════════════════════════ */
.g-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.g-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════
   GLOBAL: Live region for screen readers
   ═══════════════════════════════════ */
.g-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════
   Page Header Card  (.g-page-header)
   Reusable header card with title, subtitle,
   and right-side action area.
   ═══════════════════════════════════════ */
.g-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--g-bg-card, #fff);
    border: 1px solid var(--g-border-card, #e8ecf1);
    border-radius: var(--g-radius-xl, 20px) !important;
    gap: var(--g-space-16);
    padding: var(--g-space-16);
}

.g-page-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.g-page-header-title {
    font-size: 1.35rem;
    font-weight: var(--g-fw-medium, 500);
    color: var(--g-text-heading, #0f172a);
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.3;
}

.g-page-header-subtitle {
    font-size: var(--g-fs-sm, 0.8125rem);
    color: var(--g-text-secondary, #64748b);
    margin: 0;
    line-height: 1.5;
}

.g-page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
}

@media (max-width: 576px) {
    .g-page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    .g-page-header-right {
        width: 100%;
    }
    .g-page-header-right .g-btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════
   SKILL BADGE — Unified styles
   ═══════════════════════════════════════════════ */

/* Row style — for sidebar cards / skill sections */
.g-skill-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.g-skill-list::-webkit-scrollbar {
    width: 5px;
}

.g-skill-list::-webkit-scrollbar-track {
    background: transparent;
}

.g-skill-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.g-skill-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.g-skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--g-space-10) 14px;
    background: var(--g-gray-50);
    border-radius: var(--g-radius-md);
    margin-bottom: var(--g-space-8);
    gap: var(--g-space-12);
}

.g-skill-row:last-child {
    margin-bottom: 0;
}

.g-skill-name {
    font-size: var(--g-fs-candidate-subtitle);
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-heading);
}

.g-skill-value {
    font-size: var(--g-fs-section-subtitle);
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-secondary);
    flex-shrink: 0;
}

/* Inline badge — for tables / compact views */
.g-skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border: 1.5px solid var(--g-brand-border);
    border-radius: var(--g-radius-full);
    background: var(--g-brand-bg);
    font-size: var(--g-fs-xxs);
    font-weight: var(--g-fw-semibold);
    color: var(--g-brand);
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
}

.g-skill-badge strong {
    font-weight: var(--g-fw-bold);
    color: var(--g-brand);
}

/* Inline tag — skill pill (name + count) */
.g-skill-tag,
.g-skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--g-gray-200);
    border-radius: var(--g-radius-full);
     color: var(--g-text-body);
    background: var(--g-bg-card);
    max-width: 100%;
    overflow: hidden;
}

.g-skill-tag-name,
.g-skill-pill-name {
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 8ch;
}

.g-skill-tag-value,
.g-skill-pill-num {
      background: var(--g-gray-100);
    color: var(--g-text-secondary);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: var(--g-fw-semibold);
}

.g-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Skill pill responsive — 1280px and below */
@media (max-width: 1280px) {
    .g-skill-tag,
    .g-skill-pill {
        padding: 4px 8px;
        gap: 4px;
        font-size: 11px;
    }

    .g-skill-tag-name,
    .g-skill-pill-name {
        max-width: 7ch;
    }
}

/* ═══════════════════════════════════════════════
   MODAL POPUP — Global reusable styles
   ═══════════════════════════════════════════════ */

.g-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Must sit above the sticky topbar (#sa-topbar is z-index 1100) so the
       overlay dims the whole screen instead of the topbar showing through. */
    z-index: 1110;
    backdrop-filter: blur(2px);
}

.g-modal {
    background: var(--g-bg-card, #fff);
    border-radius: var(--g-radius-2xl, 20px);
    padding: 43px 28px 40px;
    width: 90%;
    max-width: 545px;
    box-shadow: var(--g-shadow-lg, 0 8px 32px rgba(0,0,0,.12));
    text-align: center;
    animation: g-modal-fade-in 0.2s ease;
}

@keyframes g-modal-fade-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.g-modal-message {
    font-size: var(--g-fs-sm, 0.8125rem);
    color: var(--g-gray-700, #334155);
    line-height: 1.6;
    margin: 0 0 24px;
}

.g-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

/* ── Modal Info Banner ── */
.g-modal-info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--g-radius-lg, 12px);
    margin-bottom: 20px;
    text-align: left;
}

.g-modal-info-warning {
    background: #fef9e7;
    border: 1px solid #f5d97a;
}

.g-modal-info-icon {
    flex-shrink: 0;
    color: #d4a017;
    margin-top: 1px;
}

.g-modal-info-content {
    flex: 1;
    min-width: 0;
}

.g-modal-info-text {
    font-size: var(--g-fs-sm, 0.8125rem);
    font-weight: 600;
    color: var(--g-gray-800, #1e293b);
    line-height: 1.5;
    margin: 0;
}

.g-modal-info-sub {
    font-size: var(--g-fs-xs, 0.75rem);
    color: var(--g-gray-500, #64748b);
    margin: 4px 0 0;
    line-height: 1.4;
}

/* ══════════════════════════════════
   AI Threshold Pills (Approve / Reject)
   ══════════════════════════════════ */
.g-ai-pills {
    display: flex;
    gap: 8px;
    padding-top: 10px;
}

.g-ai-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    padding: 9px 8px;
}

.g-ai-pill--approve {
    background: #f0fdf4;
}

.g-ai-pill--reject {
    background: #fef2f2;
}

.g-ai-pill__label {
    font-size: 11px;
    white-space: nowrap;
}

.g-ai-pill--approve .g-ai-pill__label {
    color: #15803d;
}

.g-ai-pill--reject .g-ai-pill__label {
    color: #991b1b;
}

.g-ai-pill__value {
    margin-left: auto;
    font-weight: 600;
    font-size: 13px;
}

.g-ai-pill--approve .g-ai-pill__value {
    color: #16a34a;
}

.g-ai-pill--reject .g-ai-pill__value {
    color: #dc2626;
}

/* Row-style variant (ApplyJob / CandidateVerification) */
.g-ai-value--approve {
    color: #16a34a;
    font-weight: 600;
}

.g-ai-value--reject {
    color: #dc2626;
    font-weight: 600;
}

/* ══════════════════════════════════
   Column Headers (table/grid — shared wireframe pattern)
   10px, font-semibold, uppercase, tracking-widest, muted
   ══════════════════════════════════ */
.g-col-header {
    font-size: var(--g-fs-xxxs);
    font-weight: var(--g-fw-semibold);
    color: var(--g-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ══════════════════════════════════
   Donut Chart (64x64 — shared across pages)
   viewBox 64x64, r=26, stroke-width=6
   ══════════════════════════════════ */
.g-donut-wrap {
    width: var(--g-donut-size);
    height: var(--g-donut-size);
    position: relative;
    flex-shrink: 0;
}

.g-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.g-donut-track {
    fill: none;
    stroke: var(--g-gray-100);
    stroke-width: 6;
}

.g-donut-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.g-donut-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--g-fs-xs);
    font-weight: var(--g-fw-bold);
    color: var(--g-text-heading);
}

/* ══════════════════════════════════
   Candidate Name Link (wireframe: 13px bold #0a66c2)
   ══════════════════════════════════ */
.g-candidate-name {
    font-size: var(--g-fs-sm);
    font-weight: var(--g-fw-bold);
    color: var(--g-link-blue);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.g-candidate-name:hover {
    color: var(--g-link-blue-hover);
    text-decoration: underline;
}

/* ══════════════════════════════════
   Candidate Subtitle (wireframe: 11px muted)
   ══════════════════════════════════ */
.g-candidate-subtitle {
    font-size: var(--g-fs-xxs);
    color: var(--g-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════
   Section Heading (wireframe: 17px bold slate-900)
   ══════════════════════════════════ */
.g-section-heading {
    font-size: var(--g-fs-section-heading);
    font-weight: var(--g-fw-bold);
    color: var(--g-text-heading);
    margin: 0;
}

/* ══════════════════════════════════
   Card Title (reusable across cards)
   u-card-title kept for backward compat
   ══════════════════════════════════ */
.u-card-title {
    font-size: var(--g-fs-section-heading);
    font-weight: var(--g-fw-bold);
    color: var(--g-text-heading);
    margin: 0;
}

/* ══════════════════════════════════
   Icon Button (circle, 32px)
   ══════════════════════════════════ */
.g-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--g-border);
    background: var(--g-bg-card);
    color: var(--g-text-body);
    cursor: pointer;
    transition: background var(--g-transition);
    flex-shrink: 0;
}

.g-btn-icon:hover {
    background: var(--g-gray-100);
}

/* ══════════════════════════════════
   Hover Tooltip (fixed bottom-left)
   ══════════════════════════════════ */
.g-hover-tooltip[title]::after {
    content: attr(title);
    position: fixed;
    bottom: 8px;
    left: 16px;
    background: var(--g-gray-900);
    color: #fff;
    font-size: var(--g-fs-xxs);
    padding: 4px 10px;
    border-radius: var(--g-radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.15s;
}

.g-hover-tooltip[title]:hover::after {
    opacity: 1;
}

/* ═══════════════════════════════════════
   Letter Avatar  (.g-letter-avatar)
   Circle with colored background and
   white initial letter for missing images.
   ═══════════════════════════════════════ */
.g-letter-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--g-radius-lg);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
    user-select: none;
}
