/* Profile page styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.error-message {
    color: rgba(255, 255, 255, 0.8);
    padding: 20px;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: rgba(30, 30, 40, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    box-sizing: border-box;
}

.sidebar-header {
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8a2be2;
    font-weight: 700;
    font-size: 20px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    color: #ffffff;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
    background: rgba(26, 115, 232, 0.2);
    color: #60a5fa;
    border-left: 3px solid #60a5fa;
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8 0%, #8a2be2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.sign-out-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.sign-out-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.profile-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-content-header h1 {
    margin-bottom: 0;
}

.profile-header-sign-out {
    width: auto;
    min-width: 140px;
}

.profile-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.resume-upload-zone {
    background: rgba(40, 40, 50, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 48px 32px;
    max-width: 560px;
    text-align: center;
}

.resume-upload-icon {
    color: #1a73e8;
    margin-bottom: 20px;
}

.resume-upload-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.resume-upload-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-upload-resume {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a73e8 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload-resume:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.btn-upload-resume:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.resume-upload-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 16px;
}

.upload-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 560px;
    font-size: 14px;
}

.upload-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.upload-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.upload-status-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 560px;
    margin-bottom: 16px;
}

.upload-status-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(26, 115, 232, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-icon {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: profile-spin 0.8s linear infinite;
}

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

.upload-status-info {
    flex: 1;
    min-width: 0;
}

.upload-status-filename {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 4px;
}

.upload-status-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.upload-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8 0%, #60a5fa 100%);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.upload-requirements-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 16px;
    max-width: 560px;
}

.upload-requirements-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.upload-success-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(22, 101, 52, 0.25);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 560px;
    margin-bottom: 12px;
}

.upload-success-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(34, 197, 94, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86efac;
}

.upload-success-info {
    flex: 1;
}

.upload-success-title {
    font-weight: 700;
    font-size: 16px;
    color: #86efac;
    margin-bottom: 4px;
}

.upload-success-filename {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.upload-success-size {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.analyzing-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(30, 40, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 560px;
}

.analyzing-spinner {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: profile-spin 0.8s linear infinite;
}

.analyzing-info {
    flex: 1;
}

.analyzing-title {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 4px;
}

.analyzing-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.btn-upload-another {
    margin-top: 16px;
    padding: 10px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload-another:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Existing resume card */
.existing-resume-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 560px;
    margin-bottom: 16px;
}

.existing-resume-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86efac;
    overflow: hidden;
}

.existing-resume-icon svg,
.existing-target-job-icon svg,
.existing-tracker-icon svg {
    display: block;
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    flex-shrink: 0;
}

.existing-resume-info {
    flex: 1;
}

.existing-resume-title {
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #86efac;
    margin: 0 0 8px 0;
}

.existing-resume-filename {
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.existing-resume-created,
.existing-resume-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.existing-resume-meta {
    margin-top: 4px;
}

/* Referral tracker summary card (dashboard) */
.existing-tracker-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 560px;
    margin-bottom: 16px;
}

.existing-tracker-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    overflow: hidden;
}

.existing-tracker-info {
    flex: 1;
    min-width: 0;
}

.existing-tracker-title {
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c4b5fd;
    margin: 0 0 8px 0;
}

.dashboard-profile-card-header .existing-tracker-title {
    margin-bottom: 0;
}

.existing-tracker-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.existing-tracker-status-configured {
    color: #86efac;
}

.existing-tracker-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.existing-resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-remove-resume {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-resume:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-remove-resume:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Resume analyzed success card (smaller than Your resume) */
.resume-analyzed-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(20, 25, 35, 0.9);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 8px;
    padding: 10px 16px;
    max-width: 560px;
    margin-bottom: 16px;
}

.resume-analyzed-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: rgba(96, 165, 250, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
}

.resume-analyzed-info {
    flex: 1;
}

.resume-analyzed-title {
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 4px 0;
}

.resume-analyzed-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* Profile sections */
.profile-section {
    margin-bottom: 48px;
}

.profile-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.job-description-section {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 800px;
    scroll-margin-top: 24px;
}

.target-job-loading {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Dashboard profile summary cards (reuse profile card styles) */
.dashboard-profile-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 600px;
    margin-bottom: 24px;
}

.dashboard-profile-card-loading {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

.dashboard-profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-profile-card-header .existing-target-job-label,
.dashboard-profile-card-header .existing-resume-title {
    margin-bottom: 0;
}

.dashboard-profile-card-edit {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-profile-card-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.dashboard-profile-card-edit svg {
    width: 16px;
    height: 16px;
}

.dashboard-profile-card-placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.dashboard-profile-card-warning {
    border-color: rgba(245, 158, 11, 0.35);
}

.dashboard-profile-card-warning-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 700;
}

.dashboard-profile-card-status-warning {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #fbbf24;
}

.existing-target-job-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(40, 40, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.existing-target-job-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    overflow: hidden;
}

.existing-target-job-info {
    flex: 1;
    min-width: 0;
}

.existing-target-job-label {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #93c5fd;
    margin: 0 0 8px 0;
}

.existing-target-job-heading {
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    margin: 0 0 4px 0;
    word-break: break-word;
}

.existing-target-job-saved,
.existing-target-job-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.existing-target-job-meta {
    margin-top: 4px;
}

.job-description-subtitle {
    margin-bottom: 24px;
    max-width: none;
}

.job-description-card {
    width: 100%;
    background: rgba(40, 40, 50, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px 20px 24px;
    box-sizing: border-box;
}

.target-job-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .target-job-fields-row {
        grid-template-columns: 1fr;
    }
}

.target-job-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.target-job-field-description {
    margin-bottom: 0;
}

.target-job-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.02em;
}

.target-job-required {
    color: #f87171;
    font-weight: 700;
}

.target-job-optional {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.target-job-field-link {
    margin-bottom: 20px;
}

.target-job-field-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #fca5a5;
}

.dashboard-container .target-job-input.target-job-input-invalid,
.dashboard-container .job-description-textarea.target-job-input-invalid {
    border-color: rgba(248, 113, 113, 0.75);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.dashboard-container .target-job-input.target-job-input-invalid:focus,
.dashboard-container .job-description-textarea.target-job-input-invalid:focus {
    border-color: rgba(248, 113, 113, 0.9);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
}

/* Form controls: override browser defaults inside profile dashboard */
.dashboard-container .target-job-input,
.dashboard-container .job-description-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px 16px;
    background-color: rgba(18, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.dashboard-container .job-description-textarea {
    min-height: 320px;
    line-height: 1.6;
    padding: 16px 18px;
    resize: vertical;
}

.dashboard-container .target-job-input::placeholder,
.dashboard-container .job-description-textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
    font-style: normal;
}

.dashboard-container .target-job-input:hover,
.dashboard-container .job-description-textarea:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.dashboard-container .target-job-input:focus,
.dashboard-container .job-description-textarea:focus {
    outline: none;
    background-color: rgba(22, 24, 36, 0.98);
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.job-description-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px 24px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    line-height: 1.4;
}

.job-description-char-count {
    color: rgba(255, 255, 255, 0.55);
}

.job-description-char-count strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.job-description-char-under {
    color: #fbbf24;
}

.job-description-char-under strong {
    color: #fcd34d;
}

.job-description-char-ok {
    color: #86efac;
}

.job-description-char-ok strong {
    color: #bbf7d0;
}

.job-description-char-over {
    color: #fca5a5;
}

.job-description-char-over strong {
    color: #fecaca;
}

.job-description-min-hint {
    color: rgba(255, 255, 255, 0.42);
    white-space: nowrap;
}

.job-description-actions {
    margin-top: 24px;
}

.dashboard-container button.btn-save-job-description {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #1a73e8 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.dashboard-container button.btn-save-job-description:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.45);
}

.dashboard-container button.btn-save-job-description:active:not(:disabled) {
    transform: translateY(0);
}

.dashboard-container button.btn-save-job-description:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.job-description-save-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: profile-spin 0.8s linear infinite;
}

.job-description-ui-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.job-description-ui-info {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.job-description-ui-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.job-description-ui-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

/* Referral Tracker */
.referral-tracker-section {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 800px;
    scroll-margin-top: 24px;
}

.referral-tracker-subtitle {
    margin-bottom: 24px;
    max-width: none;
}

.dashboard-container button.btn-connect-google-sheets {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(52, 168, 83, 0.55);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.dashboard-container button.btn-connect-google-sheets:hover:not(:disabled) {
    background: rgba(52, 168, 83, 0.12);
    border-color: rgba(52, 168, 83, 0.85);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(52, 168, 83, 0.15);
}

.dashboard-container button.btn-connect-google-sheets:active:not(:disabled) {
    background: rgba(52, 168, 83, 0.18);
}

.dashboard-container button.btn-connect-google-sheets:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-sheets-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.dashboard-container button.btn-disconnect-google-sheets {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.dashboard-container button.btn-disconnect-google-sheets:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

.dashboard-container button.btn-disconnect-google-sheets:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-sheets-icon {
    flex-shrink: 0;
}

.referral-tracker-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
    max-width: 420px;
}

.referral-tracker-scope {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.referral-tracker-loading {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    margin-bottom: 16px;
}

.google-sheets-connected-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(22, 101, 52, 0.2);
    border: 1px solid rgba(52, 168, 83, 0.35);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    max-width: 560px;
}

.google-sheets-connected-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(52, 168, 83, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-sheets-connected-info {
    flex: 1;
    min-width: 0;
}

.google-sheets-connected-label {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #86efac;
    margin: 0 0 8px 0;
}

.google-sheets-connected-title {
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    margin: 0 0 8px 0;
    word-break: break-word;
}

.google-sheets-open-link {
    font-size: 14px;
    color: #86efac;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.google-sheets-open-link:hover {
    color: #bbf7d0;
}

.referral-tracker-ui-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    max-width: 560px;
}

.referral-tracker-ui-info {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.referral-tracker-ui-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.referral-tracker-ui-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.sheets-success-page,
.sheets-popup-result {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    background: #0a0a0a;
    color: rgba(255, 255, 255, 0.85);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
}

.sheets-popup-result-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sheets-popup-result-message {
    margin: 0;
    max-width: 360px;
    font-size: 14px;
    line-height: 1.45;
    color: #fca5a5;
}

.sheets-popup-result-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.sheets-popup-result-success .sheets-popup-result-title {
    color: #86efac;
}


@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }

    .logo-text,
    .nav-item span,
    .user-details,
    .sidebar-footer .sign-out-btn span {
        display: none;
    }

    .main-content {
        padding: 24px;
    }

    .profile-content-header {
        align-items: flex-start;
    }

    .profile-header-sign-out {
        min-width: auto;
        padding: 10px 12px;
    }

    .profile-header-sign-out span {
        display: none;
    }
}
