/* ===== Brand Room CSS v1.0.0 ===== */

/* Brand Modal Overlay */
.brand-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: brandFadeIn 0.2s ease;
}

@keyframes brandFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Brand Modal */
.brand-modal {
    background: var(--surface, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: brandSlideUp 0.3s ease;
}

.brand-modal-sm {
    max-width: 400px;
}

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

.brand-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #334155);
}

.brand-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-modal-header h3 i {
    color: var(--primary-color, #6366f1);
}

.brand-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.brand-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary, #f1f5f9);
}

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

.brand-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color, #334155);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.brand-modal-info {
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Brand Form */
.brand-form-group {
    margin-bottom: 14px;
}

.brand-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 6px;
}

.brand-form-group label .required {
    color: #ef4444;
}

.brand-form-group input[type="text"],
.brand-form-group input[type="password"],
.brand-form-group input[type="email"],
.brand-form-group input[type="tel"],
.brand-form-group input[type="url"],
.brand-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--background, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
    color: var(--text-primary, #f1f5f9);
    font-size: 14px;
    transition: border-color 0.2s;
}

.brand-form-group input:focus,
.brand-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
}

.brand-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.brand-form-group small {
    color: var(--text-secondary, #94a3b8);
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.brand-form-group input[type="file"] {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
}

.brand-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .brand-form-row {
        grid-template-columns: 1fr;
    }
}

/* Brand Agree Box */
.brand-agree-box {
    padding: 10px 12px;
    background: var(--background, #0f172a);
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
}

.brand-agree-box label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary, #f1f5f9);
}

.brand-agree-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #6366f1);
}

/* Agree link (clickable terms/privacy) */
.brand-agree-link {
    color: #60a5fa;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}
.brand-agree-link:hover {
    color: #93c5fd;
}

/* Brand Avatar Picker */
.brand-avatar-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar-option {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--border-color, #334155);
    background: var(--background, #0f172a);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0;
    line-height: 1;
    padding: 2px;
    overflow: hidden;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-option i {
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
}

.avatar-option:hover {
    border-color: var(--primary-color, #6366f1);
    color: var(--primary-color, #6366f1);
}

.avatar-option.selected {
    border-color: var(--primary-color, #6366f1);
    background: rgba(99,102,241,0.15);
    color: var(--primary-color, #6366f1);
}

/* Brand Subscription Info */
.brand-subscription-info {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 16px;
}

.brand-subscription-info h4 {
    font-size: 14px;
    color: var(--primary-color, #6366f1);
    margin-bottom: 6px;
}

.brand-subscription-info p {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

.brand-price {
    font-size: 18px !important;
    color: var(--text-primary, #f1f5f9) !important;
    margin: 6px 0;
}

.brand-price strong {
    color: var(--primary-color, #6366f1);
    font-size: 22px;
}

/* Brand Buttons */
.brand-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.brand-btn-primary {
    background: var(--primary-color, #6366f1);
    color: white;
}

.brand-btn-primary:hover {
    background: var(--primary-hover, #4f46e5);
}

.brand-btn-secondary {
    background: var(--surface-light, #334155);
    color: var(--text-primary, #f1f5f9);
}

.brand-btn-secondary:hover {
    background: #475569;
}

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

.brand-btn-danger:hover {
    background: #dc2626;
}

/* Brand Login Message */
.brand-login-msg {
    color: #ef4444;
    font-size: 12px;
    min-height: 18px;
    margin-top: 8px;
}

/* Brand Login Footer - 아이디/비번찾기 + 취소/로그인 */
.brand-login-footer {
    flex-wrap: wrap;
    gap: 0;
}

.brand-login-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* 아이디/비번 찾기 버튼 (로그인 모달 하단) */
.brand-btn-find {
    background: var(--surface-dark, #1e293b);
    color: var(--text-secondary, #94a3b8);
    border: 1px solid var(--border-color, #334155);
    font-size: 12px;
    padding: 8px 12px;
}

.brand-btn-find:hover {
    background: var(--surface-light, #334155);
    color: var(--text-primary, #f1f5f9);
    border-color: var(--primary-color, #6366f1);
}

/* Recovery Tabs (아이디찾기 / 비번찾기 탭) */
.brand-recovery-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color, #334155);
    margin-bottom: 16px;
}

.brand-recovery-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.brand-recovery-tab:hover {
    color: var(--text-primary, #f1f5f9);
}

.brand-recovery-tab.active {
    color: var(--primary-color, #6366f1);
    border-bottom-color: var(--primary-color, #6366f1);
}

.brand-recovery-panel {
    min-height: 120px;
}

/* Input Row (input + button side by side) */
.brand-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.brand-input-row input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #334155);
    background: var(--surface-dark, #1e293b);
    color: var(--text-primary, #f1f5f9);
    font-size: 13px;
}

.brand-input-row input:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
}

.brand-btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Timer */
.brand-timer {
    color: #f97316;
    font-size: 12px;
    font-weight: 600;
}

/* Recovery Result */
.brand-recovery-result {
    text-align: center;
    padding: 20px 0;
}

.brand-recovery-icon {
    font-size: 48px;
    color: var(--primary-color, #6366f1);
    margin-bottom: 12px;
}

.brand-recovery-icon.success {
    color: #22c55e;
}

.brand-recovery-label {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 8px;
}

.brand-recovery-value {
    font-size: 22px;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 1px;
    background: var(--surface-dark, #1e293b);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #334155);
    display: inline-block;
    margin-bottom: 8px;
}

.brand-recovery-sub {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    margin-top: 4px;
}

/* Brand Room Badge (next to title) */
.brand-room-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    transition: all 0.2s;
    white-space: nowrap;
}

.brand-room-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.brand-room-badge i {
    font-size: 10px;
}

/* Brand Verified Title - no extra lines */
.brand-verified-title {
    /* styling handled by badge only */
}

/* Brand Message Highlight */
.brand-message {
    border-left: 3px solid var(--primary-color, #6366f1) !important;
    background: rgba(99,102,241,0.05) !important;
}

.brand-message .message-author {
    color: var(--primary-color, #6366f1) !important;
    font-weight: 700 !important;
}

.brand-avatar-icon {
    margin-right: 4px;
    font-size: 14px;
    color: var(--primary-color, #6366f1);
}

/* Brand Notice Message */
.brand-notice-message {
    background: rgba(245,158,11,0.08) !important;
    border-left: 3px solid #f59e0b !important;
    position: relative;
}

/* Brand Notice Block (displayed after room notice in displayMessages) */
.brand-notice-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #000;
    border-radius: 8px;
    position: relative;
    z-index: 5;
}

.brand-notice-block + .brand-notice-block {
    margin-top: 2px;
}

.brand-notice-block-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.brand-notice-block-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
}

.brand-notice-inline-delete {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.brand-notice-inline-delete:hover {
    background: rgba(239,68,68,0.8);
}

/* Pinned Notice Bar at top of messages (legacy - keep for compatibility) */
.brand-pinned-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f59e0b;
    border-radius: 8px;
    margin: 6px 8px;
    position: relative;
    z-index: 5;
}

.brand-pinned-notice-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.brand-pinned-notice-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
}

.brand-notice-delete {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.3);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.brand-notice-delete:hover {
    background: rgba(255,255,255,0.5);
}

/* Message Delete Button (hover) */
.msg-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(239,68,68,0.2);
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: auto;
}

.message-item:hover .msg-delete-btn,
.message:hover .msg-delete-btn {
    opacity: 1;
}

.msg-delete-btn:hover {
    background: #ef4444;
    color: white;
}

/* Delete button disabled (subscription expired) */
.msg-delete-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}
.msg-delete-disabled:hover {
    background: rgba(239,68,68,0.2) !important;
    color: #ef4444 !important;
}

/* Brand User Input - no extra lines */
.brand-user-input {}
.brand-input-section {}

/* Brand Notice Button (legacy - now uses input-icon-btn) */
.brand-notice-btn {
    display: none;
}

/* Brand Info Card */
.brand-info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background, #0f172a);
    border-radius: 12px;
    margin-bottom: 16px;
}

.brand-info-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99,102,241,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #6366f1);
    flex-shrink: 0;
}

.brand-info-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 4px;
}

.brand-info-details p {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
}

.brand-info-status {
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-info-status.active {
    color: var(--success, #10b981) !important;
}

.brand-info-status.inactive {
    color: var(--text-secondary, #94a3b8) !important;
}

.brand-info-section {
    margin-top: 12px;
    padding: 12px;
    background: var(--background, #0f172a);
    border-radius: 8px;
}

.brand-info-section h5 {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 6px;
}

/* Brand Manage Actions */
.brand-manage-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.brand-manage-actions .brand-btn {
    justify-content: center;
}

/* Inline Chatroom Ad */
.chatroom-inline-ad {
    margin: 1px;
    padding: 10px 14px;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 10px;
    position: relative;
    list-style: none;
    transition: background 0.2s ease;
}

.chatroom-inline-ad:hover {
    background: rgba(99,102,241,0.14);
}

.inline-ad-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.inline-ad-badge {
    background: var(--primary-color, #6366f1);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.inline-ad-name {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
}

.inline-ad-content {
    font-size: 13px;
    color: var(--text-primary, #f1f5f9);
    line-height: 1.5;
    white-space: pre-line;
}

.inline-ad-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color, #6366f1);
    font-size: 12px;
    text-decoration: none;
    margin-top: 6px;
}

.inline-ad-link:hover {
    text-decoration: underline;
}

/* Ad Cost Banner */
.ad-cost-banner {
    background: rgba(249,115,22,0.08);
    border: 1px solid rgba(249,115,22,0.25);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.ad-cost-banner p {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
}

.ad-cost-amount {
    font-size: 16px !important;
    color: var(--text-primary, #f1f5f9) !important;
    margin: 4px 0;
}

.ad-cost-amount strong {
    color: #f97316;
    font-size: 20px;
}

.ad-cost-note {
    font-size: 11px !important;
    color: var(--text-secondary, #64748b) !important;
}

/* ===== Ad Duration Selector ===== */
.ad-duration-section {
    background: rgba(30,41,59,0.6);
    border: 1px solid rgba(71,85,105,0.4);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ad-duration-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 14px;
}

.ad-duration-header i {
    color: #f97316;
    margin-right: 6px;
}

/* Slider + value in one row */
.ad-duration-slider-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.ad-duration-slider-wrap {
    flex: 1;
    min-width: 0;
}

.ad-duration-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #334155 0%, #334155 100%);
    outline: none;
    cursor: pointer;
}

.ad-duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ad-duration-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 12px rgba(34,197,94,0.6);
}

.ad-duration-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
    cursor: pointer;
}

.ad-duration-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
    padding: 0 2px;
}

.ad-duration-value {
    display: inline-block;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
    font-size: 16px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 8px;
    min-width: 52px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ad Cost Summary */
.ad-cost-summary {
    background: rgba(15,23,42,0.5);
    border-radius: 8px;
    padding: 12px;
}

.ad-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    padding: 4px 0;
}

.ad-cost-row i {
    margin-right: 4px;
}

.ad-cost-calc {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

.ad-cost-divider {
    height: 1px;
    background: rgba(71,85,105,0.3);
    margin: 6px 0;
}

.ad-cost-total {
    font-size: 15px;
    color: var(--text-primary, #f1f5f9);
    padding-top: 6px;
}

.ad-cost-total strong {
    color: #f97316;
    font-size: 18px;
}

.ad-cost-summary .ad-cost-note {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(71,85,105,0.2);
}

/* ===== Ad History Section ===== */
.ad-history-section {
    margin: 10px 0 14px;
}

.ad-history-btn {
    font-size: 13px !important;
    padding: 8px 12px !important;
}

.ad-history-btn i {
    margin-right: 4px;
}

.ad-history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(71,85,105,0.5) transparent;
}

.ad-history-list::-webkit-scrollbar {
    width: 5px;
}

.ad-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.ad-history-list::-webkit-scrollbar-thumb {
    background: rgba(71,85,105,0.5);
    border-radius: 3px;
}

.ad-history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(71,85,105,0.8);
}

.ad-history-item {
    background: rgba(30,41,59,0.6);
    border: 1px solid rgba(71,85,105,0.3);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.ad-history-item:hover {
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.05);
}

.ad-history-item.selected {
    border-color: #22c55e;
    background: rgba(34,197,94,0.1);
}

.ad-history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ad-history-status {
    font-size: 12px;
    font-weight: 500;
}

.ad-history-date {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
}

.ad-history-keyword {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 2px;
}

.ad-history-content {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-history-empty {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    text-align: center;
    padding: 12px;
}

/* Ad Paid Summary (shown after payment, replaces slider) */
.ad-paid-summary {
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(71,85,105,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.ad-paid-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    padding: 3px 0;
}

.ad-paid-summary-row strong {
    color: var(--text-primary, #f1f5f9);
    font-size: 14px;
}

.ad-paid-summary-row:last-child strong {
    color: #f97316;
}

/* Ad Paid Badge */
.ad-paid-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.ad-paid-badge i {
    font-size: 16px;
}

/* Ad Form 2-column Row */
.ad-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .ad-form-row {
        grid-template-columns: 1fr;
    }
}

/* Ad Test/Approval Note */
.ad-test-note, .ad-approval-note {
    font-size: 11px;
    color: var(--text-secondary, #64748b);
    margin-top: 8px;
    text-align: center;
}

.ad-approval-note {
    color: #f97316;
    font-weight: 500;
    margin-top: 10px;
}

/* Full Width Button */
.brand-btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
}

/* Ad Message Display in Chat */
.message-ad-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 2px 0;
}

.ad-message-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 18px;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    background: #f97316;
    border-radius: 3px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ad-message-body {
    flex: 1;
    min-width: 0;
}

.ad-message-name {
    font-size: 12px;
    font-weight: 600;
    color: #f97316;
    margin-bottom: 2px;
}

.ad-message-text {
    font-size: 13px;
    color: var(--text-primary, #f1f5f9);
    line-height: 1.5;
    word-break: break-word;
}

.ad-message-link {
    font-size: 12px;
    color: #5bade9;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ad Remaining Days Segment Bar */
.ad-remain-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 5px;
    align-self: stretch;
    flex-shrink: 0;
    margin-left: 6px;
    padding: 2px 0;
    position: relative;
}

.ad-seg {
    width: 100%;
    flex: 1;
    border-radius: 0;
    background: #1e293b;
    min-height: 0;
}

.ad-seg.filled {
    opacity: 1;
}

.ad-remain-fill {
    display: none;
}

.ad-remain-label {
    display: none;
}

/* Subscription bar badges (admin) */
.sub-bar {
    display: inline-block;
    width: 60px;
    height: 8px;
    border-radius: 4px;
}

.sub-active {
    background: #10b981;
}

.sub-inactive {
    background: #475569;
}

/* Scrollbar for brand modal */
.brand-modal::-webkit-scrollbar {
    width: 6px;
}
.brand-modal::-webkit-scrollbar-track {
    background: transparent;
}
.brand-modal::-webkit-scrollbar-thumb {
    background: var(--border-color, #334155);
    border-radius: 3px;
}

/* Brand Benefits List */
.brand-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.brand-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--background, #0f172a);
    border-radius: 10px;
    border: 1px solid var(--border-color, #334155);
}

.brand-benefit-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(99,102,241,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.brand-benefit-text strong {
    display: block;
    font-size: 13px;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 3px;
}

.brand-benefit-text p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

/* ===== Brand Avatar for Messages ===== */
.brand-msg-avatar {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7) !important;
    border: 2px solid rgba(139,92,246,0.6) !important;
    box-shadow: 0 0 8px rgba(139,92,246,0.3);
    overflow: hidden;
}
.brand-msg-avatar i {
    color: #fff !important;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.4));
}
.brand-msg-avatar .brand-avatar-img,
.brand-msg-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.brand-avatar-img {
    border-radius: 50%;
    object-fit: cover;
}
.brand-avatar-icon {
    display: none !important;
}

/* ===== Brand Nickname Glow Effect ===== */
@keyframes brandNickGlow {
    0%, 100% {
        text-shadow: 0 0 4px rgba(251,191,36,0.8), 0 0 8px rgba(251,146,60,0.5), 0 0 16px rgba(234,179,8,0.3);
    }
    50% {
        text-shadow: 0 0 6px rgba(251,191,36,1), 0 0 14px rgba(251,146,60,0.8), 0 0 24px rgba(234,179,8,0.5), 0 0 36px rgba(251,191,36,0.2);
    }
}

@keyframes brandNickBorderPulse {
    0%, 100% {
        border-color: rgba(251,191,36,0.5);
        box-shadow: 0 0 4px rgba(251,191,36,0.2), inset 0 0 4px rgba(251,191,36,0.05);
    }
    50% {
        border-color: rgba(251,191,36,0.9);
        box-shadow: 0 0 8px rgba(251,191,36,0.4), inset 0 0 6px rgba(251,191,36,0.1);
    }
}

@keyframes brandNickSparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.brand-nick-glow {
    color: #fbbf24 !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    animation: brandNickGlow 2s ease-in-out infinite;
    position: relative;
    -webkit-text-stroke: 0.3px #f59e0b;
    letter-spacing: 0.3px;
    padding: 1px 6px !important;
    display: inline-block;
}

.brand-nick-glow::before {
    content: '✦';
    position: absolute;
    left: -8px;
    top: -4px;
    font-size: 8px;
    color: #fbbf24;
    animation: brandNickSparkle 2.2s ease-in-out infinite;
    pointer-events: none;
}

.brand-nick-glow::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: -2px;
    bottom: -2px;
    border-radius: 6px;
    border: 2px solid rgba(251,191,36,0.5);
    background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,146,60,0.15), rgba(251,191,36,0.1));
    animation: brandNickBorderPulse 2s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

/* ===== Notice Toggle Disabled ===== */
.brand-notice-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}
.brand-notice-disabled:hover {
    background: transparent !important;
    transform: none !important;
}

/* ===== Subscription Expired Notice ===== */
.brand-sub-expired-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 8px;
    margin-bottom: 14px;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.brand-sub-expired-notice i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Warning button style */
.brand-btn-warning {
    background: #f59e0b;
    color: #000;
}
.brand-btn-warning:hover {
    background: #d97706;
}
