* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

body.nav-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-helper {
    margin-top: 10px;
    color: #6b7280;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.feedback-link {
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.25);
    background: rgba(102, 126, 234, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hamburger-btn:hover,
.hamburger-btn:focus-visible {
    background: rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
}

.hamburger-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #2d3748;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 90;
}

.nav-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: 320px;
    max-width: 85%;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 100;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-drawer__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-drawer__title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.nav-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.12);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-drawer__close:hover,
.nav-drawer__close:focus-visible {
    background: rgba(102, 126, 234, 0.2);
    transform: rotate(90deg);
}

.nav-drawer__close:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.nav-drawer__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    margin: 0;
}

.nav-drawer__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-drawer__list a:hover,
.nav-drawer__list a:focus-visible {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(4px);
}

.nav-drawer__list a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(102, 126, 234, 0.12);
    color: #2d3748;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.18);
}

.nav-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.25);
}

.nav-btn-icon {
    font-size: 20px;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 14px 24px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    min-height: 52px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
}

.breadcrumb li + li::before {
    content: "›";
    font-size: 16px;
    color: #a0aec0;
    margin-right: 2px;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    color: #2d3748;
}

.breadcrumb .current {
    font-weight: 700;
    color: #2d3748;
}

h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-profile:hover {
    background: rgba(102, 126, 234, 0.12);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
}

.user-profile:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar-initials {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-transform: capitalize;
}

.user-title {
    font-size: 12px;
    color: #718096;
}

.logout-btn {
    padding: 8px 16px;
    background: #718096;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #4a5568;
}

.location-bar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.location-selector {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.location-selector .btn {
    white-space: nowrap;
    font-weight: 600;
}

.location-dropdown {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.location-dropdown:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b3fa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.no-location {
    background: white;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.no-location h2 {
    color: #4a5568;
    margin-bottom: 20px;
}

.no-location p {
    color: #718096;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.content-section {
    display: none;
}

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

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .form-two-column {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

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

.field-helper {
    margin: 4px 0 0;
    color: #7b8191;
    font-size: 13px;
    line-height: 1.4;
}

.field-helper.small {
    font-size: 12px;
}

.inline-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
    user-select: none;
}

.checkbox-control input {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.field-option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.field-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.18);
}

.field-option-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    font-size: 14px;
    background: white;
}

.field-option-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.14);
}

.remove-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(226, 232, 240, 0.8);
    color: #4a5568;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-option-btn:hover {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
    transform: translateY(-1px);
}

.remove-option-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2000;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.cf-modal {
    width: min(840px, 100%);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 35px 70px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
}

.cf-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.cf-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #1f2937;
}

.cf-modal-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.cf-modal-close {
    border: none;
    background: rgba(226, 232, 240, 0.75);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s ease;
}

.cf-modal-close:hover {
    background: rgba(248, 113, 113, 0.18);
    color: #b91c1c;
}

.cf-modal-body {
    padding: 24px 28px 32px;
    overflow-y: auto;
}

.field-type-group {
    margin-bottom: 24px;
}

.field-type-group h3 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.field-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.field-type-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #fff;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.field-type-btn small {
    font-weight: 500;
    font-size: 12px;
    color: #6b7280;
}

.field-type-btn:hover,
.field-type-btn.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.08));
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.field-details .back-link {
    margin-bottom: 12px;
    padding: 0;
}

.link-btn {
    background: none;
    border: none;
    color: #6366f1;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.link-btn:hover {
    text-decoration: underline;
}

.selected-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4c51bf;
    font-weight: 600;
    margin-bottom: 18px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

.form-actions .btn {
    min-width: 140px;
}

@media (max-width: 640px) {
    .cf-modal {
        width: 100%;
        max-height: 100vh;
    }

    .cf-modal-body {
        padding: 20px;
    }

    .field-type-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

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

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: #718096;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #333;
}

.close-modal {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.profile-modal-content {
    max-width: 520px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid #667eea;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 32px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-upload-input {
    position: relative;
    overflow: hidden;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-upload-input:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
}

.avatar-upload-input input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.avatar-remove-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

.avatar-remove-btn:disabled {
    color: #cbd5f5;
    cursor: not-allowed;
    text-decoration: none;
}

.avatar-hint {
    font-size: 12px;
    color: #718096;
    text-align: center;
    max-width: 260px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.profile-referral-card {
    margin-top: 28px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8f5ff 0%, #eef2ff 100%);
    box-shadow: 0 18px 36px rgba(102, 126, 234, 0.18);
    border: 1px solid rgba(102, 126, 234, 0.14);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-referral-card[data-state="loading"] {
    opacity: 0.7;
}

.profile-referral-card[data-state="error"] {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-color: rgba(229, 62, 62, 0.35);
    box-shadow: 0 18px 36px rgba(229, 62, 62, 0.18);
}

.profile-referral-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(102, 126, 234, 0.22);
}

.referral-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.referral-header h3 {
    font-size: 18px;
    color: #373b8a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-header h3::before {
    content: "✨";
    font-size: 20px;
}

.referral-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(246, 224, 94, 0.24), rgba(255, 255, 255, 0.6));
    color: #b7791f;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    letter-spacing: 0.5px;
    box-shadow: inset 0 0 0 1px rgba(214, 158, 46, 0.35);
    text-transform: uppercase;
}

.referral-level-badge.locked {
    background: linear-gradient(135deg, rgba(203, 213, 224, 0.3), rgba(255, 255, 255, 0.6));
    color: #4a5568;
    box-shadow: inset 0 0 0 1px rgba(160, 174, 192, 0.45);
}

.referral-status-badge {
    font-size: 12px;
    font-weight: 600;
    color: #4c51bf;
    background: rgba(76, 81, 191, 0.12);
    border-radius: 999px;
    padding: 6px 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.profile-referral-card[data-state="error"] .referral-status-badge {
    color: #c53030;
    background: rgba(197, 48, 48, 0.12);
}

.referral-description {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.5;
}

.referral-link-box {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.referral-link-value {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    word-break: break-all;
}

.referral-link-value[data-placeholder] {
    color: #718096;
    font-style: italic;
}

.referral-copy-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.referral-copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.referral-copy-btn.copied {
    background: #48bb78;
    color: #fff;
    box-shadow: 0 10px 20px rgba(72, 187, 120, 0.26);
}

.referral-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 14px;
}

.referral-count {
    background: rgba(102, 126, 234, 0.08);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.referral-count:hover {
    background: rgba(102, 126, 234, 0.14);
    transform: translateY(-1px);
}

.referral-count strong {
    display: block;
    font-size: 22px;
    color: #373b8a;
    font-weight: 700;
    margin-bottom: 4px;
}

.referral-count span {
    font-size: 12px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.referral-milestones {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.referral-milestones li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.referral-milestones-empty {
    text-align: center;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed rgba(102, 126, 234, 0.4);
    color: #4a5568;
    font-size: 13px;
    font-style: italic;
}

.referral-milestones li .milestone-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
}

.referral-milestones li .milestone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.18);
    color: #4c51bf;
    font-size: 18px;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.22);
}

.referral-milestones li .milestone-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.referral-milestones li .milestone-text strong {
    font-size: 14px;
    font-weight: 700;
}

.referral-milestones li .milestone-text span {
    font-size: 12px;
    color: #4a5568;
    font-weight: 500;
}

.referral-milestones li.unlocked {
    border-color: rgba(72, 187, 120, 0.4);
    box-shadow: 0 12px 24px rgba(72, 187, 120, 0.18);
    background: linear-gradient(135deg, rgba(129, 230, 217, 0.18), rgba(79, 209, 197, 0.1));
}

.referral-milestones li.unlocked .milestone-icon {
    background: rgba(72, 187, 120, 0.22);
    color: #2f855a;
    box-shadow: inset 0 0 0 1px rgba(47, 133, 90, 0.25);
}

.referral-milestones li.unlocked .milestone-plan {
    color: #22543d;
}

.referral-milestones li.upcoming {
    opacity: 0.88;
}

.referral-milestones .milestone-plan {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

.referral-milestones .milestone-progress {
    font-size: 12px;
    color: #4c51bf;
    font-weight: 600;
}

.referral-next {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
}

.profile-referral-card[data-state="ready"] .referral-next strong {
    color: #4c51bf;
}

.profile-referral-card[data-state="error"] .referral-next {
    color: #c53030;
}

.referral-share-hint {
    font-size: 12px;
    color: #4a5568;
    opacity: 0.85;
}

.referral-share-hint::before {
    content: "💌";
    margin-right: 6px;
}

.referral-error-message {
    font-size: 13px;
    color: #c53030;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
}

.location-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-inactive {
    background: #fed7d7;
    color: #c53030;
}

.location-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.05);
}

.location-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.location-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-card-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.location-card-info {
    flex: 1 1 240px;
    min-width: 240px;
}

.location-card-stats {
    flex: 2 1 320px;
}

.location-connection-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.location-card-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: #4a5568;
    font-size: 13px;
}

.location-card-meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-card-meta .meta-label {
    display: block;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #a0aec0;
}

.location-card-meta .meta-value {
    display: block;
    font-weight: 600;
    color: #2d3748;
}

.location-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 18px;
    padding: 18px 0;
}

.location-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.location-card-actions .btn {
    min-width: 140px;
}

.progress-container {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.progress-status {
    text-align: center;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.warning-message {
    background: #fffbeb;
    color: #92400e;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-top: 10px;
    font-size: 14px;
    display: none;
}

.warning-message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.success-result {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #c6f6d5 0%, #bee3f8 100%);
    border-radius: 12px;
    border: 2px solid #48bb78;
}

.success-result.show {
    display: block;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.result-key-value {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.result-label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.result-value {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.error-details {
    margin-top: 10px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #9b2c2c;
}

.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    pointer-events: none;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    border-color: #667eea;
    outline: none;
}

.view-toggle {
    display: flex;
    gap: 5px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    background: white;
    border: none;
    cursor: pointer;
    color: #718096;
    transition: all 0.3s;
}

.view-btn:hover {
    background: #f7fafc;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.results-info {
    padding: 10px 15px;
    background: #f7fafc;
    border-radius: 8px;
    color: #4a5568;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-count {
    font-weight: 600;
    color: #667eea;
}

.bulk-actions {
    display: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease-out;
}

.bulk-actions.show {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-info {
    color: white;
    font-weight: 500;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
}

.bulk-btn {
    padding: 8px 16px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.bulk-btn:hover {
    background: white;
    color: #667eea;
}

.category-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.category-tag {
    padding: 4px 10px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 20px;
    font-size: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.category-tag:hover {
    border-color: #667eea;
    background: #e9d8fd;
}

.category-tag.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.icon-btn {
    padding: 10px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.no-results {
    text-align: center;
    padding: 60px;
    color: #718096;
    background: #f7fafc;
    border-radius: 12px;
    margin-top: 20px;
}

.no-results h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.field-type-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.clear-filters {
    padding: 8px 12px;
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.clear-filters:hover {
    background: #fc8181;
    color: white;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table th.checkbox-col {
    width: 40px;
    padding: 12px 16px;
}

.data-table th.name-col {
    width: 25%;
    min-width: 200px;
}

.data-table th.value-col,
.data-table th.type-col {
    width: 40%;
    min-width: 250px;
}

.data-table th.actions-col {
    width: 140px;
    text-align: right;
}

.data-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr.selected {
    background: #eff6ff;
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

.data-table td.checkbox-col {
    width: 40px;
    padding: 14px 16px;
}

.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.name-cell {
    font-weight: 500;
    color: #111827;
    word-break: break-word;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.value-cell {
    color: #6b7280;
    word-break: break-word;
    line-height: 1.5;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    max-width: 500px;
}

.type-cell {
    color: #6b7280;
    font-size: 13px;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.actions-cell .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* Subscription Bar Styles */
.subscription-bar {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subscription-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.plan-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.plan-badge.free { background: #e2e8f0; color: #4a5568; }
.plan-badge.starter { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.plan-badge.growth { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); color: white; }
.plan-badge.scale { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); color: white; }
.plan-badge.enterprise { background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%); color: white; }

.location-usage {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.pricing-modal-content { max-width: 1200px !important; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.pricing-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pricing-popular {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-header { text-align: center; margin-bottom: 25px; }
.pricing-header h3 { font-size: 24px; color: #2d3748; margin-bottom: 10px; }
.pricing-price { font-size: 36px; font-weight: 700; color: #667eea; }
.pricing-price span { font-size: 16px; color: #718096; font-weight: 400; }
.pricing-features { margin-bottom: 25px; }
.pricing-feature { padding: 10px 0; color: #4a5568; font-size: 14px; border-bottom: 1px solid #f7fafc; }

.fieldkey-col {
    width: 30%;
    min-width: 200px;
}

.fieldkey-cell {
    position: relative;
}

.field-key-code {
    display: inline-block;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #667eea;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-key-code:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.copy-hint {
    display: none;
    position: absolute;
    top: -25px;
    left: 0;
    background: #2d3748;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
}

.fieldkey-cell:hover .copy-hint {
    display: block;
}

/* Comparison Styles */

/* Add to styles.css */
.comparison-table th,
.comparison-table td {
    font-size: 12px;
    padding: 8px;
}

.comparison-table code {
    font-size: 10px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.comparison-modal-content {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 95vh;
    overflow: auto;
}

.comparison-setup {
    margin-bottom: 30px;
}

.location-selector-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.location-selector-group .form-group {
    flex: 1;
}

.comparison-vs {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.comparison-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.comparison-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    transition: all 0.2s;
}

.comparison-tab.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.comparison-stats {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

.stat-label {
    font-size: 13px;
    color: #718096;
    margin-top: 5px;
}

.comparison-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.comp-view-tab {
    padding: 8px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.comp-view-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.comparison-table tr.only-in-a {
    background: #f0fdf4 !important;
    border-left: 4px solid #48bb78 !important;
}

.comparison-table tr.only-in-b {
    background: #eff6ff !important;
    border-left: 4px solid #4299e1 !important;
}

.comparison-table tr.variance-item {
    background: #fffbeb !important;
    border-left: 4px solid #ed8936 !important;
}

.comparison-table tr.match-item {
    background: white !important;
    border-left: 4px solid #e2e8f0 !important;
}

.empty-cell {
    color: #cbd5e0;
    text-align: center;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.only-a {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.only-b {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.variance {
    background: #fed7aa;
    color: #9a3412;
}

.status-badge.match {
    background: #e5e7eb;
    color: #4b5563;
}

.comparison-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.diff {
    color: #ed8936;
    font-weight: 600;
}

/* Gallery View Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.gallery-image-container {
    width: 100%;
    height: 200px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-info {
    padding: 15px;
}

.gallery-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.gallery-fieldkey {
    display: block;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 10px;
    color: #667eea;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    word-break: break-all;
}

.gallery-fieldkey:hover {
    background: #667eea;
    color: white;
}

.media-card.selected {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

.gallery-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Tab-specific backgrounds */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: background 0.5s ease;
}

body.tab-values {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

body.tab-fields {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.tab-triggerLinks {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

body.tab-tags {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

body.tab-settings {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}
.audit-summary {
    margin-bottom: 30px;
}

.audit-charts {
    border-top: 2px solid #e2e8f0;
    padding-top: 30px;
}

.audit-unused-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

.manage-locations-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
    margin-top: -6px;
}

.location-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.location-card-actions .btn {
    min-width: 140px;
}

body.tab-media {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body.tab-social {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
}

/* Onboarding wizard */
.wizard-container {
    max-width: 820px;
    margin: 60px auto;
    background: #ffffff;
    padding: 32px 38px 42px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
}

.wizard-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.wizard-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    object-fit: contain;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: none;
}

.wizard-header-text h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}

.wizard-header-text p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 15px;
}

.wizard-progress {
    display: flex;
    gap: 10px;
    margin: 18px 0 26px;
}

.progress-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.18);
    transition: transform 0.2s ease;
}

.progress-dot.active {
    transform: scale(1.2);
    background: #4f46e5;
}

.progress-dot.completed {
    background: rgba(16, 185, 129, 0.85);
}

.wizard-page-heading {
    margin-bottom: 24px;
}

.wizard-page-heading h2 {
    margin: 8px 0;
    font-size: 26px;
}

.wizard-page-heading p {
    margin: 0;
    color: #6b7280;
}

.wizard-page-index {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    font-weight: 600;
}

.wizard-block {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.wizard-block-static {
    background: linear-gradient(120deg, rgba(99,102,241,0.08), rgba(156,163,175,0.08));
}

.wizard-block-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
}

.wizard-content-block {
    color: #1f2937;
}

.wizard-text-heading1 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.wizard-text-heading2 {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0;
}

.wizard-text-heading3 {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;
}

.wizard-text-subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: #4b5563;
    font-weight: 500;
    margin: 0;
}

.wizard-text-paragraph {
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

.wizard-text-list {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.7;
}

.wizard-text-list li {
    margin-bottom: 6px;
}

.wizard-text-list--numbered {
    list-style: decimal;
}

.wizard-text-list:not(.wizard-text-list--numbered) {
    list-style: disc;
}

.wizard-text-quote {
    margin: 0;
    padding: 14px 20px;
    border-left: 4px solid rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.08);
    font-style: italic;
    line-height: 1.7;
}

.wizard-voice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
}

.wizard-voice-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #1f2937;
}

.wizard-block-label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.wizard-block-required {
    margin-left: 6px;
    color: #ef4444;
}

.wizard-block-helper {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.wizard-input,
.wizard-upload-wrapper input[type="file"],
.wizard-block textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 11px 12px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wizard-input:focus,
.wizard-block textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.wizard-block textarea {
    resize: vertical;
    min-height: 96px;
}

.wizard-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wizard-upload-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wizard-upload-list a {
    color: #4f46e5;
    font-size: 14px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}

.wizard-status {
    margin-top: 18px;
    font-size: 14px;
    color: #10b981;
}

.wizard-status.error {
    color: #ef4444;
}

.wizard-social-platforms {
    list-style: none;
    margin: 12px 0 18px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wizard-social-platforms li {
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #312e81;
}

.wizard-button.disabled {
    background: rgba(148, 163, 184, 0.3);
    color: #475569;
    cursor: not-allowed;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 10px 16px;
    border-radius: 10px;
    margin-top: 4px;
}

.wizard-social-accounts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 0;
}

.wizard-social-account {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wizard-social-account-name {
    font-weight: 600;
    color: #1e293b;
}

.wizard-social-account-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #475569;
}

.social-card {
    padding: 24px;
}

.social-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.social-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-header h2 {
    margin: 0;
    font-size: 22px;
    color: #1e293b;
}

.social-header p {
    color: #64748b;
    margin: 6px 0 0;
    max-width: 520px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.social-platform-card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    padding: 18px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.social-platform-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.social-platform-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.social-platform-head span {
    font-size: 28px;
}

.social-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #0f172a;
    font-weight: 500;
}

.social-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-account-item {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.social-account-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #475569;
    font-size: 13px;
}

.social-account-name {
    font-weight: 600;
    color: #1e293b;
}

.social-empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    color: #64748b;
    font-size: 14px;
}

.social-actions .btn {
    min-width: 160px;
}

.social-platform-footer {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .wizard-container {
        padding: 24px;
        margin: 30px 16px;
    }
    .wizard-actions {
        flex-direction: column;
    }
    .wizard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.connect-crm-modal {
    max-width: 760px;
}

.connect-modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.connect-option {
    flex: 1 1 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.connect-option.primary {
    border-color: #667eea;
    box-shadow: 0 16px 32px rgba(102, 126, 234, 0.18);
}

.connect-option h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1a202c;
}

.connect-option p {
    margin: 0 0 18px 0;
    color: #4a5568;
    line-height: 1.5;
}

.connect-option small {
    display: block;
    margin-top: 16px;
    color: #718096;
    font-size: 13px;
}

.option-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.connect-option .btn {
    align-self: flex-start;
}

@media (max-width: 640px) {
    .connect-modal-body {
        flex-direction: column;
    }
}
