/* ========================================
   Lead Tracker - Premium Dashboard Styles
   ======================================== */

:root {
    /* Color Palette - Dark Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-elevated: #22222e;

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-secondary: #22d3ee;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-purple: #a855f7;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --header-height: 80px;
    --filters-height: 70px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ========================================
   Reset & Base
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   Header
   ======================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item.highlight .stat-value {
    color: var(--accent-success);
}

.stat-item.revenue .stat-value {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--accent-warning);
    color: var(--bg-primary);
}

.btn-warning:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.btn-icon:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ========================================
   Filters Section
   ======================================== */

.filters-section {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.filters-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 36px 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--transition-fast);
}

.filter-select:hover {
    border-color: var(--border-hover);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-left: auto;
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.leads-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.leads-container.list-view {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* ========================================
   Lead Cards - Grid View
   ======================================== */

.lead-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.lead-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.lead-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.lead-card:hover::before {
    opacity: 1;
}

.lead-card.has-website::before {
    background: linear-gradient(135deg, var(--accent-success), var(--accent-secondary));
    opacity: 1;
}

.lead-card.sold {
    border-color: var(--accent-success);
}

.lead-card.sold::before {
    background: var(--accent-success);
    opacity: 1;
}

.card-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.lead-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.priority-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.priority-low {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

.niche-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.niche-tag i {
    color: var(--accent-primary-light);
}

.card-body {
    padding: 16px 20px;
}

.lead-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lead-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-new {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary-light);
}

.status-website-built {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.status-contacted {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.status-sold {
    background: var(--accent-success);
    color: white;
}

.status-lost {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-footer .btn {
    flex: 1;
    min-width: 90px;
}

/* ========================================
   Lead Cards - List View
   ======================================== */

.leads-container.list-view .lead-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
}

.leads-container.list-view .lead-card::before {
    width: 4px;
    height: 100%;
    top: 0;
    left: 0;
    right: auto;
}

.leads-container.list-view .card-header {
    border: none;
    padding: 0;
}

.leads-container.list-view .card-body {
    display: none;
}

.leads-container.list-view .card-footer {
    background: none;
    padding: 0;
    flex-wrap: nowrap;
}

/* ========================================
   Modals
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    padding: 24px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-base);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-preview {
    max-width: 1200px;
    height: 85vh;
}

.modal-adjustment {
    max-width: 600px;
}

.modal-details {
    max-width: 700px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--accent-primary-light);
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Preview Modal Specific */
.preview-frame-container {
    flex: 1;
    padding: 0;
    background: white;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
}

#previewFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Adjustment Modal Specific */
.lead-name-display {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-primary-light);
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-body textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: all var(--transition-fast);
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-body textarea::placeholder {
    color: var(--text-muted);
}

.previous-requests {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.previous-requests h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-item {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.request-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Toast Notification
   ======================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--accent-success);
    font-size: 1.25rem;
}

.toast.error i {
    color: var(--accent-danger);
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ========================================
   Sold Toggle
   ======================================== */

.sold-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.sold-toggle-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-elevated);
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border: 1px solid var(--border-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-switch.active {
    background: var(--accent-success);
    border-color: var(--accent-success);
}

.toggle-switch.active::after {
    left: 25px;
    background: white;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1200px) {
    .stats-bar {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }

    .stats-bar {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }

    .leads-container.list-view .lead-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .leads-container.list-view .card-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filters-content {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-select {
        flex: 1;
        min-width: 100px;
    }

    .view-toggle {
        margin-left: 0;
        align-self: flex-end;
    }

    .leads-container {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 12px;
    }

    .modal-preview {
        height: 90vh;
    }
}

@media (max-width: 480px) {
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .stat-item {
        flex: 1;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .card-footer .btn {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-card {
    animation: fadeInUp 0.4s ease backwards;
}

.leads-container .lead-card:nth-child(1) {
    animation-delay: 0.05s;
}

.leads-container .lead-card:nth-child(2) {
    animation-delay: 0.1s;
}

.leads-container .lead-card:nth-child(3) {
    animation-delay: 0.15s;
}

.leads-container .lead-card:nth-child(4) {
    animation-delay: 0.2s;
}

.leads-container .lead-card:nth-child(5) {
    animation-delay: 0.25s;
}

.leads-container .lead-card:nth-child(6) {
    animation-delay: 0.3s;
}

.leads-container .lead-card:nth-child(7) {
    animation-delay: 0.35s;
}

.leads-container .lead-card:nth-child(8) {
    animation-delay: 0.4s;
}

.leads-container .lead-card:nth-child(9) {
    animation-delay: 0.45s;
}

.leads-container .lead-card:nth-child(10) {
    animation-delay: 0.5s;
}

.leads-container .lead-card:nth-child(11) {
    animation-delay: 0.55s;
}

.leads-container .lead-card:nth-child(12) {
    animation-delay: 0.6s;
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   Floating Agent Request Button
   ======================================== */

.fab-agent {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-base);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-agent:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.fab-agent:active {
    transform: scale(0.95);
}

/* Agent Modal */
.modal-agent {
    max-width: 650px;
}

.request-type-selector {
    margin-bottom: 20px;
}

.request-type-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.request-types {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.request-type-btn {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.request-type-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
}

.request-type-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
}

.request-type-btn i {
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-select.full-width {
    width: 100%;
}

.request-history {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.request-history h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.request-history h4 i {
    color: var(--accent-primary-light);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-item-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary-light);
    text-transform: uppercase;
}

.history-item-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.history-item-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.history-item-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.history-item-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.empty-history {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}