﻿/* ============================================
           TOYOTA SALES DASHBOARD STYLING
           ============================================ */


/* ============================================
   ADMIN DASHBOARD SPECIFIC STYLES
   Add these to the end of skin-dashboards.css
   ============================================ */

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .filter-btn:hover {
        background: rgba(235, 10, 30, 0.1);
        border-color: var(--toyota-red);
        color: var(--toyota-red);
    }

    .filter-btn.active {
        background: var(--toyota-red);
        border-color: var(--toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.3);
    }

/* Progress Cell */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(45, 45, 45, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    min-width: 45px;
    text-align: right;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0 0.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pagination-btn:hover:not(:disabled) {
        background: rgba(235, 10, 30, 0.1);
        border-color: var(--toyota-red);
        color: var(--toyota-red);
    }

    .pagination-btn.active {
        background: var(--toyota-red);
        border-color: var(--toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.3);
    }

    .pagination-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.85);
    padding: 0 0.5rem;
    font-weight: 600;
}

/* Activity/Note Category Badges for Activity Types */
.note-category.quote {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.15) 100%);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.3);
}

.note-category.underwriting {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.note-category.policy {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Status dots for activity */
.status-dot.quote {
    background: #22c55e;
}

.status-dot.underwriting {
    background: #f59e0b;
}

.status-dot.policy {
    background: #3b82f6;
}

/* Metric value colors */
.metric-value.success {
    color: #22c55e;
}

.metric-value.warning {
    color: #f59e0b;
}

/* Stat trend warning color */
.stat-trend.warning {
    color: #f59e0b;
}

    .stat-trend.warning i {
        color: #f59e0b;
    }

/* ============================================
   LIGHT THEME - ADMIN SPECIFIC STYLES
   Add these to the end of skin-dashboards-light-theme.css
   ============================================ */

/* Filter Buttons - Light Theme */
.theme-light .filter-btn {
    background: white;
    border: 2px solid #e5e7eb;
    color: var(--toyota-grey);
}

    .theme-light .filter-btn:hover {
        background: rgba(235, 10, 30, 0.05);
        border-color: var(--toyota-red);
        color: var(--toyota-red);
    }

    .theme-light .filter-btn.active {
        background: var(--toyota-red);
        border-color: var(--toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
    }

/* Progress Bar - Light Theme */
.theme-light .progress-bar {
    background: #f3f4f6;
}

.theme-light .progress-text {
    color: var(--toyota-grey-dark);
}

/* Pagination - Light Theme */
.theme-light .pagination {
    border-top: 1px solid #e5e7eb;
}

.theme-light .pagination-btn {
    background: white;
    border: 2px solid #e5e7eb;
    color: var(--toyota-grey);
}

    .theme-light .pagination-btn:hover:not(:disabled) {
        background: rgba(235, 10, 30, 0.05);
        border-color: var(--toyota-red);
        color: var(--toyota-red);
    }

    .theme-light .pagination-btn.active {
        background: var(--toyota-red);
        border-color: var(--toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
    }

    .theme-light .pagination-btn:disabled {
        opacity: 0.4;
    }

.theme-light .pagination-ellipsis {
    color: var(--toyota-grey);
}

/* Activity Categories - Light Theme */
.theme-light .note-category.quote {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.theme-light .note-category.underwriting {
    background: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.theme-light .note-category.policy {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

/* Status Dots - Light Theme (keep same colors) */
.theme-light .status-dot.quote {
    background: #22c55e;
}

.theme-light .status-dot.underwriting {
    background: #f59e0b;
}

.theme-light .status-dot.policy {
    background: #3b82f6;
}

/* Metric Values - Light Theme */
.theme-light .metric-value.success {
    color: #16a34a;
    font-weight: 700;
}

.theme-light .metric-value.warning {
    color: #d97706;
    font-weight: 700;
}

/* Stat Trend - Light Theme */
.theme-light .stat-trend.warning {
    color: #d97706;
}

    .theme-light .stat-trend.warning i {
        color: #d97706;
    }

/* ============================================
   RESPONSIVE - ADMIN SPECIFIC
   ============================================ */
@media (max-width: 768px) {
    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 80px;
    }

    .progress-cell {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .progress-text {
        text-align: center;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
    }
}
/* Dashboard Container */
.dashboard-container {
    padding: 0;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
}

/* Dashboard Header - Toyota Gradient */
.dashboard-header {
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%);
    border-radius: 0.75rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(45, 45, 45, 0.15);
}

    .dashboard-header::before {
        content: '';
        position: absolute;
        top: -50px;
        right: -50px;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(235, 10, 30, 0.15) 0%, transparent 70%);
        border-radius: 50%;
    }

.header-decoration {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 1rem;
}

.decoration-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(235, 10, 30, 0.2);
}

.header-content {
    position: relative;
    z-index: 1;
}

.dashboard-header h1 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.02em;
}

    .dashboard-header h1 i {
        font-size: 2rem;
        color: var(--toyota-red);
    }

.dashboard-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    font-weight: 400;
    margin: 0;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.08);
    gap: 1.5rem;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--toyota-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(235, 10, 30, 0.2);
}

@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--toyota-grey);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

/* Alert */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(235, 10, 30, 0.08) 0%, rgba(235, 10, 30, 0.12) 100%);
    border-color: var(--toyota-red);
    color: var(--toyota-red-dark);
}

.alert i {
    font-size: 1.5rem;
}

/* Stats Grid - Toyota Cards */
.stats-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.08);
    /* border: 1px solid var(--border-color); */
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    /* gap: 1.5rem; */
    width: 100%;
    min-width: 0;
    /* color: white; */
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
    }

    .stat-card.primary::before {
        background: linear-gradient(90deg, var(--toyota-grey-dark) 0%, var(--toyota-grey) 100%);
    }

    .stat-card.success::before {
        background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    }

    .stat-card.warning::before {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    }

    .stat-card.accent::before {
        background: linear-gradient(90deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    }

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(45, 45, 45, 0.12);
    }

.stat-icon-wrapper {
    flex-shrink: 0;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
}

    .stat-icon::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 0.75rem;
        background: inherit;
        opacity: 0.2;
        filter: blur(12px);
        z-index: -1;
    }

.stat-card.primary .stat-icon {
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-grey) 100%);
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.accent .stat-icon {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05) rotate(5deg);
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* text-align: right; */
    line-height: 1.4;
    margin-left: 9px;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

    .stat-trend.positive {
        color: #22c55e;
    }

    .stat-trend.neutral {
        color: var(--toyota-grey-light);
    }

    .stat-trend i {
        font-size: 0.875rem;
    }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 1.75rem 2rem;
    border-bottom: 2px solid var(--toyota-red);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-section {
    flex: 1;
    min-width: 0;
}

.card-header h2 {
    color: var(--toyota-grey-dark);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    letter-spacing: -0.01em;
}

    .card-header h2 i {
        color: var(--toyota-red);
        font-size: 1.125rem;
    }

.header-badge {
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.08) 0%, rgba(45, 45, 45, 0.12) 100%);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(45, 45, 45, 0.15);
}

.card-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--toyota-grey-light);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(235, 10, 30, 0.08) 0%, rgba(235, 10, 30, 0.12) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--toyota-red);
}

.empty-state h3 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
}

    .performance-table th {
        padding: 1.125rem 1.5rem;
        text-align: left;
        font-weight: 700;
        color: white;
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        border-bottom: 2px solid var(--border-color);
        /* background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%); */
    }

    .performance-table td {
        padding: 1.25rem 1.5rem;
        vertical-align: middle;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.9375rem;
    }

    .performance-table tbody tr {
        transition: all 0.2s ease;
    }

        .performance-table tbody tr:hover {
            background: linear-gradient(90deg, rgba(235, 10, 30, 0.02) 0%, rgba(235, 10, 30, 0.05) 100%);
        }

.quote-number-cell .quote-number {
    font-weight: 700;
    color: var(--toyota-red);
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
}

.policyholder-cell {
    min-width: 200px;
}

.policyholder-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.policyholder-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
}

.policyholder-info span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.metric-value {
    font-weight: 700;
    font-size: 1.0625rem;
    color: #22c55e;
}

.date-value {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.status-badge.concluded {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.15) 100%);
    color: #16a34a;
    border-color: rgba(34, 197, 94, 0.3);
}

.status-badge.default {
    background: linear-gradient(135deg, rgba(45, 45, 45, 0.08) 0%, rgba(45, 45, 45, 0.12) 100%);
    color: var(--toyota-grey);
    border-color: rgba(45, 45, 45, 0.2);
}

/* Mobile Card View */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

.quote-cards {
    display: grid;
    gap: 1.5rem;
}

.quote-card-mobile {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.08);
    transition: all 0.2s ease;
}

    .quote-card-mobile:hover {
        box-shadow: 0 4px 16px rgba(45, 45, 45, 0.12);
        transform: translateY(-2px);
        border-color: var(--toyota-red);
    }

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--toyota-red);
}

.quote-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quote-label {
    font-size: 0.75rem;
    color: var(--toyota-grey-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.quote-number {
    font-weight: 700;
    color: var(--toyota-red);
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
}

.quote-card-body {
    display: grid;
    gap: 1rem;
}

.quote-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--toyota-grey);
    font-weight: 600;
}

.detail-value {
    font-weight: 700;
    color: var(--toyota-grey-dark);
}

    .detail-value.premium {
        color: #22c55e;
        font-size: 1.0625rem;
    }

/* Notes Section - Unified Styling */
.notes-card {
    max-height: 700px;
}

/* Notes Header Controls - Unified Layout */
.notes-header-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* Notes Tabs Container */
.notes-tabs {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    padding: 0.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tab Buttons - Unified Base Styles */
.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.5rem;
    min-height: 44px;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
    flex: 1;
}

    .tab-btn i {
        font-size: 1rem;
    }

    .tab-btn span {
        display: inline;
        font-weight: 600;
    }

    .tab-btn:hover:not(.active) {
        background: rgba(235, 10, 30, 0.1);
        color: var(--toyota-red);
        border-color: transparent;
    }

    .tab-btn.active {
        background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
        border-color: var(--toyota-red);
        color: white;
        box-shadow: 0 2px 8px rgba(235, 10, 30, 0.3);
    }

        .tab-btn.active i,
        .tab-btn.active span {
            color: white;
        }



.notes-list {
    flex: 1;
    overflow-y: auto;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

    .note-item:hover {
        background: linear-gradient(90deg, rgba(235, 10, 30, 0.02) 0%, rgba(235, 10, 30, 0.05) 100%);
        margin: 0 -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .note-item:last-child {
        border-bottom: none;
    }

    .note-item.deleted {
        opacity: 0.7;
    }

.note-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(235, 10, 30, 0.2);
}

    .note-icon.deleted {
        background: linear-gradient(135deg, var(--toyota-grey) 0%, var(--toyota-grey-dark) 100%);
    }

.note-content {
    flex: 1;
    min-width: 0;
}

.note-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.note-category {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

    .note-category.note {
        background: linear-gradient(135deg, rgba(45, 45, 45, 0.08) 0%, rgba(45, 45, 45, 0.12) 100%);
        color: var(--toyota-grey);
        border-color: rgba(45, 45, 45, 0.2);
    }

    .note-category.callback {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
        color: #d97706;
        border-color: rgba(245, 158, 11, 0.3);
    }

    .note-category.deleted {
        background: linear-gradient(135deg, rgba(235, 10, 30, 0.1) 0%, rgba(235, 10, 30, 0.15) 100%);
        color: var(--toyota-red);
        border-color: rgba(235, 10, 30, 0.3);
    }

.note-date {
    color: var(--toyota-grey-light);
    font-size: 0.75rem;
    font-weight: 500;
}

.note-title {
    color: var(--toyota-grey-dark);
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.note-description {
    color: var(--toyota-grey);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

.deletion-reason {
    color: var(--toyota-red);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(235, 10, 30, 0.05);
    border-left: 3px solid var(--toyota-red);
    border-radius: 0.375rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

    .deletion-reason i {
        margin-top: 0.125rem;
        flex-shrink: 0;
    }

.note-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons - Toyota Styling */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    color: white;
    border-color: var(--toyota-red);
    box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.35);
    }

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

    .btn-success:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    }

.btn-danger {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    color: white;
    border-color: var(--toyota-red);
    box-shadow: 0 2px 8px rgba(235, 10, 30, 0.25);
}

    .btn-danger:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(235, 10, 30, 0.35);
    }

.btn-ghost {
    background: transparent;
    color: var(--toyota-grey);
    border-color: var(--border-color);
}

    .btn-ghost:hover:not(:disabled) {
        background: rgba(45, 45, 45, 0.05);
        color: var(--toyota-grey-dark);
        border-color: var(--toyota-grey);
    }

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-icon {
    padding: 0.625rem;
    width: 40px;
    height: 40px;
}

    .btn-icon.btn-sm {
        padding: 0.5rem;
        width: 36px;
        height: 36px;
    }

/* Modal Styles - Toyota Design */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(45, 45, 45, 0.3);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

.modal-danger {
    border-top: 4px solid var(--toyota-red);
}

@@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 2rem 2rem 1.5rem 2rem;
    border-bottom: 2px solid var(--toyota-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        color: var(--toyota-grey-dark);
        font-size: 1.375rem;
        font-weight: 700;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .modal-header h3 i {
            color: var(--toyota-red);
            font-size: 1.25rem;
        }

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #fafafa;
}

.deletion-warning {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.warning-icon {
    width: 48px;
    height: 48px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.warning-content h4 {
    color: #d97706;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.warning-content p {
    color: #d97706;
    margin: 0;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--toyota-grey-dark);
        font-weight: 600;
        margin-bottom: 0.75rem;
        font-size: 0.9375rem;
    }

        .form-group label i {
            color: var(--toyota-red);
            font-size: 0.875rem;
        }

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--toyota-grey-dark);
}

    .form-control:focus {
        outline: none;
        border-color: var(--toyota-red);
        box-shadow: 0 0 0 3px rgba(235, 10, 30, 0.1);
    }

    .form-control::placeholder {
        color: var(--toyota-grey-light);
    }

/* Responsive Design */
@@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-admin {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@@media (max-width: 768px) {
    .dashboard-header {
        padding: 2rem 1.5rem;
    }

        .dashboard-header h1 {
            font-size: 1.75rem;
        }

        .dashboard-header p {
            font-size: 1rem;
        }

    .stats-grid-admin {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .stat-icon-wrapper {
        align-self: center;
    }

    .stat-value {
        font-size: 2rem;
    }

    .notes-header-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .notes-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .card-content {
        padding: 1.5rem;
    }

    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }

    .note-item:hover {
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .btn-text {
        display: none;
    }

    .btn-text-mobile {
        display: inline;
    }
}

@@media (max-width: 480px) {
    .stats-grid-admin {
        grid-template-columns: 1fr;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .dashboard-header p {
        text-align: center;
        font-size: 0.9375rem;
    }

    .header-decoration {
        display: none;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .quote-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .quote-info {
        text-align: center;
    }

    .status-badge {
        align-self: center;
    }

    .note-item {
        flex-direction: column;
    }

    .note-icon {
        align-self: center;
    }

    .note-header-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .note-category {
        text-align: center;
    }

    .modal-content {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .deletion-warning {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Dark Mode Support */
.theme-dark .dashboard-header {
    background: linear-gradient(135deg, var(--toyota-charcoal) 0%, #0f0f0f 100%);
}

.theme-dark .stat-card,
.theme-dark .dashboard-card {
    background: var(--toyota-grey-dark);
    border-color: rgba(232, 232, 232, 0.15);
}

.theme-dark .stat-value,
.theme-dark .card-header h2,
.theme-dark .note-title,
.theme-dark .policyholder-info span,
.theme-dark .detail-value {
    color: white;
}

.theme-dark .stat-label,
.theme-dark .date-value,
.theme-dark .detail-label,
.theme-dark .note-description {
    color: var(--toyota-grey-light);
}

.theme-dark .card-header,
.theme-dark .performance-table th {
    background: rgba(0, 0, 0, 0.2);
}

.theme-dark .performance-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(235, 10, 30, 0.1) 0%, rgba(235, 10, 30, 0.15) 100%);
}

.theme-dark .modal-content {
    background: var(--toyota-grey-dark);
}

.theme-dark .modal-header h3 {
    color: white;
}

.theme-dark .form-control {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(232, 232, 232, 0.2);
    color: white;
}

    .theme-dark .form-control:focus {
        border-color: var(--toyota-red-light);
    }

/* ============================================
   IMPROVED STAT CARDS - MODERN TOYOTA DESIGN
   Replace the existing .stats-grid-admin and .stat-card styles
   ============================================ */

/* Stats Grid */
.stats-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Modern Stat Card - Clean Horizontal Layout */
.stat-card {
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 160px;
}

    /* Top colored accent bar */
    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
    }

    .stat-card.primary::before {
        background: linear-gradient(90deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    }

    .stat-card.success::before {
        background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    }

    .stat-card.warning::before {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    }

    .stat-card.accent::before {
        background: linear-gradient(90deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    }

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    }

/* Stat Card Header - Icon and Label */
.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    position: relative;
}

    .stat-icon::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 0.75rem;
        background: inherit;
        opacity: 0.2;
        filter: blur(12px);
        z-index: -1;
    }

/* Icon colors per card type */
.stat-card.primary .stat-icon {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.accent .stat-icon {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05) rotate(5deg);
}

/* Stat Label - Top Right */
.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* text-align: right; */
    line-height: 1.4;
    margin-left: 9px;
}

/* Stat Content - Value and Trend */
.stat-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Stat Trend - Icon and Text */
.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

    .stat-trend i {
        font-size: 0.75rem;
    }

    .stat-trend.positive {
        color: #22c55e;
    }

    .stat-trend.warning {
        color: #f59e0b;
    }

    .stat-trend.neutral {
        color: rgba(255, 255, 255, 0.7);
    }

/* ============================================
   LIGHT THEME - IMPROVED STAT CARDS
   ============================================ */

.theme-light .stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .theme-light .stat-card:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    /* Keep same accent bars for light theme */
    .theme-light .stat-card.primary::before {
        background: linear-gradient(90deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    }

    .theme-light .stat-card.success::before {
        background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    }

    .theme-light .stat-card.warning::before {
        background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    }

    .theme-light .stat-card.accent::before {
        background: linear-gradient(90deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    }

.theme-light .stat-label {
    color: var(--toyota-grey);
}

.theme-light .stat-value {
    color: var(--toyota-grey-dark);
}

.theme-light .stat-trend {
    background: #f3f4f6;
}

    .theme-light .stat-trend.positive {
        color: #16a34a;
        background: #d1fae5;
    }

    .theme-light .stat-trend.warning {
        color: #d97706;
        background: #fef3c7;
    }

    .theme-light .stat-trend.neutral {
        color: var(--toyota-grey);
        background: #f3f4f6;
    }

/* Light theme - keep same icon colors (they pop on white) */
.theme-light .stat-card.primary .stat-icon {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
}

.theme-light .stat-card.success .stat-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.theme-light .stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.theme-light .stat-card.accent .stat-icon {
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
}

/* ============================================
   RESPONSIVE - STAT CARDS
   ============================================ */

@media (max-width: 768px) {
    .stats-grid-admin {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
        min-height: 140px;
    }

    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }

    .stat-trend {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid-admin {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }
}

/* ============================================
   LOADING SPINNER - DARK THEME (DEFAULT)
   Add this to skin-dashboards.css
   ============================================ */

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: linear-gradient(135deg, var(--toyota-grey-dark) 0%, var(--toyota-charcoal) 100%);
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    gap: 1.5rem;
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

/* Main Spinner */
.spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--toyota-red);
    border-right: 5px solid var(--toyota-red);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    box-shadow: 0 0 20px rgba(235, 10, 30, 0.3);
}

    /* Inner Spinner for More Dynamic Effect */
    .spinner::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border: 3px solid transparent;
        border-top: 3px solid rgba(235, 10, 30, 0.5);
        border-radius: 50%;
        animation: spin 0.7s linear infinite reverse;
    }

    /* Center Dot */
    .spinner::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 12px;
        height: 12px;
        background: var(--toyota-red);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 10px rgba(235, 10, 30, 0.8);
        animation: pulse 1.5s ease-in-out infinite;
    }

/* Spin Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Pulse Animation for Center Dot */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Loading Text */
.loading-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
    animation: fadeInOut 2s ease-in-out infinite;
}

/* Fade In/Out Animation for Text */
@keyframes fadeInOut {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Loading Icon (if you want an icon instead) */
.loading-icon {
    font-size: 3rem;
    color: var(--toyota-red);
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}
