/* AppWish Demo - Premium Features CSS */

/* ============================================
   NOTIFICATIONS BELL & PANEL
   ============================================ */
.notification-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
    transform: translateY(-1px);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notifications-panel {
    position: fixed;
    top: 70px;
    right: 2rem;
    width: 420px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--slate-200);
}

.notifications-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notifications-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.mark-all-read:hover {
    background: rgba(102, 126, 234, 0.1);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.notification-item:hover {
    background: var(--slate-50);
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 3px solid var(--primary);
}

.notification-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-icon-wrapper.success {
    background: rgba(34, 197, 94, 0.1);
}

.notification-icon-wrapper.info {
    background: rgba(59, 130, 246, 0.1);
}

.notification-icon-wrapper.warning {
    background: rgba(245, 158, 11, 0.1);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.notification-text {
    font-size: 0.85rem;
    color: var(--slate-600);
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--slate-400);
    font-weight: 600;
}

.notifications-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--slate-200);
    text-align: center;
}

.notifications-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   QUICK ACTIONS MENU (Cmd+K)
   ============================================ */
.quick-actions-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-actions-overlay.show {
    opacity: 1;
}

.quick-actions-container {
    background: white;
    border-radius: 16px;
    width: 600px;
    max-width: 90vw;
    max-height: 70vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-actions-overlay.show .quick-actions-container {
    transform: scale(1);
    opacity: 1;
}

.quick-actions-search {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
}

.quick-actions-search .search-icon {
    font-size: 1.25rem;
    color: var(--slate-400);
}

.quick-actions-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dark);
}

.quick-actions-search input::placeholder {
    color: var(--slate-400);
}

.quick-actions-search kbd {
    padding: 0.25rem 0.5rem;
    background: var(--slate-100);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

.quick-actions-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.quick-actions-list::-webkit-scrollbar {
    width: 6px;
}

.quick-actions-list::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

.quick-actions-section {
    margin-bottom: 0.5rem;
}

.quick-actions-section .section-label {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-item:hover {
    background: var(--slate-50);
}

.quick-action-item .action-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-100);
    border-radius: 10px;
}

.action-info {
    flex: 1;
}

.action-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.125rem;
}

.action-subtitle {
    font-size: 0.8rem;
    color: var(--slate-500);
}

.quick-action-item kbd {
    padding: 0.25rem 0.5rem;
    background: var(--slate-100);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

/* ============================================
   SETTINGS PANEL
   ============================================ */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
    border-bottom: 2px solid var(--slate-100);
    margin-bottom: 1.5rem;
}

.settings-tab {
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--slate-500);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.settings-tab:hover {
    color: var(--slate-900);
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.settings-content {
    min-height: 300px;
}

.settings-pane {
    display: none;
}

.settings-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Team Members */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-member-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--slate-50);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
}

.member-avatar-small {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    flex-shrink: 0;
}

.member-details {
    flex: 1;
}

.member-name {
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.member-email {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.member-role-badge {
    padding: 0.375rem 0.875rem;
    background: var(--slate-100);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

/* Billing */
.billing-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.billing-card {
    padding: 1.25rem;
    background: var(--slate-50);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
}

.billing-label {
    font-size: 0.85rem;
    color: var(--slate-600);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.billing-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--dark);
}

/* Integrations */
.integrations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.integration-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--slate-50);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
}

.integration-item.connected {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.03);
}

.integration-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: white;
}

.integration-icon img {
    border-radius: 6px;
}

.integration-info {
    flex: 1;
}

.integration-name {
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.integration-status {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.integration-item.connected .integration-status {
    color: var(--success);
    font-weight: 600;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ============================================
   ONBOARDING TOUR
   ============================================ */
.tour-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tour-spotlight.show {
    opacity: 1;
}

.tour-tooltip {
    position: fixed;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    max-width: 350px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.tour-tooltip-header h4 {
    font-size: 1.125rem;
    font-weight: 800;
    margin: 0;
}

.tour-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: var(--slate-100);
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.tour-close:hover {
    background: var(--slate-200);
}

.tour-tooltip p {
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-200);
}

.tour-progress {
    font-size: 0.85rem;
    color: var(--slate-500);
    font-weight: 600;
}

.tour-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   DARK MODE
   ============================================ */
.dark-mode {
    --dark: #f1f5f9;
    --light-bg: #1e293b;
    --text-dark: #e2e8f0;
    --text-light: #1e293b;
    --border-color: #334155;
    --gray-600: #cbd5e1;
    --gray-500: #94a3b8;
    --white: #0f172a;
    --slate-50: #1e293b;
    --slate-100: #334155;
    --slate-200: #475569;
    --slate-300: #64748b;
    --slate-400: #94a3b8;
    --slate-500: #cbd5e1;
    --slate-600: #e2e8f0;
}

.dark-mode .sidebar {
    background: linear-gradient(180deg, #0c1220 0%, #1e293b 100%);
}

.dark-mode .modal-container,
.dark-mode .notifications-panel,
.dark-mode .quick-actions-container,
.dark-mode .tour-tooltip {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .code-editor {
    border-color: #334155;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .notifications-panel {
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .quick-actions-container {
        width: 100%;
        max-height: 80vh;
    }

    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .settings-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}