/* =============================================================================
 * Precifyca Admin - Custom Styles
 * Acessivel apenas via contexto xampoo (porta 7001 ou subdominio xampoo)
 * ============================================================================= */

[x-cloak] { display: none !important; }

/* =============================================================================
 * Variaveis
 * ============================================================================= */
:root {
    /* Layout */
    --sidebar-width: 250px;
    --sidebar-bg: #212529;

    /* Colors - Brand */
    --primary-color: #6366f1;
    --primary-dark: #5558e3;
    --primary-light: #8b5cf6;
    --accent-teal: #14b8a6;
    --accent-orange: #fd7e14;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Text */
    --text-muted: #6c757d;
    --text-dark: #212529;
}

/* =============================================================================
 * Layout Base
 * ============================================================================= */
body {
    min-height: 100vh;
}

/* =============================================================================
 * Sidebar
 * ============================================================================= */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

/* Scrollbar customizada para a sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.sidebar .nav-link i {
    width: 1.5rem;
}

/* =============================================================================
 * Sidebar - Menu Groups (Submenus)
 * ============================================================================= */
.nav-group-toggle {
    color: rgba(255,255,255,0.7) !important;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none !important;
    background: transparent !important;
    width: calc(100% - 1rem);
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
    outline: none !important;
    box-shadow: none !important;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus {
    color: #fff !important;
    background: rgba(255,255,255,0.1) !important;
}

.nav-group-toggle.active {
    color: #fff !important;
}

.nav-group-toggle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-group-toggle span i {
    width: 1.5rem;
    text-align: center;
}

.nav-group-toggle .chevron {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
    opacity: 0.7;
}

.nav-group.open .nav-group-toggle .chevron {
    transform: rotate(90deg);
}

.nav-group-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.nav-group.open .nav-group-items {
    max-height: 300px;
}

.nav-group-items .nav-link {
    padding-left: 2.75rem;
    font-size: 0.875rem;
}

.nav-group-items .nav-link i {
    width: 1.25rem;
    font-size: 0.8rem;
}

/* Separador visual entre grupos */
.nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.75rem 1rem;
}

/* =============================================================================
 * Main Content
 * ============================================================================= */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.main-content .content-wrapper {
    flex: 1;
}

.top-bar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.5rem;
    min-height: 60px;
}

.top-bar .page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.top-bar .page-actions .btn {
    white-space: nowrap;
}

.content-wrapper {
    padding: 1.5rem;
}

/* =============================================================================
 * Stat Cards
 * ============================================================================= */
.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--bs-secondary);
    height: 100%;
    position: relative;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
}

.stat-card .stat-subtitle {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Icon - posicionado no canto inferior direito */
.stat-card__icon {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 1.75rem;
    opacity: 0.3;
}

/* Quando há content wrapper */
.stat-card__content {
    position: relative;
    z-index: 1;
}

/* Color variants */
.stat-card--primary { border-left-color: var(--primary-color); }
.stat-card--success { border-left-color: var(--bs-success); }
.stat-card--warning { border-left-color: var(--bs-warning); }
.stat-card--danger  { border-left-color: var(--bs-danger); }
.stat-card--info    { border-left-color: var(--bs-info); }
.stat-card--secondary { border-left-color: var(--bs-secondary); }
.stat-card--dark    { border-left-color: var(--primary-color); }

/* Custom accent colors (--purple é igual a --primary, usar para semântica diferente) */
.stat-card--purple { border-left-color: var(--primary-color); }
.stat-card--teal   { border-left-color: var(--accent-teal); }
.stat-card--orange { border-left-color: var(--accent-orange); }

/* Text color utilities */
.text-purple { color: var(--primary-color) !important; }
.text-teal   { color: var(--accent-teal) !important; }
.text-orange { color: var(--accent-orange) !important; }

/* Trend indicators */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.stat-trend--up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-trend--down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-trend--stable {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Highlighted stat card (gradient background) */
.stat-card--highlight {
    background: var(--gradient-primary);
    color: white;
    border-left: none;
}

.stat-card--highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-card--highlight .stat-value {
    color: white;
}

.stat-card--highlight .stat-card__icon {
    color: rgba(255, 255, 255, 0.5);
}

.stat-card--highlight .stat-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* =============================================================================
 * Login Page
 * ============================================================================= */
.login-page {
    background: var(--gradient-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-body {
    padding: 2rem;
}

/* =============================================================================
 * Buttons (override Bootstrap)
 * ============================================================================= */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* =============================================================================
 * Cards
 * ============================================================================= */
.card {
    border: none;
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* =============================================================================
 * User Management
 * ============================================================================= */
.user-admin-page {
    color: #0f172a;
}

.user-admin-identity {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.user-admin-overview-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.user-admin-overview-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.user-admin-avatar {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background: var(--gradient-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 18px 35px rgba(99, 102, 241, 0.22);
    flex-shrink: 0;
}

.user-admin-avatar--image {
    padding: 0;
    overflow: hidden;
    background: #e2e8f0;
}

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

.user-admin-heading {
    min-width: 0;
}

.user-admin-title {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

.user-admin-subtitle {
    color: #64748b;
    font-size: 0.94rem;
}

.user-admin-badge {
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
}

.user-admin-page .card-header {
    font-size: 0.94rem;
}

.user-admin-actions {
    display: grid;
    gap: 0.75rem;
}

.user-admin-side-actions {
    width: 220px;
    display: grid;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-admin-side-actions .btn {
    width: 100%;
}

.user-admin-flag {
    border: none;
    box-shadow: var(--shadow-sm);
}

.user-admin-stat .stat-value {
    font-size: 1.3rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.user-admin-stat .stat-label {
    font-size: 0.78rem;
}

.user-admin-stat .stat-subtitle {
    font-size: 0.78rem;
}

.user-admin-stat .stat-card__icon {
    font-size: 1.45rem;
}

.user-admin-tabs-shell {
    overflow: hidden;
}

.user-admin-tabs {
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.user-admin-tabs::-webkit-scrollbar {
    height: 6px;
}

.user-admin-tabs::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.22);
    border-radius: 999px;
}

.user-admin-tabs .nav-link {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.94rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.user-admin-tabs .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.user-admin-tabs .nav-link.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.18);
}

.user-admin-tab-content {
    min-height: 360px;
}

.user-admin-tab-pane {
    animation: user-admin-tab-fade 0.22s ease;
}

@keyframes user-admin-tab-fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-detail-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.1rem 1.15rem;
}

.user-detail-panel__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.user-detail-panel__header i {
    color: var(--primary-color);
}

.user-detail-panel__header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.user-detail-list {
    display: grid;
    gap: 0.85rem;
}

.user-detail-item {
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
}

.user-detail-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.user-detail-item dt {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.user-detail-item dd {
    margin: 0;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
}

.user-contact-timeline {
    position: relative;
    display: grid;
    gap: 1rem;
}

.user-contact-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 0.85rem;
    align-items: start;
}

.user-contact-item__marker {
    width: 12px;
    height: 12px;
    margin-top: 0.55rem;
    border-radius: 999px;
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.user-contact-item__card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.1rem;
}

.user-contact-item__card h3 {
    font-size: 0.94rem;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.user-contact-item__card p {
    color: #475569;
    line-height: 1.6;
}

.user-empty-state {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.user-empty-state i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.user-empty-state h3 {
    font-size: 0.94rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.user-empty-state p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.user-sidebar-stack {
    position: sticky;
    top: 1.5rem;
}

.user-email-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
}

.user-danger-zone {
    display: grid;
    gap: 1rem;
}

.user-danger-zone h3 {
    font-size: 0.94rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #991b1b;
}

.user-danger-zone p {
    margin: 0;
    color: #7f1d1d;
    line-height: 1.55;
}

/* =============================================================================
 * Responsive
 * ============================================================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }

    .user-admin-identity {
        flex-direction: column;
        gap: 1rem;
    }

    .user-admin-overview-shell {
        flex-direction: column;
    }

    .user-admin-avatar {
        width: 68px;
        height: 68px;
        border-radius: 20px;
        font-size: 1.5rem;
    }

    .user-admin-title {
        font-size: 1.45rem;
    }

    .user-admin-side-actions {
        width: 100%;
    }

    .user-admin-side-actions .btn {
        width: 100%;
    }

    .user-admin-tabs {
        gap: 0.5rem;
    }

    .user-admin-tabs .nav-link {
        padding: 0.75rem 0.95rem;
        font-size: 0.92rem;
    }

    .user-sidebar-stack {
        position: static;
    }

    .user-contact-item {
        grid-template-columns: 1fr;
    }

    .user-contact-item__marker {
        display: none;
    }

    .user-empty-state {
        align-items: flex-start;
    }
}

/* =============================================================================
 * Ticket Notifications
 * ============================================================================= */

/* Badge de notificação no header */
.notification-badge {
    font-size: 0.6rem;
    padding: 0.25em 0.5em;
    min-width: 1.2em;
}

/* Badge no menu lateral */
.nav-group-items .nav-link {
    display: flex;
    align-items: center;
}

.nav-group-items .nav-link .badge {
    font-size: 0.65rem;
    padding: 0.2em 0.5em;
    margin-left: auto;
}

/* Dropdown de notificações */
.notification-dropdown {
    border: none;
    border-radius: var(--radius-md);
}

.notification-dropdown .dropdown-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.notification-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

/* Notificação não lida */
.notification-unread {
    background-color: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary, #6366f1);
}

.notification-unread:hover {
    background-color: rgba(99, 102, 241, 0.12);
}

/* Animação do sino quando há notificações */
@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    70% { transform: rotate(0); }
}

.btn-link:has(.notification-badge:not([style*="display: none"])) .fa-comments,
.btn-link:has(.notification-badge:not([style*="display: none"])) .fa-bell {
    animation: bell-shake 1s ease-in-out;
    animation-delay: 0.5s;
}

/* =============================================================================
 * Page Headers
 * ============================================================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.page-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* =============================================================================
 * Tables - Padrão Admin
 * ============================================================================= */
.table-admin {
    margin-bottom: 0;
}

.table-admin thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    white-space: nowrap;
}

.table-admin tbody td {
    vertical-align: middle;
}

/* Colunas com largura fixa */
.th-narrow { width: 60px; }
.th-id { width: 80px; }
.th-date { width: 120px; }
.th-status { width: 100px; }
.th-actions { width: 120px; text-align: right !important; }

/* =============================================================================
 * Progress Bars - Tamanhos
 * ============================================================================= */
.progress-xs { height: 4px; }
.progress-sm { height: 6px; }
.progress-lg { height: 20px; }

/* =============================================================================
 * Estados visuais
 * ============================================================================= */
.section-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.section-muted {
    opacity: 0.6;
}

/* =============================================================================
 * Códigos e Slugs
 * ============================================================================= */
.code-badge {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-sm);
    color: #d63384;
}

.coupon-code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

/* =============================================================================
 * Engagement Bars (Métricas)
 * ============================================================================= */
.engagement-bar {
    height: 8px;
    background: var(--bs-gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.engagement-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.engagement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--bs-gray-100);
}

.engagement-item:last-child {
    border-bottom: none;
}

/* =============================================================================
 * Chart Containers
 * ============================================================================= */
.chart-container {
    position: relative;
    height: 250px;
}

.chart-container-lg {
    height: 350px;
}

.chart-container-sm {
    height: 180px;
}

/* =============================================================================
 * Filter Cards
 * ============================================================================= */
.filter-card {
    margin-bottom: 1rem;
}

.filter-card .card-body {
    padding: 0.75rem 1rem;
}

/* =============================================================================
 * Sticky Footer (para formulários longos)
 * ============================================================================= */
.sticky-bottom-bar,
.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* =============================================================================
 * Preview Items (configurações)
 * ============================================================================= */
.preview-item {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    transition: opacity 0.2s ease;
}

.preview-item.disabled {
    opacity: 0.4;
}

/* =============================================================================
 * Text Utilities
 * ============================================================================= */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================================================
 * Toast Notifications (custom, não Bootstrap)
 * ============================================================================= */
.toast-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: toastSlideIn 0.3s ease;
}

.toast-notification--success {
    background-color: #10b981;
}

.toast-notification--error {
    background-color: #ef4444;
}

.toast-notification--warning {
    background-color: var(--accent-orange);
}

.toast-notification--info {
    background-color: var(--primary-color);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Aliases para compatibilidade (partner-settings) */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: toastSlideIn 0.3s ease;
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

/* ==========================================================================
   Terms Content (affiliate-terms/show)
   ========================================================================== */
.terms-content {
    line-height: 1.7;
}

.terms-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.terms-content h2:first-child {
    margin-top: 0;
}

.terms-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.terms-content p {
    margin-bottom: 0.75rem;
}

.terms-content ul {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.terms-content li {
    margin-bottom: 0.25rem;
}

/* Textarea monospace (affiliate-terms/form) */
#content {
    font-family: monospace;
    font-size: 0.875rem;
}

/* =============================================================================
 * SEO Audit - Score Badges & Results
 * ============================================================================= */

/* Score Badge Base */
.seo-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: white;
    line-height: 1;
}

/* Score Badge Sizes */
.seo-score-badge--sm {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
}

.seo-score-badge--lg {
    width: 72px;
    height: 72px;
    font-size: 1.5rem;
}

/* Score Badge Colors */
.seo-score-badge--critical { background-color: #ef4444; }
.seo-score-badge--warning  { background-color: #f59e0b; }
.seo-score-badge--good     { background-color: #10b981; }
.seo-score-badge--excellent { background: var(--gradient-primary); }

/* Audit Result Content Formatting */
.seo-audit-result {
    line-height: 1.7;
    font-size: 0.95rem;
}

.seo-audit-result h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.seo-audit-result h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    color: var(--primary-color);
}

.seo-audit-result h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.seo-audit-result p {
    margin-bottom: 0.75rem;
}

.seo-audit-result ul,
.seo-audit-result ol {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.seo-audit-result li {
    margin-bottom: 0.3rem;
}

.seo-audit-result strong {
    color: var(--text-dark);
}

.seo-audit-result blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

.seo-audit-result code {
    background: #f1f3f5;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.seo-audit-result pre {
    background: #1a1a2e;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1rem 0;
}

.seo-audit-result pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.seo-audit-result table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.seo-audit-result table th,
.seo-audit-result table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.seo-audit-result table th {
    background: #f8f9fa;
    font-weight: 600;
}

.seo-audit-result hr {
    margin: 1.5rem 0;
    border-color: #e9ecef;
}

/* Audit Button */
.seo-audit-btn {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.seo-audit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.seo-audit-btn:disabled {
    opacity: 0.7;
}

/* API Key Masked Display */
.api-key-masked {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* =============================================================================
 * Calculator Usage Table
 * ============================================================================= */
.calc-usage-table {
    table-layout: fixed;
    width: 100%;
}

.calc-usage-table .col-id         { width: 55px; }
.calc-usage-table .col-user       { width: 180px; }
.calc-usage-table .col-product    { width: auto; }
.calc-usage-table .col-cost       { width: 100px; }
.calc-usage-table .col-marketplace { width: 110px; }
.calc-usage-table .col-location   { width: 160px; }
.calc-usage-table .col-date       { width: 120px; }
.calc-usage-table .col-device     { width: 100px; }

.calc-usage-table .device-icons i {
    margin-right: 3px;
}
.calc-usage-table .device-icons i:last-child {
    margin-right: 0;
}

.calc-usage-table code[title] {
    cursor: default;
}

.calc-usage-table .location-text {
    display: inline-block;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
