/**
 * TalentorX Dashboard Styles - SaaS Level Design
 * LinkedIn/Notion/Stripe inspired modern UI
 * 
 * @package TalentorX
 * @since 3.0.1
 */

/* ============================================
   CSS VARIABLES & THEME
   ============================================ */
:root {
    /* Colors */
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #E6F2FF;
    --secondary: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    /* Neutrals */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 72px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Motion */
    --motion-fast: 120ms;
    --motion-base: 200ms;
    --motion-slow: 300ms;
    --motion-ease: cubic-bezier(0.2, 0, 0, 1);
    --transition: all var(--motion-base) var(--motion-ease);
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --text-xs: 12px;
    --text-sm: 14px;
    --text-md: 16px;
    --text-lg: 20px;
    --text-xl: 24px;
    --text-2xl: 32px;
}

/* ============================================
   RESET & BASE
   ============================================ */
.tx-dashboard * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.tx-dashboard {
    --tx-admin-bar-offset: 0px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: none;
    margin: 0;
}

.tx-dashboard h1 { font-size: var(--text-xl); line-height: 1.2; }
.tx-dashboard h2 { font-size: var(--text-lg); line-height: 1.3; }
.tx-dashboard h3 { font-size: var(--text-md); line-height: 1.35; }
.tx-dashboard p,
.tx-dashboard li,
.tx-dashboard label,
.tx-dashboard input,
.tx-dashboard textarea,
.tx-dashboard select,
.tx-dashboard button,
.tx-dashboard a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.admin-bar .tx-dashboard {
    --tx-admin-bar-offset: 32px;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.tx-dashboard-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    width: 100%;
    min-height: calc(100vh - var(--tx-admin-bar-offset));
    background: var(--gray-50);
    align-items: start;
}

/* ============================================
   SIDEBAR
   ============================================ */
.tx-sidebar {
    width: 100%;
    background: white;
    border-right: 1px solid var(--gray-200);
    position: sticky;
    top: var(--tx-admin-bar-offset);
    height: calc(100vh - var(--tx-admin-bar-offset));
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.tx-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.tx-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.tx-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #0052CC 100%);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.tx-logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.tx-logo-text p {
    font-size: 12px;
    color: var(--gray-500);
    margin: 0;
}

/* User Profile in Sidebar */
.tx-sidebar-user {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
}

.tx-user-info {
    flex: 1;
    min-width: 0;
}

.tx-user-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-user-tin {
    font-size: 12px;
    color: var(--gray-500);
    font-family: 'Courier New', monospace;
}

/* Navigation */
.tx-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.tx-nav-section {
    margin-bottom: 24px;
}

.tx-nav-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    padding: 0 12px 8px;
}

.tx-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    margin-bottom: 2px;
    font-weight: 500;
}

.tx-nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.tx-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.tx-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.tx-sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
}

.tx-logout-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tx-logout-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.tx-main {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    max-width: none;
    overflow-x: hidden;
}

/* Top Header */
.tx-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: var(--tx-admin-bar-offset);
    z-index: 90;
}

.tx-header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.tx-header-left p {
    font-size: 14px;
    color: var(--gray-500);
}

.tx-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tx-header-search {
    position: relative;
}

.tx-search-input {
    width: 300px;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.tx-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.tx-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.tx-notifications-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.tx-notifications-btn:hover {
    background: var(--gray-200);
}

.tx-notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* Content Area */
.tx-content {
    padding: 32px;
    max-width: 100%;
    overflow-x: auto;
}

.tx-section-panel {
    display: block;
}

.tx-grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}

.tx-grid-main,
.tx-grid-sidebar {
    min-width: 0;
}

.tx-grid-2up {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tx-grid-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
    gap: 12px;
    margin-bottom: 16px;
}

.tx-widget-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tx-widget-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    background: white;
    transition: var(--transition);
}

.tx-widget-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.tx-widget-item-main {
    min-width: 0;
    flex: 1;
}

.tx-widget-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.tx-widget-item-text {
    font-size: 13px;
    color: var(--gray-600);
}

.tx-widget-item-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
}

.tx-widget-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tx-widget-empty {
    padding: 24px;
    text-align: center;
    border: 1px dashed var(--gray-300);
    border-radius: var(--border-radius-sm);
    color: var(--gray-500);
    background: var(--gray-50);
}

.tx-loading-indicator {
    padding: 16px 0;
    color: var(--gray-500);
    font-weight: 500;
}

.tx-loading-indicator.is-hidden {
    display: none;
}

/* ============================================
   CARDS
   ============================================ */
.tx-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.tx-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tx-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.tx-card-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.tx-card-body {
    padding: 24px;
}

.tx-card-footer {
    padding: 16px 24px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ============================================
   STATS GRID
   ============================================ */
.tx-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.tx-stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.tx-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-200);
}

.tx-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tx-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.tx-stat-icon.blue { background: #DBEAFE; color: #1E40AF; }
.tx-stat-icon.green { background: #D1FAE5; color: #065F46; }
.tx-stat-icon.orange { background: #FED7AA; color: #92400E; }
.tx-stat-icon.purple { background: #E9D5FF; color: #6B21A8; }
.tx-stat-icon.red { background: #FEE2E2; color: #991B1B; }
.tx-stat-icon.yellow { background: #FEF3C7; color: #92400E; }

.tx-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 8px;
}

.tx-stat-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.tx-stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.tx-stat-change.positive {
    color: var(--success);
}

.tx-stat-change.negative {
    color: var(--danger);
}

/* ============================================
   BUTTONS
   ============================================ */
.tx-btn {
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
    min-height: 40px;
}

.tx-btn-primary {
    background: var(--primary);
    color: white;
}

.tx-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tx-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.tx-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.tx-btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.tx-btn-secondary:hover {
    background: var(--gray-300);
}

.tx-btn-success {
    background: var(--success);
    color: white;
}

.tx-btn-danger {
    background: var(--danger);
    color: white;
}

.tx-btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.tx-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tx-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.tx-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.tx-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.tx-btn.is-loading {
    pointer-events: none;
}

.tx-btn.is-success {
    background: var(--success);
    color: #fff;
}

/* ============================================
   BADGES
   ============================================ */
.tx-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.tx-badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.tx-badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.tx-badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.tx-badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.tx-badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.tx-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.tx-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--gray-400);
}

.tx-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.tx-empty-text {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.tx-progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.tx-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #0052CC 100%);
    transition: width 0.3s ease;
}

/* ============================================
   PROFILE COMPLETION CARD
   ============================================ */
.tx-profile-completion {
    background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.tx-completion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tx-completion-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.tx-completion-percentage {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.tx-completion-items {
    margin-top: 16px;
}

.tx-completion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.tx-completion-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-completion-checkbox.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* ============================================
   ACTIVITY TIMELINE
   ============================================ */
.tx-timeline {
    position: relative;
    padding-left: 32px;
}

.tx-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.tx-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.tx-timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
}

.tx-timeline-content {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--border-radius-sm);
}

.tx-timeline-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.tx-timeline-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.tx-timeline-time {
    font-size: 12px;
    color: var(--gray-500);
}

/* ============================================
   TABLES
   ============================================ */
.tx-table {
    width: 100%;
    border-collapse: collapse;
}

.tx-table thead {
    background: var(--gray-50);
}

.tx-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tx-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.tx-table tbody tr:hover {
    background: var(--gray-50);
}

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

/* ============================================
   FORMS
   ============================================ */
.tx-form-group {
    margin-bottom: 20px;
}

.tx-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.tx-form-input,
.tx-form-select,
.tx-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.tx-form-input:focus,
.tx-form-select:focus,
.tx-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.tx-form-help {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.tx-form-select-inline {
    min-width: 180px;
    width: auto;
}

.tx-table-wrap {
    overflow-x: auto;
}

.tx-table-subtext {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.tx-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tx-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.tx-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    font-weight: 500;
}

.tx-pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 16px;
    overflow-x: auto;
}

.tx-pipeline-column {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    min-height: 320px;
    padding: 12px;
}

.tx-pipeline-column.is-dragging-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.tx-pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.tx-pipeline-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tx-pipeline-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    cursor: grab;
    box-shadow: var(--shadow-sm);
}

.tx-pipeline-meta,
.tx-pipeline-empty {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.tx-candidate-card,
.tx-notification-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    background: white;
    margin-bottom: 12px;
}

.tx-notification-item-unread {
    border-color: var(--primary);
    background: #f8fbff;
}

.tx-candidate-skills {
    margin-top: 8px;
    color: var(--gray-700);
}

.tx-stats-grid-compact {
    margin-bottom: 20px;
}

.tx-stat-card-compact {
    margin-bottom: 0;
    padding: 20px;
}

.tx-card-plain {
    box-shadow: none;
}

.tx-bar-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 50px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.tx-bar-track {
    background: var(--gray-200);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.tx-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #38bdf8);
}

.tx-bar-label,
.tx-bar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.tx-profile-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
    .tx-sidebar {
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .tx-dashboard-wrapper {
        grid-template-columns: 1fr;
    }

    .tx-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .tx-header {
        padding: 0 16px;
    }
    
    .tx-content {
        padding: 16px;
    }
    
    .tx-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tx-search-input {
        width: 200px;
    }
    
    .tx-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .tx-grid-2up,
    .tx-grid-filters {
        grid-template-columns: 1fr;
    }

    .tx-pipeline-board {
        grid-template-columns: 1fr;
    }

    .tx-candidate-card,
    .tx-notification-item,
    .tx-bulk-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .tx-bar-row {
        grid-template-columns: 1fr;
    }
}

/* CRITICAL FIX #9: Add mobile breakpoints for small screens */
@media (max-width: 480px) {
    .tx-sidebar {
        width: 100%;
    }
    
    .tx-main {
        width: 100%;
    }
    
    .tx-header {
        padding: 0 12px;
    }
    
    .tx-content {
        padding: 12px;
    }
    
    .tx-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tx-grid-2col {
        gap: 16px;
    }
    
    .tx-search-input {
        width: 150px;
    }
    
    .tx-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .tx-modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 782px) {
    body.admin-bar .tx-dashboard {
        --tx-admin-bar-offset: 46px;
    }
}

@media (max-width: 375px) {
    .tx-header-title h1 {
        font-size: 18px;
    }
    
    .tx-stat-card {
        padding: 12px;
    }
    
    .tx-stat-value {
        font-size: 24px;
    }
    
    .tx-search-input {
        width: 120px;
    }
    
    .tx-user-actions {
        gap: 8px;
    }
    
    .tx-btn-icon {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.tx-mt-1 { margin-top: 8px; }
.tx-mt-2 { margin-top: 16px; }
.tx-mt-3 { margin-top: 24px; }
.tx-mt-4 { margin-top: 32px; }

.tx-mb-1 { margin-bottom: 8px; }
.tx-mb-2 { margin-bottom: 16px; }
.tx-mb-3 { margin-bottom: 24px; }
.tx-mb-4 { margin-bottom: 32px; }

.tx-text-center { text-align: center; }
.tx-text-right { text-align: right; }

.tx-flex { display: flex; }
.tx-flex-between { display: flex; justify-content: space-between; }
.tx-flex-center { display: flex; align-items: center; justify-content: center; }
.tx-gap-2 { gap: 16px; }
.tx-ml-1 { margin-left: 8px; }

/* ============================================
   LOADING SPINNER
   ============================================ */
.tx-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   TOGGLE SWITCH (Open to Work / Hiring)
   ============================================ */
.tx-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.tx-toggle-container.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.tx-toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.tx-toggle-switch.active {
    background: var(--primary);
}

.tx-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tx-toggle-switch.active .tx-toggle-slider {
    transform: translateX(24px);
}

.tx-toggle-label {
    flex: 1;
}

.tx-toggle-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.tx-toggle-description {
    font-size: 13px;
    color: var(--gray-600);
}

.tx-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tx-status-badge.tx-status-pending { background: #FEF3C7; color: #92400E; }
.tx-status-badge.tx-status-selected,
.tx-status-badge.tx-status-active { background: #D1FAE5; color: #065F46; }
.tx-status-badge.tx-status-rejected,
.tx-status-badge.tx-status-suspended { background: #FEE2E2; color: #991B1B; }
.tx-status-badge.tx-status-under_review,
.tx-status-badge.tx-status-shortlisted { background: #DBEAFE; color: #1E40AF; }

/* ATS pipeline statuses — previously unstyled */
.tx-status-badge.tx-status-applied { background: #EDE9FE; color: #5B21B6; }
.tx-status-badge.tx-status-screening { background: #FEF9C3; color: #713F12; }
.tx-status-badge.tx-status-interview-scheduled { background: #CFFAFE; color: #155E75; }
.tx-status-badge.tx-status-interviewed { background: #E0F2FE; color: #0C4A6E; }
.tx-status-badge.tx-status-offered { background: #FEF3C7; color: #78350F; }
.tx-status-badge.tx-status-accepted { background: #DCFCE7; color: #14532D; }
.tx-status-badge.tx-status-withdrawn { background: #F3F4F6; color: #374151; }
.tx-status-badge.tx-status-draft { background: #F9FAFB; color: #6B7280; border: 1px solid #E5E7EB; }

.tx-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #fff;
    color: var(--gray-900);
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 280px;
    max-width: 460px;
    border-left: 4px solid var(--info);
    animation: slideInRight var(--motion-slow) var(--motion-ease);
}

.tx-toast.tx-toast-success { border-left-color: var(--success); }
.tx-toast.tx-toast-error { border-left-color: var(--danger); }
.tx-toast.tx-toast-warning { border-left-color: var(--warning); }
.tx-toast.tx-toast-info { border-left-color: var(--info); }
.tx-toast-title { font-weight: 700; margin-bottom: 2px; }
.tx-toast-message { font-size: 13px; color: var(--gray-600); }
.tx-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.tx-toast-close:hover { background: var(--gray-100); color: var(--gray-700); }

.tx-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9999;
}

.tx-modal-content {
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
}

.tx-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tx-modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    color: var(--gray-500);
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 8px;
}

.tx-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.tx-modal-body {
    padding: 24px;
}

.tx-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.tx-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tx-status-badge.open-to-work {
    background: #D1FAE5;
    color: #065F46;
}

.tx-status-badge.hiring {
    background: #DBEAFE;
    color: #1E40AF;
}

.tx-status-badge.open-for-placement {
    background: #FEF3C7;
    color: #92400E;
}

.tx-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
    .tx-dashboard,
    .tx-dashboard *,
    .tx-dashboard *::before,
    .tx-dashboard *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .tx-btn:hover,
    .tx-stat-card:hover,
    .tx-widget-item:hover {
        transform: none !important;
        box-shadow: var(--shadow) !important;
    }
}

.tx-page-shell {
    padding: var(--space-3);
    max-width: 1100px;
    margin: 0 auto;
}
.tx-page-header {
    margin-bottom: var(--space-3);
}
.tx-page-subtitle {
    color: var(--gray-600);
}
.tx-page-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}
.tx-job-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: 4px;
}
.tx-applied-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 700;
    background: #d1fae5;
    color: #065f46;
}
.tx-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}
.tx-profile-progress-wrap {
    height: 10px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}
.tx-profile-progress-bar {
    height: 10px;
    background: var(--primary);
}

@media (max-width: 768px) {
    .tx-page-shell { padding: var(--space-2); }
    .tx-page-grid,
    .tx-form-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   MISSING COMPONENTS — PHASE 3 ADDITIONS
   ============================================ */

/* Form actions row */
.tx-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--gray-100);
}

/* Table responsive wrapper */
.tx-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.tx-table-responsive .tx-table {
    min-width: 600px;
}

/* Skeleton loading */
.tx-skeleton-wrapper {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tx-skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: var(--border-radius-sm);
}

.tx-skeleton-text {
    height: 16px;
    width: 60%;
}

.tx-skeleton-rect {
    height: 80px;
    width: 100%;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state */
.tx-error-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: var(--border-radius);
}

.tx-error-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--danger);
}

.tx-error-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.tx-error-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

/* Application history timeline */
.tx-timeline-marker {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.tx-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.tx-timeline-status {
    font-weight: 600;
}

.tx-timeline-date {
    font-size: 12px;
    color: var(--gray-500);
}

.tx-timeline-remark {
    font-size: 13px;
    color: var(--gray-700);
    background: var(--gray-50);
    border-left: 3px solid var(--gray-300);
    padding: 8px 12px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin-top: 8px;
}

.tx-timeline-empty {
    text-align: center;
    padding: 32px;
    color: var(--gray-500);
    font-size: 14px;
}

/* Stats grid — 4-column fixed for dashboards */
.tx-stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* Notification dot on header bell */
.tx-header-right .tx-notifications-btn {
    font-size: 20px;
}

/* Section panel transitions */
.tx-section-panel {
    animation: fadeIn var(--motion-base) var(--motion-ease);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card hover — subtle lift */
.tx-card {
    transition: box-shadow var(--motion-base) var(--motion-ease);
}

.tx-card:hover {
    box-shadow: var(--shadow-md);
}

/* Stat card — consistent min height */
.tx-stat-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Widget list — consistent item height */
.tx-widget-item {
    min-height: 64px;
}

/* Nav item — active indicator */
.tx-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.tx-nav-item {
    position: relative;
}

/* Form section headings */
.tx-form h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.tx-form h3:first-child {
    margin-top: 0;
}

/* Help text */
.tx-help-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
    display: block;
}

/* Inline code */
.tx-dashboard code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    color: var(--gray-700);
}

/* Loading indicator text */
.tx-loading-indicator:not(.is-hidden) {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-500);
    font-size: 14px;
    padding: 24px 0;
}

.tx-loading-indicator:not(.is-hidden)::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* Sidebar scrollbar */
.tx-sidebar::-webkit-scrollbar {
    width: 4px;
}

.tx-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.tx-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 2px;
}

/* Content scrollbar */
.tx-content::-webkit-scrollbar {
    height: 6px;
}

.tx-content::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.tx-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* Table — zebra striping */
.tx-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.tx-table tbody tr:nth-child(even):hover {
    background: var(--gray-100);
}

/* Responsive additions */
@media (max-width: 1024px) {
    .tx-stats-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tx-stats-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tx-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tx-form-actions .tx-btn {
        width: 100%;
        justify-content: center;
    }

    .tx-table-responsive {
        border-radius: var(--border-radius-sm);
    }

    .tx-timeline {
        padding-left: 24px;
    }

    .tx-timeline-marker {
        left: -20px;
    }
}

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

    .tx-stat-card {
        padding: 16px;
        min-height: 100px;
    }

    .tx-stat-value {
        font-size: 24px;
    }

    .tx-card-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tx-card-body {
        padding: 16px;
    }

    .tx-modal-content {
        border-radius: var(--border-radius);
        max-height: 95vh;
    }

    .tx-modal-body {
        padding: 16px;
    }
}

/* Made with Bob */

/* ---- Placement Calendar Widget ---- */
.tx-cal-wrap { font-family: inherit; }
.tx-cal-header { display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:4px; }
.tx-cal-grid td { transition: background .15s; }
.tx-cal-grid td:hover { background: #f0f9ff !important; }
.tx-cal-event-dot { transition: opacity .15s; }
.tx-cal-event-dot:hover { opacity: .8; }
.tx-cal-upcoming-item:hover { background: #f9fafb; }
.tx-cal-modal { align-items: center; justify-content: center; }
