/* ===== BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --purple: #7c3aed;
    --purple-pale: #f3f0ff;
    --purple-dark: #5b21b6;
    --purple-deep: #2a2cb8;
    --purple-mid: #4f46e5;
    --purple-light: #ad91fb;
    --purple-ghost: #f0eeff;
    --white: #ffffff;
    --bg: #f8f7fc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text: #1e1b2e;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #e9e4f8;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(124, 58, 237, .08);
    --shadow-md: 0 8px 32px rgba(124, 58, 237, .14);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .15);
    --sidebar-w: 300px;
    --transition: 0.2s ease;
}

body {
    background: var(--bg);
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== NOT LOGGED IN ===== */
.not-logged-in {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #f3f0ff 0%, #faf9ff 60%, #ede9fe 100%);
}

.nlg-card {
    background: var(--white);
    border-radius: 24px;
    padding: 56px 48px;
    text-align: center;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.nlg-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--purple-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.nlg-icon .material-icons-round {
    font-size: 38px;
    color: var(--purple);
}

.nlg-card h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.nlg-card p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.nlg-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--purple-mid);
    color: #fff;
}

.btn-primary:hover {
    background: var(--purple-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, .35);
}

.btn-outline {
    background: transparent;
    color: var(--purple-mid);
    border-color: var(--purple-mid);
}

.btn-outline:hover {
    background: var(--purple-pale);
    transform: translateY(-1px);
}

.btn-message {
    display: none;
}

/* ===== MAIN LAYOUT ===== */
.profile-layout {
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
}

.home-corner-link {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--purple-mid);
    border-radius: 50%;
    border: 1px solid var(--border);
    box-shadow: 0 12px 22px rgba(124, 58, 237, .14);
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.home-corner-link:hover {
    transform: translateY(-1px);
    background: #f8f5ff;
    box-shadow: 0 16px 28px rgba(124, 58, 237, .18);
}

.home-corner-link .material-icons-round {
    font-size: 20px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 16px rgba(124, 58, 237, .06);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.sidebar-inner {
    padding: 32px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Profile Photo */
.profile-photo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.profile-photo,
.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-mid), var(--purple-light));
    color: #fff;
    font-size: 2.4rem;
    font-weight: 700;
    font-family: 'DM Serif Display', serif;
}

.photo-edit-btn {
    position: absolute;
    bottom: 4px;
    right: calc(50% - 66px);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--purple-mid);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .3);
    transition: all var(--transition);
}

.photo-edit-btn:hover {
    background: var(--purple-deep);
    transform: scale(1.1);
}

.photo-edit-btn .material-icons-round {
    font-size: 15px;
}

.status-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 66px);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* Name block */
.profile-name-block {
    text-align: center;
    margin-bottom: 14px;
}

.kol-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.kol-id {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.engagement-tag {
    display: inline-block;
    background: linear-gradient(90deg, var(--purple-mid), var(--purple-light));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 50px;
}

/* Niche tags */
.niche-tags,
.tag {
    display: inline-block;
    text-align: center;
    background: var(--purple-pale);
    color: var(--purple-deep);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.tag-platform {
    background: #f0f0fd;
    color: var(--purple-mid);
    border: 1.5px solid #bcb8ff;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Info list */
.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.info-list li .material-icons-round {
    font-size: 16px;
    color: #9a88f4;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Section label */
.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Platform list — one row per platform with inline followers */
.platform-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.platform-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.platform-followers {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #7160d2;
    white-space: nowrap;
}

.platform-followers .material-icons-round {
    font-size: 14px;
    color: #9a88f4;
}

/* Rates */
.rates-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rate-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.rate-item .material-icons-round {
    font-size: 16px;
    color: var(--purple-light);
}

.rate-item strong {
    margin-left: auto;
    color: var(--text);
    font-weight: 600;
}

/* Sidebar buttons */
.btn-edit-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    border-radius: 50px;
    background: var(--purple-mid);
    color: #fff;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all var(--transition);
}

.btn-edit-full:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, .3);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    border-radius: 50px;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.btn-logout:hover {
    border-color: #fca5a5;
    color: #dc2626;
    background: #fff5f5;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 36px 40px;
}

.main-header {
    margin-bottom: 28px;
}

.main-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 6px;
}

.main-title em {
    font-style: italic;
    font-family: 'DM Serif Display', serif;
    color: var(--purple-mid);
}

.main-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.guest-message {
    text-align: center;
    color: var(--text-muted, #6b7280);
    font-size: 0.95rem;
    margin: 0 0 16px;
    padding: 0 8px;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guest-actions .btn-primary,
.guest-actions .btn-outline {
    width: 100%;
    justify-content: center;
}

/* Filter */
.filter-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.filter-icon {
    color: var(--purple-mid);
    font-size: 22px;
    margin-top: 6px;
    flex-shrink: 0;
}

.niche-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--purple-light);
    color: var(--purple-mid);
}

.filter-btn.active {
    background: var(--purple-mid);
    color: #fff;
    border-color: var(--purple-mid);
}

/* ===== CAMPAIGN GRID ===== */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.campaign-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.campaign-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--purple-light);
}

.campaign-card.featured {
    border-color: var(--purple-light);
    box-shadow: 0 4px 20px rgba(124, 58, 237, .15);
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(90deg, #f97316, #ef4444);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

.brand-logo-wrap {
    padding: 20px 20px 0;
}

.brand-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(50deg, var(--purple-mid), var(--purple-light));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.campaign-info {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.campaign-brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.campaign-niche-tag {
    display: inline-block;
    background: var(--purple-pale);
    color: var(--purple-deep);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.campaign-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 14px;
    flex: 1;
}

.campaign-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.meta-item .material-icons-round {
    font-size: 15px;
    color: #9a88f4;
}

.campaign-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.budget-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    border: solid 2px #aeccba;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}

.budget-chip .material-icons-round {
    font-size: 15px;
    color: #16a34a;
}

.btn-apply {
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--purple-mid);
    color: #fff;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-apply.applied {
    background-color: #e9e0ff !important;
    color: #7051b9 !important;
    cursor: pointer;
}

.btn-apply.applied:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #fca5a5;
}

.btn-apply.shortlisted {
    background-color: #fffcdd !important;
    color: #854d0e !important;
    border: 1.5px solid #ebd152;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-apply:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(120, 96, 255, 0.35);
}

.no-campaigns-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #92400e;
}

.no-campaigns-note .material-icons-round {
    font-size: 18px;
    color: #f59e0b;
    flex-shrink: 0;
}

.no-campaigns-note code {
    background: rgba(0, 0, 0, .06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

.modal-box.modal-sm {
    max-width: 460px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    flex-wrap: nowrap;
    min-width: 0;
}

.modal-header h2 .material-icons-round {
    color: var(--purple-mid);
    font-size: 22px;
    flex-shrink: 0;
}


.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.modal-close:hover {
    background: #fee2e2;
}

.modal-close .material-icons-round {
    font-size: 18px;
    color: var(--text-muted);
}

.modal-close .material-icons-round:hover {
    color: #e05050;
}

/* Photo upload area */
.photo-upload-area {
    padding: 24px 28px 0;
    text-align: center;
}

.photo-upload-label {
    display: inline-block;
    cursor: pointer;
}

.photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--purple-light);
    box-shadow: 0 4px 16px rgba(124, 58, 237, .2);
    transition: all var(--transition);
    display: block;
    margin: 0 auto;
}

.photo-preview:hover {
    transform: scale(1.04);
}

.photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--purple-pale);
    border: 3px dashed var(--purple-mid);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all var(--transition);
    margin: 0 auto;
    color: var(--purple-mid);
    font-size: 0.72rem;
    font-weight: 600;
}

.photo-placeholder:hover {
    background: #ede9fe;
}

.photo-placeholder .material-icons-round {
    font-size: 28px;
}

.photo-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 20px 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group.span-2 {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--purple-mid);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px 20px;
    border-top: 1px solid var(--border);
}

.modal-input {
    margin: 25px;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    margin-top: -2px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);

    /* NEW: Scroll limit and higher stacking order */
    z-index: 999;
    max-height: 200px;
    overflow-y: auto;
}

/* ===== CUSTOM SELECT FUNCTIONALITY & STYLING ===== */
.custom-select-options.open {
    opacity: 1;
    visibility: visible;
}

.custom-select {
    position: relative;
}

.custom-select-selected {
    position: relative;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    font-size: 0.95rem;
    transition: var(--transition);
}

.custom-select-selected::after {
    content: "▼";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select-selected.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    color: var(--text);
}

.custom-option:hover,
.custom-option.chosen {
    background: var(--purple-pale);
    color: var(--purple-deep);
    font-weight: 500;
}

/* ===== CHECKBOX GRID LAYOUT ===== */
.checkbox-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 6px;
    width: 100%;
}

.checkbox-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.checkbox-tile:hover {
    border-color: var(--purple-light);
    background: #fdfcff;
}

.checkbox-tile:has(input:checked) {
    border-color: var(--purple-mid);
    background: var(--purple-pale);
}

.checkbox-tile span {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.checkbox-tile input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple-mid);
    cursor: pointer;
}

.btn-cancel {
    padding: 10px 22px;
    border-radius: 50px;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-cancel:hover {
    border-color: #d1d5db;
    color: var(--text);
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--purple-mid);
    color: #fff;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-save:hover:not(:disabled) {
    background: var(--purple-deep);
    transform: translateY(-1px);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-save .material-icons-round {
    font-size: 17px;
}

/* ==== CROP TOOL ==== */
.crop-modal-box {
    max-width: 700px;
}

.crop-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-view-box {
    outline: 2px solid #fff;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2000;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #065f46;
}

.toast.error {
    background: #991b1b;
}

/* ===== UTILS ===== */
.muted-text {
    color: var(--text-light);
    font-size: 0.8rem;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE ===== */
/* ===== MOBILE PANEL TOGGLE BUTTON ===== */
.panel-toggle-btn {
    display: none; /* Doesn't display on desktop, only display on mobile */
}

@media (max-width: 900px) {
    html,
    body {
        overflow: hidden;
        height: 100%;
    }

    .profile-layout {
        flex-direction: row;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    /* SIDEBAR*/
    .sidebar {
        width: 100vw;
        height: 100vh;
        position: absolute;
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: none;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        transform: translateX(0);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2;
    }

    .sidebar.panel-hidden {
        transform: translateX(-100vw);
    }

    .sidebar-inner {
        padding: 24px 20px 100px;
    }

    /* MAIN CONTENT*/
    .main-content {
        width: 100vw;
        height: 100vh;
        position: absolute;
        top: 0;
        left: 0;
        padding: 24px 16px 100px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100vw);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1;
    }

    .main-content.panel-visible {
        transform: translateX(0);
        z-index: 2;
    }

    /* FLOATING TOGGLE BUTTON */
    .panel-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 28px;
        right: 24px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--purple-mid); 
        /*
        background: linear-gradient(50deg, var(--purple-mid), #8c78ff);
        */
        color: #fff;
        border: none;
        box-shadow: 0 6px 24px rgba(88, 58, 237, 0.4);
        cursor: pointer;
        z-index: 999;
        transition: all 0.2s ease;
    }

    .panel-toggle-btn:hover {
        background: var(--purple-deep);
        transform: scale(1.08);
    }

    .panel-toggle-btn:active {
        transform: scale(0.95);
    }

    .panel-toggle-btn .material-icons-round {
        font-size: 26px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.span-2 {
        grid-column: 1;
    }
}

@media (max-width: 560px) {
    .main-title {
        font-size: 1.4rem;
    }

    .campaigns-grid {
        grid-template-columns: 1fr;
    }

    .nlg-card {
        padding: 36px 24px;
    }
}

/* ─── Card share button ─── */
.campaign-card {
    cursor: pointer;
}

.card-share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    z-index: 2;
}

.card-share-btn:hover {
    background: var(--purple-ghost, #f5f3ff);
}

.card-share-btn .material-icons-round {
    font-size: 16px;
    color: var(--purple);
}

/* ─── Campaign detail modal ─── */
.campaign-detail-box {
    max-width: 520px;
    width: 100%;
}

.campaign-detail-body {
    padding: 0 24px 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--purple-mid, #7c3aed);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-budget {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--purple-mid, #7c3aed);
    margin-top: 2px;
}

.detail-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted, #9ca3af);
}

.detail-desc {
    font-size: 0.88rem;
    color: var(--text-body, #515c6b);
    line-height: 1.7;
    margin-top: -10px;
    border: #ced3db solid 1px;
    border-radius: 10px;
    padding: 8px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.detail-meta-item .material-icons-round {
    font-size: 18px;
    color: var(--purple-mid, #7c3aed);
}

.detail-meta-item>div {
    display: flex;
    flex-direction: column;
}

.dmeta-label {
    font-size: 0.7rem;
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
}

.dmeta-val {
    font-size: 0.82rem;
    color: var(--text-dark, #111827);
    font-weight: 600;
}

.campaign-detail-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.btn-detail-share {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dark, #111827);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.btn-detail-share:hover {
    background: var(--purple-ghost, #f5f3ff);
    border-color: var(--purple-light, #c4b5fd);
}

.btn-detail-share .material-icons-round {
    font-size: 17px;
}

.campaign-detail-footer .btn-apply {
    flex: 1;
}

/* Applied + cancellable state */
.btn-apply.cancellable {
    background: var(--purple-ghost, #f5f3ff);
    color: var(--purple-mid, #7c3aed);
    border: 1.5px solid var(--purple-light, #c4b5fd);
    font-size: 0.78rem;
}

.btn-apply.cancellable:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Platform followers edit rows */
.flw-label {
    display: block;
    margin-left: 28px;
    margin-right: 28px;
    margin-bottom: 8px;
}

.platform-followers-edit {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 28px;
    margin-right: 28px;
    margin-bottom: 4px;
}

.platform-follower-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-follower-label {
    min-width: 110px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5321b6;
}

.platform-follower-select {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #e9e4f8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    color: #374151;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.platform-follower-select:focus {
    border-color: #733aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

/* Phone edit wrap */
.phone-edit-wrap {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e9e4f8;
    border-radius: 10px;
    overflow: visible;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phone-edit-wrap:focus-within {
    border-color: #6a3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

.code-cs {
    flex-shrink: 0;
    width: auto !important;
    position: relative;
}

.code-cs-selected {
    border: none !important;
    border-right: 1.5px solid #e9e4f8 !important;
    border-radius: 9px 0 0 9px !important;
    box-shadow: none !important;
    padding: 10px 34px 10px 10px !important;
    background: #f9f7ff !important;
    color: #4121b6 !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
    min-width: 110px;
    overflow: hidden;
    text-overflow: clip;
}

.code-cs-selected.active {
    border-right-color: #6a3aed !important;
    box-shadow: none !important;
}

.code-cs .custom-select-options {
    min-width: 150px;
    right: auto;
    z-index: 200;
}

.phone-edit-input {
    border: none !important;
    border-radius: 0 9px 9px 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 0;
    padding-left: 12px;
    background: transparent;
}

.phone-edit-input:focus {
    outline: none;
    box-shadow: none !important;
}

/* Platform followers */
.platform-followers-edit {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.platform-follower-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.platform-follower-label {
    min-width: 110px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4621b6;
}

.follower-cs {
    flex: 1;
    min-width: 140px;
}

/* Platform link handle input */
.platform-link-input {
    flex: 1.2;
    min-width: 140px;
    padding: 9px 12px;
    border: 1.5px solid #e9e4f8;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: #374151;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.platform-link-input::placeholder {
    color: #b5b5c3;
}

.platform-link-input:focus {
    border-color: #6d3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}

/* Platform handle input inside follower row */
.platform-follower-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.platform-handle-input {
    flex: 1 1 160px;
    min-width: 120px;
    font-size: 0.85rem;
}

/* Job tag on campaign card */
.campaign-job-tag {
    display: inline-block;
    background: #f0ebff;
    color: #6a3fc5;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 2px 10px;
    margin: 4px 0 6px;
    letter-spacing: 0.03em;
}

/* Responsive */
@media (max-width: 480px) {
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .campaign-detail-footer {
        flex-direction: column;
    }

    .campaign-detail-footer .btn-apply,
    .btn-detail-share {
        width: 100%;
        justify-content: center;
    }

    .btn-message {
        display: block;
        margin-top: 30px;
    }
}