
body {
    background-color: var(--bg);
    position: relative;
}
.member-layout {
    max-width: 1350px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}
.member-right-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}
.user-greeting {
    font-size: 16px;
    color: var(--text-main);
    font-weight: bold;
    margin-right: 15px;
}
.message-icon {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    width: 24px;
    height: 24px;
    color: #475569;
    transition: color 0.2s;
}
.message-icon:hover {
    color: var(--primary);
}
.message-icon svg {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: opacity 0.2s, transform 0.2s;
}
.message-icon .envelope-open {
    opacity: 0;
    transform: scale(0.8);
}
.message-icon .envelope-closed {
    opacity: 1;
    transform: scale(1);
}
.message-icon .unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
    opacity: 0;
    transition: opacity 0.2s;
}
.message-icon.has-unread .unread-dot {
    opacity: 1;
}
.message-icon.is-read .envelope-closed {
    opacity: 0;
    transform: scale(0.8);
}
.message-icon.is-read .envelope-open {
    opacity: 1;
    transform: scale(1);
}
.message-icon.is-read .unread-dot {
    opacity: 0;
}
.member-sidebar {
    width: 280px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    position: sticky;
    top: 90px;
    height: fit-content;
}
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    width: 360px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s ease-out;
}
.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.noti-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.noti-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
}
.noti-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
}
.noti-tabs {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
}
.noti-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 2px solid transparent;
}
.noti-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.noti-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}
.noti-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    background: #f8fafc;
    border-left: 3px solid #f59e0b; 
    position: relative;
}
.noti-item.read {
    background: transparent;
    border-left-color: transparent;
    opacity: 0.7;
}
.noti-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}
.noti-meta-icon {
    font-size: 14px;
}
.noti-content {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}
.user-profile-card {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
}
.profile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.user-details {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.user-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-name {
    font-size: 20px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 12px;
    text-align: center;
}
.user-info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}
.user-id, .user-energy {
    font-size: 13px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-energy {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}
.user-info-val {
    font-weight: bold;
    color: #334155;
}
.resume-completeness {
    background: #fff;
    padding: 10px 15px;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    position: relative;
}
.comp-label {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    position: relative;
}
.comp-tooltip {
    position: absolute;
    top: -55px;
    left: 0;
    width: 100%;
    background-color: #2563eb; 
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    text-align: center;
    z-index: 10;
    animation: bounceTooltip 2s infinite ease-in-out;
}
.comp-tooltip .highlight-text {
    color: #ffeb3b; 
    font-size: 16px;
    margin-left: 5px;
}
.missing-field {
    border-color: #f59e0b !important; 
    background-color: #fffbeb !important; 
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}
.comp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #2563eb;
}
@keyframes bounceTooltip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.comp-label span {
    color: var(--primary);
    font-weight: bold;
}
.comp-bar {
    height: 6px;
    background: #e6e6e6;
    border-radius: 3px;
    overflow: hidden;
}
.comp-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--red));
    border-radius: 3px;
}
.member-nav {
    display: flex;
    flex-direction: column;
}
.nav-group {
    display: flex;
    flex-direction: column;
}
.nav-item {
    padding: 15px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}
.nav-group:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}
.nav-item:last-child {
    border-bottom: none;
}
.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: bold;
}

/* 每日簽到卡片 */
@keyframes subtleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.daily-signin-card {
    margin: 0;
    background: linear-gradient(135deg, #ff758c 0%, #ff4d4f 100%, #ff758c 0%);
    background-size: 200% 200%;
    animation: subtleGradient 6s ease infinite;
    border-radius: 16px;
    padding: 25px 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 25px rgba(255, 77, 79, 0.3);
    position: relative;
    overflow: hidden;
}
.daily-signin-card::before {
    content: '🎁';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 100px;
    opacity: 0.15;
    transform: rotate(15deg);
    line-height: 1;
}
.signin-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.signin-streak {
    font-size: 13px;
    margin-bottom: 15px;
    opacity: 0.9;
}
.signin-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
    padding: 0;
}
.signin-day {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.signin-day:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 13px;
    left: calc(50% + 14px);
    right: calc(-50% + 14px);
    height: 2px;
    background: rgba(255,255,255,0.3);
    z-index: 1;
}
.day-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    transition: all 0.3s;
}
.day-circle.checked {
    background: #fff;
    color: #ff4d4f;
    border-color: #fff;
}
.day-circle.gift {
    background: #ffeb3b;
    color: #d97706;
    border-color: #fde047;
    transform: scale(1.3);
    animation: bounce-gift 2s infinite;
}
@keyframes bounce-gift {
    0%, 100% { transform: scale(1.3) translateY(0); }
    50% { transform: scale(1.3) translateY(-4px); }
}
.day-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: bold;
}
.btn-signin {
    background: #fff;
    color: var(--red);
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.btn-signin:hover {
    transform: translateY(-2px);
}
.btn-signin:disabled {
    background: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 簽到提醒開關 */
.signin-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}
.signin-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.signin-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.3);
    transition: .4s;
    border-radius: 18px;
}
.signin-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.signin-switch input:checked + .signin-slider {
    background-color: #4ade80;
}
.signin-switch input:checked + .signin-slider:before {
    transform: translateX(14px);
}

.member-content {
    flex: 1;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    padding: 30px;
    min-height: 600px;
    position: relative;
}
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.content-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.stat-box {
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid #eef2f9;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(39,98,183,0.1);
}
.stat-num {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 5px;
    font-family: inherit;
    letter-spacing: normal;
}
.stat-text {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: normal;
}
.panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.panel-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--pink);
    border-radius: 2px;
    margin-right: 10px;
}
.quick-actions-panel {
    margin-bottom: 40px;
}
.action-buttons {
    display: flex;
    gap: 15px;
}
.action-btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.action-btn.primary {
    background: var(--primary);
    color: #fff;
}
.action-btn.primary:hover {
    background: #1e4f9b;
}
.action-btn.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.action-btn.outline:hover {
    background: var(--primary-light);
}
.action-btn:not(.primary):not(.outline) {
    background: var(--bg);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.action-btn:not(.primary):not(.outline):hover {
    background: #e6e6e6;
}
.recent-activities {
    background: #fff;
}
.avatar-preview-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}
#form-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.form-container {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.form-section-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: var(--primary);
    border-radius: 2px;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group {
    flex: 1;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-main);
    font-size: 15px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    background: #fafafa;
    transition: all 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(39, 98, 183, 0.1);
}
.mb-30 { margin-bottom: 30px; }
.saved-job-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.saved-job-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.saved-job-info .job-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}
.saved-job-info .job-comp {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.saved-job-info .job-salary {
    font-size: 15px;
    color: var(--red);
    font-weight: bold;
}
.saved-job-actions {
    display: flex;
    gap: 10px;
}
.activity-list {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.activity-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-item:hover {
    background: #fafafa;
}
.act-date {
    width: 100px;
    color: var(--text-muted);
    font-size: 14px;
}
.act-job {
    flex: 2;
    font-weight: bold;
    color: var(--primary);
    font-size: 16px;
}
.act-comp {
    flex: 2;
    color: var(--text-muted);
    font-size: 15px;
}
.act-status {
    width: 100px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}
.act-status.pending {
    background: #f0f0f0;
    color: #888;
}
.act-status.viewed {
    background: #e6f7ff;
    color: #1890ff;
}
.act-status.invited {
    background: #fff0f6;
    color: var(--red);
}
.machine-panel {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px;
}
.machine-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}
.machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.machine-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.machine-card .m-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #f4f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
}
.machine-card .m-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
}
.machine-card .m-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1; 
}
.machine-header-modern {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}
.machine-subtitle {
    color: var(--text-muted);
    font-size: 15px;
}
.machine-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 10px;
}
.modern-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}
.modern-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}
.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}
.modern-card:hover::before {
    opacity: 1;
}
.m-img-wrap {
    width: 100%;
    height: 200px;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.m-img-bg-effect {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(255,255,255,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
}
.m-img-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    transition: transform 0.4s;
}
.modern-card:hover .m-img-wrap img {
    transform: scale(1.05);
}
.m-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.m-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.m-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}
.m-status-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}
.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.m-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex: 1;
}
.spec-item {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
}
.spec-icon {
    font-size: 14px;
}
.m-btn-connect {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.m-btn-connect .btn-arrow {
    transition: transform 0.3s;
}
.m-btn-connect:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}
.m-btn-connect:hover .btn-arrow {
    transform: translateX(4px);
}
.m-btn-connect:active {
    transform: scale(0.98);
}
.tabs-scroll-container {
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch; /* 讓手機版滑動更順暢 */
    scrollbar-width: none; /* Firefox 隱藏滾動條 */
    -ms-overflow-style: none; /* IE 10+ 隱藏滾動條 */
}
.tabs-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge 隱藏滾動條 */
}
.tabs {
    display: flex;
    gap: 0; /* 移除 gap 確保無縫均分 */
    padding-bottom: 5px; /* 預留一點底部空間 */
}
.tabs .tab-item {
    padding: 10px 0; /* 移除左右 padding 交給 flex 處理 */
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap; /* 確保選項文字不換行 */
    font-size: 15px; /* 稍微放大字體 */
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    flex: 1; /* 強制所有裝置都等分寬度 */
    text-align: center; /* 確保文字置中 */
}
.tabs .tab-item:hover {
    background: rgba(0,0,0,0.02);
}
.tabs .tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: bold;
    background: rgba(37, 99, 235, 0.05); /* 給被選取的標籤一個淡淡的背景色 */
}
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(241,245,249,0.3) 0%, rgba(248,250,252,0.8) 100%);
    border-radius: 16px;
}
.transaction-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    gap: 12px;
}
.transaction-card .t-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.transaction-card .t-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}
.transaction-card .t-footer {
    border-top: 1px solid var(--border);
    padding-top: 4px;
    margin-top: 4px;
}
.transaction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.transaction-card .t-title { 
    font-weight: 700; 
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.4;
}
.transaction-card .t-date { 
    font-size: 13px; 
    color: #94a3b8; 
}
.transaction-card .t-meta { 
    font-size: 14px; 
    color: #64748b; 
}
.transaction-card .t-amount {
    white-space: nowrap;
    font-size: 18px !important;
    text-align: left;
    margin-top: 4px;
}
@media (max-width: 1024px) {
    .transaction-card .t-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .member-layout {
        flex-direction: column;
        align-items: stretch; 
        padding-bottom: 80px;
        gap: 10px;
    }
    .member-right-sidebar {
        width: 100%;
        position: relative !important;
        margin-top: -80px;
        margin-bottom: 0;
    }
    .daily-signin-card {
        display: none !important; /* 手機版隱藏右側簽到區塊，改用彈出視窗 */
    }
    .promo-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
    }
    .promo-card img {
        max-width: 100%;
        height: auto;
    }
    .member-sidebar {
        width: 100%;
        margin-bottom: 20px;
        position: relative !important;
        top: auto !important;
    }
    .member-content {
        width: 100%;
        box-sizing: border-box;
    }
    .user-profile-card {
        text-align: left;
    }
    .profile-top {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
    .user-details {
        align-items: flex-start;
    }
    .user-avatar {
        margin: 0;
    }
    .resume-completeness {
        margin-top: 15px;
        margin-left: 0;
    }
    .member-nav {
        flex-direction: column;
        overflow: hidden;
        padding: 5px 0;
        gap: 5px;
    }
    .nav-group {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        border-bottom: none;
        gap: 12px;
        padding: 5px 15px;
    }
    .nav-group::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        border: 1px solid rgba(59, 130, 246, 0.15);
        border-radius: 12px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        flex: 0 0 auto;
        justify-content: center;
        white-space: nowrap;
        padding: 10px 20px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.03);
        transition: all 0.3s ease;
        font-weight: 600;
        color: #475569;
        position: relative;
    }
    .nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #cbd5e1;
        border-radius: 4px 0 0 4px;
        opacity: 0.5;
    }
    .nav-item.active {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #ffffff;
        border-color: transparent;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
        font-weight: bold;
    }
    .nav-item.active::before {
        background: #93c5fd;
        opacity: 1;
    }
    .form-container {
        padding: 20px;
    }
}
/* 廠商派工 (Dispatch) */
.dispatch-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 16px;
    color: var(--text-muted);
}
.dispatch-breadcrumb .crumb {
    cursor: pointer;
    transition: color 0.2s;
}
.dispatch-breadcrumb .crumb:hover {
    color: var(--primary);
}
.dispatch-breadcrumb .crumb.active {
    color: var(--text-main);
    font-weight: bold;
    cursor: default;
}
.dispatch-breadcrumb .crumb-separator {
    color: #cbd5e1;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.category-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-light);
}
.category-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.category-card h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
}
.category-card p {
    font-size: 14px;
    color: var(--text-muted);
}
.category-card.sub .icon {
    font-size: 32px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.task-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.task-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.task-info h4 {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
}
.task-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.task-price {
    font-size: 16px;
    font-weight: bold;
    color: #ef4444;
}

@media (max-width: 768px) {
    .nav-scroll-wrap {
        position: relative;
        width: 100%;
        display: block;
    }
    .nav-scroll-wrap::after {
        content: '右滑更多 \2192';
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        padding: 0 10px 0 35px;
        background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1) 40%);
        display: flex;
        align-items: center;
        color: var(--primary);
        font-size: 13px;
        font-weight: bold;
        pointer-events: none;
        animation: swipe-hint 1.5s infinite;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .nav-scroll-wrap.is-scrolled::after {
        opacity: 0;
        visibility: hidden;
        animation: none;
    }
    @keyframes swipe-hint {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-5px); }
    }
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .task-item button {
        width: 100%;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .act-date, .act-job, .act-comp, .act-status {
        width: 100%;
        flex: none;
    }
    .action-buttons {
        flex-direction: column;
    }
    .user-profile-card {
        text-align: left;
        padding: 20px 15px;
    }
    .profile-top {
        gap: 15px;
    }
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    .resume-completeness {
        width: 100%;
        margin-top: 15px;
    }
    .form-row { 
        flex-direction: column; 
        gap: 0; 
    }
    .saved-job-item { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
    }
    .saved-job-actions { 
        width: 100%; 
    }
    .saved-job-actions button { 
        flex: 1; 
    }
    
    /* 手機版廠商派工字卡 */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .category-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        text-align: left;
        padding: 15px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        border: 1px solid rgba(59, 130, 246, 0.1);
        background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    }
    .category-card .icon {
        grid-column: 1;
        grid-row: 1 / 3;
        font-size: 32px;
        margin-bottom: 0;
        margin-right: 15px;
    }
    .category-card h3 {
        grid-column: 2;
        grid-row: 1;
        font-size: 16px;
        margin-bottom: 4px;
        align-self: end;
    }
    .category-card p {
        grid-column: 2;
        grid-row: 2;
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 0;
        align-self: start;
    }
    .category-card.sub .icon {
        font-size: 28px;
    }
}
