/**
 * TGC Dashboard — Shared Stylesheet
 * Covers all 5 role dashboards: site_user, premium_member, supplier, advertiser, company_recruiter
 * Replaces all inline <style> blocks from the individual dashboard templates.
 *
 * CSS variables inherited from style.css :root:
 *   --baltic-blue, --rich-cerulean, --alice-blue, --sage-green, --lime-moss, --text-dark
 */

/* =============================================================================
   1. PAGE-LEVEL OVERRIDES
   ============================================================================= */

.dashboard-page .entry-content,
.dashboard-page .no-results,
.dashboard-page #secondary,
.dashboard-page .widget-area {
    display: none !important;
}

.dashboard-page .content-area {
    width: 100% !important;
    max-width: 100% !important;
}

/* =============================================================================
   2. OUTER LAYOUT
   ============================================================================= */

.dashboard-content-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

.dashboard-content-full .site-main {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* =============================================================================
   3. TITLE BAR (consistent across ALL dashboards)
   ============================================================================= */

.dashboard-title-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
}

/* Higher specificity than style.css .container-title-bar — overrides its column/center layout at all breakpoints */
.dashboard-title-bar .container-title-bar {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    box-sizing: border-box;
    gap: 16px;
    flex-wrap: wrap;
}

.header-content-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

/* Override style.css @985px: .header-content-left { width:100%; margin-bottom:1.25rem; align-items:center } */
.dashboard-title-bar .header-content-left {
    width: auto;
    margin-bottom: 0;
    justify-content: flex-start;
}

.header-avatar {
    flex-shrink: 0;
}

.header-avatar img {
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.header-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-identity .page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.header-identity .page-description {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.header-identity .page-username {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.header-content-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* =============================================================================
   4. MEMBERSHIP BADGES
   All share the same base style, colour differs per role.
   Usage: <span class="membership-badge badge-premium">Premium</span>
   ============================================================================= */

.membership-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    line-height: 1.4;
}

/* Regular/Member — sage-green (light) */
.badge-member {
    background-color: rgba(89, 145, 43, 0.15);
    color: var(--sage-green);
    border: 1px solid var(--sage-green);
}

/* Premium — lime-moss */
.badge-premium {
    background-color: var(--lime-moss);
    color: #fff;
}

/* Supplier — rich-cerulean */
.badge-supplier {
    background-color: var(--rich-cerulean);
    color: #fff;
}

/* Recruiter — baltic-blue */
.badge-recruiter {
    background-color: var(--baltic-blue);
    color: #fff;
}

/* Advertiser — a warm accent */
.badge-advertiser {
    background-color: #c0392b;
    color: #fff;
}

/* Legacy class names (keep so existing HTML still works during refactor) */
.badge-premium-member {
    background-color: var(--baltic-blue);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* =============================================================================
   5. DASHBOARD SECTION WRAPPER
   White card with 15px padding and 5px border-radius — used for Overview + Tabs area
   ============================================================================= */

.dashboard-section {
    background: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* =============================================================================
   6. TAB NAVIGATION
   ============================================================================= */

.tgc-dashboard-tabs {
    background: var(--alice-blue, #e8f3fb);
    border-bottom: none;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    padding: 0 6px;
    border-radius: 8px 8px 0 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.tab-link {
    background: transparent !important;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 13px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555 !important;
    border-bottom: 3px solid transparent;
    border-radius: 6px 6px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    position: relative;
}

.tab-link:hover {
    color: var(--baltic-blue) !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.tab-link.active {
    color: var(--baltic-blue) !important;
    background: #fff !important;
    border-bottom: 3px solid var(--baltic-blue);
}

/* Locked tab appearance */
.tab-link.tab-locked {
    color: #bbb !important;
    cursor: default;
}

.tab-link.tab-locked:hover {
    color: #bbb !important;
}

.tab-link.tab-locked::after {
    content: " 🔒";
    font-size: 0.75em;
}

/* Tab content panels */
.tab-content {
    display: none;
    animation: tgcFadeIn 0.3s ease;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.tab-content.active-tab {
    display: block;
}

@keyframes tgcFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   7. DASHBOARD CARD
   ============================================================================= */

.dashboard-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

.btn-view-all {
    font-size: 0.85rem;
    color: var(--sage-green);
    text-decoration: none;
    font-weight: 600;
}

.btn-view-all:hover {
    text-decoration: underline;
}

/* =============================================================================
   8. OVERVIEW STAT CARDS GRID
   ============================================================================= */

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
}

a.stat-card-link {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

a.stat-card-link:hover {
    border-color: var(--rich-cerulean);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
}

.stat-icon {
    font-size: 2rem;
    background: #f4f6f8;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--baltic-blue);
    line-height: 1;
}

.stat-number.unread {
    color: #20b2aa;
}

.stat-label {
    color: #777;
    font-size: 0.82rem;
    margin-top: 4px;
    line-height: 1.3;
}

/* =============================================================================
   9. WARNING / ALERT BOX
   ============================================================================= */

.warning-box {
    border-radius: 5px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.warning-box::before {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.warning-box.warning {
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    color: #6b4c00;
}

.warning-box.warning::before {
    content: "⚠️";
}

.warning-box.info {
    background: var(--alice-blue);
    border-left: 4px solid var(--rich-cerulean);
    color: #1a3c50;
}

.warning-box.info::before {
    content: "ℹ️";
}

.warning-box.error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
}

.warning-box.error::before {
    content: "❌";
}

/* =============================================================================
   10. FEATURE LOCKED SECTIONS (Pre-registration phase)
   ============================================================================= */

.feature-locked-section {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.feature-locked-section .feature-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    border-radius: 5px;
    border: 2px dashed #d0d0d0;
}

.feature-lock-overlay .lock-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.feature-lock-overlay .lock-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    margin: 0;
}

.feature-lock-overlay .lock-desc {
    font-size: 0.88rem;
    color: #777;
    text-align: center;
    max-width: 280px;
    margin: 0;
}

.feature-lock-overlay .btn-upgrade {
    background: var(--sage-green);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.feature-lock-overlay .btn-upgrade:hover {
    background: var(--lime-moss);
    color: #fff;
}

/* Greyed-out placeholder content inside locked sections */
.feature-locked-section .feature-placeholder {
    opacity: 0.25;
    pointer-events: none;
    user-select: none;
}

/* =============================================================================
   11. AVATAR
   ============================================================================= */

.avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sage-green);
    display: block;
    flex-shrink: 0;
}

.avatar-preview-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--alice-blue);
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    color: #aaa;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-upload label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.avatar-upload input[type="file"] {
    font-size: 0.85rem;
}

.avatar-upload small {
    color: #888;
    font-size: 0.8rem;
}

/* =============================================================================
   12. GDPR BOX
   ============================================================================= */

.gdpr-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-top: 24px;
}

.gdpr-box h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.gdpr-box p {
    font-size: 0.88rem;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.5;
}

.gdpr-box .privacy-links {
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.gdpr-box .privacy-links a {
    color: var(--rich-cerulean);
    text-decoration: none;
}

.gdpr-box .privacy-links a:hover {
    text-decoration: underline;
}

/* =============================================================================
   13. SUPPORT CARD
   ============================================================================= */

.support-card {
    background: var(--alice-blue);
    border: 1px solid rgba(89, 145, 43, 0.2);
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.support-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--baltic-blue);
}

.support-card p {
    font-size: 0.88rem;
    color: #555;
    margin: 0 0 16px;
}

.support-card select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    background: #fff;
}

.support-card textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 90px;
    box-sizing: border-box;
    margin-bottom: 12px;
}

/* =============================================================================
   14. MUTE TOGGLE
   ============================================================================= */

.mute-section {
    margin-top: 20px;
}

.mute-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-dark);
}

.mute-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.mute-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.mute-user-name {
    color: var(--text-dark);
    font-weight: 600;
}

/* =============================================================================
   15. PREVIEW (Admin) NOTICE
   ============================================================================= */

.dashboard-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.dashboard-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #ef5350;
}

.dashboard-message.preview-notice {
    background: #fff8e1;
    color: #795548;
    border-left: 4px solid #ffc107;
}

/* =============================================================================
   16. FORMS (shared across all dashboards)
   ============================================================================= */

.form-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.form-group {
    flex: 1;
    min-width: 240px;
    margin-bottom: 16px;
}

.form-group.full-width {
    flex: 100%;
    min-width: 100%;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--sage-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(89, 145, 43, 0.12);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 0.8rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
}

/* =============================================================================
   17. BUTTONS
   ============================================================================= */

.btn-primary {
    background: var(--sage-green);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--lime-moss);
    color: #fff;
}

.btn-secondary {
    background: var(--baltic-blue);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--rich-cerulean);
    color: #fff;
}

.btn-upgrade {
    display: inline-block;
    background: var(--baltic-blue);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-upgrade:hover {
    background: var(--sage-green);
    color: #fff;
}

.btn-small {
    background: var(--alice-blue);
    color: var(--baltic-blue);
    border: 1px solid var(--rich-cerulean);
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-small:hover {
    background: var(--alice-blue);
    border-color: var(--baltic-blue);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
    color: #fff;
}

/* =============================================================================
   18. STATUS BADGES (post status, application status etc.)
   ============================================================================= */

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-badge.status-publish,
.status-badge.status-active,
.status-badge.status-approved {
    background: none;
    color: #ffffff;
}

.status-badge.status-pending,
.status-badge.status-review {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.status-draft {
    background: #eeeeee;
    color: #616161;
}

.status-badge.status-rejected,
.status-badge.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-badge.status-paused {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-pause {
    background: #fff3e0;
    color: #e65100;
    border-color: #e65100;
}

.btn-pause:hover {
    background: #ffe0b2;
}

.btn-delete {
    background: #ffebee;
    color: #c62828;
    border-color: #c62828;
}

.btn-delete:hover {
    background: #ffcdd2;
}

.ad-bookings-section-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--baltic-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px;
    border-bottom: 2px solid var(--sage-green);
    margin-bottom: 12px;
}

.ad-bookings-section-label span {
    font-weight: 400;
    font-size: 0.8rem;
    color: #888;
    text-transform: none;
}

.action-btns {
    white-space: nowrap;
}

/* =============================================================================
   19. MESSAGES INTERFACE
   ============================================================================= */

.message-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.message-stats .stat-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 14px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    gap: 4px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.message-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background: #fafafa;
}

.message-item.unread {
    background: #f0f7ff;
}

.msg-avatar {
    flex-shrink: 0;
}

.msg-avatar img,
.msg-avatar .avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: block;
    object-fit: cover;
}

.msg-content {
    flex: 1;
    min-width: 0;
}

.msg-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.msg-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-time {
    font-size: 0.78rem;
    color: #999;
    flex-shrink: 0;
}

.msg-subject,
.msg-preview {
    font-size: 0.84rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-subject {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.msg-tag {
    background: var(--alice-blue);
    color: var(--rich-cerulean);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.unread-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rich-cerulean);
    flex-shrink: 0;
    margin-top: 4px;
}

/* =============================================================================
   20. WORK GALLERY (Premium member portfolio)
   ============================================================================= */

.work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.work-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

.work-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.work-info {
    padding: 12px;
}

.work-info h4 {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.work-info p {
    font-size: 0.82rem;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.4;
}

.visibility-toggle-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    font-size: 0.8rem;
    color: #666;
}

.toggle-switch {
    background: #ccc;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 24px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    padding: 0;
}

.toggle-switch.on {
    background: var(--sage-green);
}

.toggle-switch.off {
    background: #ccc;
}

.toggle-slider {
    display: block;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    transition: left 0.2s;
}

.toggle-switch.on .toggle-slider {
    left: 22px;
}

.toggle-switch.off .toggle-slider {
    left: 4px;
}

/* =============================================================================
   21. SUPPLIER / AD SLOT GRIDS
   ============================================================================= */

.ad-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.ad-slot-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 16px;
    text-align: center;
}

.ad-slot-item h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--baltic-blue);
}

.ad-slot-item p {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: #555;
}

.ad-slot-item .price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sage-green);
    margin: 8px 0;
}

/* Ad type radio selection */
.ad-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.ad-type-option {
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.ad-type-option input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
}

.ad-type-option:has(input:checked) {
    border-color: var(--sage-green);
    background: rgba(89, 145, 43, 0.05);
}

.ad-type-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.ad-type-option strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.ad-type-option span {
    font-size: 0.82rem;
    color: #777;
}

/* =============================================================================
   22. TABLES (applications, jobs, listings etc.)
   ============================================================================= */

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dashboard-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f5f5f5;
    font-weight: 700;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.dashboard-table tr:last-child td {
    border-bottom: none;
}

.dashboard-table tr:hover td {
    background: #fafafa;
}

/* Legacy class aliases */
.applications-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.applications-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f5f5f5;
    font-weight: 700;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.applications-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* =============================================================================
   23. FORUM ACTIVITY LIST
   ============================================================================= */

.forum-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forum-activity-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.88rem;
    gap: 12px;
    flex-wrap: wrap;
}

.forum-activity-list li:last-child {
    border-bottom: none;
}

.forum-activity-list a {
    color: var(--baltic-blue);
    text-decoration: none;
    font-weight: 600;
    flex: 1;
}

.forum-activity-list a:hover {
    text-decoration: underline;
}

.post-date {
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =============================================================================
   24. SUBSCRIPTION / BILLING SECTION
   ============================================================================= */

.subscription-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-status,
.sub-plan,
.sub-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.sub-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
}

.sub-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn-cancel {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-cancel:hover {
    background: #ef4444;
    color: #fff;
}

/* =============================================================================
   25. MISC / UTILITIES
   ============================================================================= */

.no-content {
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
    padding: 10px 0;
}

.privacy-links {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.privacy-links a {
    color: var(--rich-cerulean);
    text-decoration: none;
}

.privacy-links a:hover {
    text-decoration: underline;
}

.gdpr-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.gdpr-section h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Availability badges */
.availability-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.availability-badge.available {
    background: #e8f5e9;
    color: #2e7d32;
}

.availability-badge.not-accepting {
    background: #fff3e0;
    color: #e65100;
}

/* =============================================================================
   25b. WORK EXAMPLES (Premium Member — My Work tab)
   ============================================================================= */

.we-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.we-card {
    border: 1px solid #e8eaed;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
}

.we-card-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fafafa;
}

.we-card-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.we-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.we-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #bbb;
}

.we-card-meta {
    flex: 1;
    min-width: 0;
}

.we-card-title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--baltic-blue, #1a2e44);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.we-card-brief {
    margin: 0 0 4px;
    font-size: 0.82rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.we-card-date {
    font-size: 0.75rem;
    color: #aaa;
}

.we-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Accordion panels */
.we-accordion {
    padding: 20px;
    border-top: 1px solid #e8eaed;
    background: #fff;
}

.we-view-panel h5,
.we-edit-panel h5 {
    font-size: 0.88rem;
    color: var(--baltic-blue, #1a2e44);
    margin: 0 0 8px;
    font-weight: 600;
}

.we-view-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.we-bullet-list {
    margin: 0;
    padding-left: 18px;
}

.we-bullet-list li {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.5;
}

.we-image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.we-image-grid img,
.we-image-link img {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    display: block;
}

.we-image-link {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.15s;
}

.we-image-link:hover {
    opacity: 0.85;
}

.we-img-wrap {
    position: relative;
    display: inline-block;
}

.we-img-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.we-img-remove:hover {
    background: #c00;
}

.we-form .form-group textarea,
.we-form .form-group input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

/* Add accordion */
#we-add-panel {
    margin-top: 12px;
    border: 1px solid #e8eaed;
    border-radius: 5px;
    padding: 20px;
    background: #fafafa;
}

/* =============================================================================
   26. RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .dashboard-content-full {
        padding: 16px 12px;
    }

    .dashboard-title-bar .container-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tgc-dashboard-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tgc-dashboard-tabs::-webkit-scrollbar {
        display: none;
    }

    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .we-card-row {
        flex-wrap: wrap;
    }

    .we-card-thumb {
        width: 100%;
        height: 120px;
    }

    .we-view-cols {
        grid-template-columns: 1fr;
    }

    .form-group {
        min-width: 100%;
    }

    .work-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .sub-actions {
        flex-direction: column;
    }

    .message-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .work-gallery {
        grid-template-columns: 1fr;
    }

    .header-identity .page-title {
        font-size: 1.3rem;
    }

    .header-content-right {
        justify-content: flex-start;
    }
}

/* =============================================================================
   PROFILE TAB — avatar card + two-column layout
   ============================================================================= */

/* Avatar card */
.profile-avatar-card .profile-avatar-body {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.profile-avatar-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.profile-avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8f4e8;
}

.profile-avatar-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d4a2d;
    text-align: center;
}

.profile-avatar-role {
    font-size: 0.78rem;
    color: #888;
    text-align: center;
}

.profile-upload-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #2d4a2d;
}

/* Avatar beside name: avatar on left, name/role text on right */
.profile-avatar-beside {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.profile-avatar-beside .pab-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8f4e8;
    display: block;
    flex-shrink: 0;
}

.profile-avatar-beside .pab-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-avatar-beside .profile-avatar-name {
    font-weight: 700;
    font-size: 1.3rem;
    color: #2d4a2d;
    text-align: left;
    margin: 0;
}

/* Centred stacked avatar layout (photo above name) */
.profile-avatar-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    text-align: center;
}

.profile-avatar-centered .pab-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #e8f4e8;
}

.profile-avatar-centered .profile-avatar-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d4a2d;
    margin: 0;
}

.profile-avatar-centered .profile-avatar-role {
    font-size: 0.85rem;
    color: #888;
}

/* File + upload button on same row */
.avatar-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar-file-row input[type="file"] {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
}

/* Rate input: amount + period on one row */
.rate-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.rate-input-row input  { flex: 1; min-width: 0; }
.rate-input-row select { width: 130px; flex-shrink: 0; }

.profile-avatar-beside .profile-avatar-role {
    font-size: 0.82rem;
    color: #888;
    text-align: left;
}

/* Top row: avatar + membership side by side */
.profile-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Two-column layout */
.profile-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.profile-col-left,
.profile-col-right {
    min-width: 0;
}

/* Fieldset for address block */
.form-fieldset {
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    padding: 16px 16px 8px;
    margin: 12px 0 16px;
}

.form-fieldset legend {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

/* Collapse to single column on tablet */
@media (max-width: 900px) {

    .profile-top-row,
    .profile-two-col {
        grid-template-columns: 1fr;
    }
}


.oa-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.oa-btn:hover {
    background: #f5f5f5;
    border-color: #aaa;
}

.oa-btn-support {
    background: #2d4a2d;
    border-color: #2d4a2d;
    color: #fff;
}

.oa-btn-support:hover {
    background: #1e3a1e;
    border-color: #1e3a1e;
}

.muted-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.muted-badge.oa-count-neutral {
    background: #6c757d;
}

/* =============================================================================
   MODAL SYSTEM
   ============================================================================= */

.tgc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.tgc-modal.is-open {
    display: flex;
}

.tgc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.tgc-modal-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 16px;
}

.tgc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.tgc-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #2d4a2d;
}

.tgc-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid #d93025;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    color: #d93025;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    z-index: 10;
}

.tgc-modal-close:hover {
    background: #d93025;
    color: #fff;
}

.tgc-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

/* =============================================================================
   MUTED USERS MODAL
   ============================================================================= */

.muted-modal-list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.muted-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 7px;
    background: #fafafa;
}

.muted-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.muted-user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.muted-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-unmute {
    padding: 5px 12px;
    border: 1px solid #2d4a2d;
    border-radius: 5px;
    background: transparent;
    color: #2d4a2d;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.btn-unmute:hover {
    background: #2d4a2d;
    color: #fff;
}

.muted-add-form {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.muted-add-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.muted-add-row {
    display: flex;
    gap: 8px;
}

.muted-add-row input[type="text"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.875rem;
}

/* =============================================================================
   SUPPORT MODAL
   ============================================================================= */

.support-success {
    text-align: center;
    padding: 20px 0;
}

.support-success .success-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.support-success p {
    color: #2d7a2d;
    font-size: 0.95rem;
}

.support-error {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    color: #721c24;
    font-size: 0.875rem;
}

/* =============================================================================
   SUBSCRIPTIONS PANEL
   ============================================================================= */

.sub-posts-section {
    margin-top: 20px;
}

.sub-posts-heading {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d4a2d;
    margin: 0 0 6px;
}

.sub-posts-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 12px;
}

.sub-post-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.875rem;
    color: #333;
}

.sub-post-item:last-child {
    border-bottom: none;
}

.sub-post-item input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.sub-posts-empty {
    font-size: 0.85rem;
    color: #aaa;
    font-style: italic;
    padding: 8px 0;
}

@media (max-width: 600px) {
    .tgc-modal-box {
        margin: 8px;
        max-height: 95vh;
    }

}