/*
 * Tsjob PRO — Global Styles (ts-pro-global.css)
 * Loaded on all PRO pages. Defines CSS custom properties, layout shell,
 * shared components (buttons, notices, badges, tables, forms, pagination).
 */

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
    --tspro-primary:        #2271b1;
    --tspro-primary-dark:   #1a5a8a;
    --tspro-primary-light:  #e8f0f8;
    --tspro-accent:         #f0ad4e;
    --tspro-danger:         #dc3232;
    --tspro-success:        #46b450;
    --tspro-warning:        #f0ad4e;
    --tspro-info:           #00a0d2;

    --tspro-text:           #1e1e2d;
    --tspro-text-muted:     #6b7280;
    --tspro-border:         #e5e7eb;
    --tspro-bg:             #f9fafb;
    --tspro-white:          #ffffff;

    --tspro-radius:         6px;
    --tspro-radius-lg:      10px;
    --tspro-shadow:         0 1px 4px rgba(0,0,0,.10);
    --tspro-shadow-md:      0 4px 12px rgba(0,0,0,.12);

    --tspro-font:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --tspro-font-size:      15px;
    --tspro-line-height:    1.6;
}

/* ─── Base reset (scoped) ────────────────────────────────────────────────── */
.tspro-dashboard *,
.tspro-form-wrap *,
.tspro-pricing-table * {
    box-sizing: border-box;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.tspro-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-family: var(--tspro-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--tspro-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
}
.tspro-btn--primary   { background: var(--tspro-primary); color: #fff; border-color: var(--tspro-primary-dark); }
.tspro-btn--primary:hover { background: var(--tspro-primary-dark); color: #fff; }
.tspro-btn--secondary { background: var(--tspro-white); color: var(--tspro-primary); border-color: var(--tspro-primary); }
.tspro-btn--secondary:hover { background: var(--tspro-primary-light); }
.tspro-btn--danger    { background: var(--tspro-danger); color: #fff; border-color: #a82929; }
.tspro-btn--danger:hover { opacity: .88; }
.tspro-btn--small     { padding: 5px 11px; font-size: 12px; }
.tspro-btn--block     { width: 100%; justify-content: center; }
.tspro-btn--disabled  { opacity: .55; pointer-events: none; }

/* ─── Notices ────────────────────────────────────────────────────────────── */
.tspro-notice {
    padding: 12px 16px;
    border-radius: var(--tspro-radius);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}
.tspro-notice--success { background: #edfaee; border-left: 4px solid var(--tspro-success); color: #1a5c1e; }
.tspro-notice--error   { background: #fde8e8; border-left: 4px solid var(--tspro-danger);  color: #7b1010; }
.tspro-notice--warning { background: #fef9e7; border-left: 4px solid var(--tspro-warning); color: #7a5a00; }
.tspro-notice--info    { background: #e6f6fb; border-left: 4px solid var(--tspro-info);    color: #005a7a; }

/* ─── Badges / status pills ──────────────────────────────────────────────── */
.tspro-badge,
.tspro-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.tspro-status-badge--publish,
.tspro-status-badge--active,
.tspro-status-badge--hired      { background: #edfaee; color: #1a5c1e; }
.tspro-status-badge--pending    { background: #fef9e7; color: #7a5a00; }
.tspro-status-badge--shortlisted { background: #e8f0f8; color: #1a5a8a; }
.tspro-status-badge--interviewing { background: #f0e8fb; color: #5a1a8a; }
.tspro-status-badge--offered    { background: #fff3cd; color: #856404; }
.tspro-status-badge--rejected,
.tspro-status-badge--expired,
.tspro-status-badge--cancelled  { background: #fde8e8; color: #7b1010; }
.tspro-status-badge--applied,
.tspro-status-badge--reviewed   { background: var(--tspro-bg); color: var(--tspro-text-muted); border: 1px solid var(--tspro-border); }

.tspro-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--tspro-danger);
    color: #fff;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.tspro-featured-badge {
    display: inline-block;
    background: var(--tspro-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-left: 6px;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.tspro-table-wrap { overflow-x: auto; }
.tspro-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.tspro-table th,
.tspro-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--tspro-border);
}
.tspro-table th {
    font-weight: 600;
    color: var(--tspro-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--tspro-bg);
}
.tspro-table tbody tr:hover { background: #fafafa; }
.tspro-table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── Stats grid ─────────────────────────────────────────────────────────── */
.tspro-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.tspro-stat-card {
    background: var(--tspro-white);
    border: 1px solid var(--tspro-border);
    border-radius: var(--tspro-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--tspro-shadow);
}
.tspro-stat-card__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--tspro-primary);
    line-height: 1;
}
.tspro-stat-card__label {
    font-size: 12px;
    color: var(--tspro-text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.tspro-progress-bar {
    height: 6px;
    background: var(--tspro-border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.tspro-progress-bar__fill {
    height: 100%;
    background: var(--tspro-primary);
    border-radius: 3px;
    transition: width .4s ease;
}

/* ─── Section titles ─────────────────────────────────────────────────────── */
.tspro-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tspro-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tspro-border);
}
.tspro-section-title--small {
    font-size: 15px;
    font-weight: 600;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom-width: 1px;
}

/* ─── Empty state ────────────────────────────────────────────────────────── */
.tspro-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--tspro-text-muted);
    font-size: 15px;
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.tspro-pagination {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.tspro-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--tspro-border);
    border-radius: var(--tspro-radius);
    font-size: 14px;
    color: var(--tspro-primary);
    text-decoration: none;
    transition: background .12s;
}
.tspro-pagination__item:hover,
.tspro-pagination__item.is-active {
    background: var(--tspro-primary);
    border-color: var(--tspro-primary);
    color: #fff;
}

/* ─── Auth action links ──────────────────────────────────────────────────── */
.tspro-auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ─── Loading spinner ────────────────────────────────────────────────────── */
.tspro-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tspro-text-muted);
    padding: 20px 0;
    font-size: 14px;
}
.tspro-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--tspro-border);
    border-top-color: var(--tspro-primary);
    border-radius: 50%;
    animation: tspro-spin .6s linear infinite;
}
@keyframes tspro-spin { to { transform: rotate(360deg); } }

/* ─── Upcoming list (shared by both dashboards) ──────────────────────────── */
.tspro-upcoming-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.tspro-upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--tspro-white);
    border: 1px solid var(--tspro-border);
    border-radius: var(--tspro-radius);
    gap: 12px;
    flex-wrap: wrap;
}
.tspro-upcoming-item__info { display: flex; flex-direction: column; gap: 2px; }
.tspro-upcoming-item__time { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tspro-text-muted); }

/* ─── Tab header (jobs tab) ──────────────────────────────────────────────── */
.tspro-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.tspro-tab-header .tspro-section-title { margin: 0; border: none; padding: 0; }

/* ─── Inline form (used inside tables) ───────────────────────────────────── */
.tspro-inline-form { display: inline; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tspro-stats-grid { grid-template-columns: 1fr 1fr; }
    .tspro-table th, .tspro-table td { padding: 8px 10px; }
    .tspro-stat-card__value { font-size: 22px; }
}

.tspro-bell-dropdown { display: none; position: absolute; right: 0; top: 100%; width: 320px; background: #fff; border: 1px solid #ddd; box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 999; }
.tspro-bell-dropdown.is-open { display: block; }
.tspro-unread-badge { position: absolute; top: -6px; right: -6px; background: #d63638; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 999px; }
.tspro-bell-item { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.tspro-bell-item.is-unread { background: #f0f6fc; }
.tspro-bell-item__title { display: block; color: #1e1e2d; text-decoration: none; }
.tspro-bell-item__time { display: block; color: #888; font-size: 11px; margin-top: 2px; }
.tspro-bell-empty { padding: 14px; text-align: center; color: #888; font-size: 13px; }


