/**
 * Unified Dashboard Styles
 * Primary: #cd5928
 * Secondary: #8c181b
 */

.lemcrm-unified-dashboard {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.welcome-message {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.welcome-message strong {
    color: #cd5928;
}

.dashboard-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Dashboard Card */
.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(205, 89, 40, 0.15);
    transform: translateY(-2px);
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    flex: 1;
}

/* Card Content */
.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card Metrics */
.card-metric {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e5e5e5;
}

.metric-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #cd5928;
    line-height: 1.2;
    margin-bottom: 4px;
}

.metric-label {
    display: block;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-secondary-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.card-secondary-metric:last-child {
    border-bottom: none;
}

.card-secondary-metric .metric-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.metric-value-small {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Recent Items */
.card-recent {
    margin-top: 8px;
}

.recent-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #cd5928;
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: #f0f0f0;
    border-left-color: #8c181b;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.item-date,
.item-type,
.item-points {
    color: #666;
}

.item-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed,
.status-active,
.status-published {
    background: #d4edda;
    color: #155724;
}

.status-processing,
.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-cancelled,
.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-wc-completed {
    background: #d4edda;
    color: #155724;
}

.status-wc-processing {
    background: #cce5ff;
    color: #004085;
}

.status-wc-on-hold {
    background: #fff3cd;
    color: #856404;
}

.status-wc-pending {
    background: #ffeaa7;
    color: #856404;
}

/* Empty State */
.card-empty {
    text-align: center;
    padding: 32px 16px;
    color: #999;
}

.card-empty p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.card-error {
    text-align: center;
    padding: 32px 16px;
    color: #8c181b;
}

.card-error p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Card Footer */
.card-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #cd5928;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.card-button:hover {
    background: #8c181b;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(205, 89, 40, 0.3);
}

.card-button:active {
    transform: translateY(0);
}

.card-button i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.card-button:hover i {
    transform: translateX(4px);
}

.card-button-small {
    display: inline-block;
    padding: 8px 16px;
    background: #cd5928;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-button-small:hover {
    background: #8c181b;
    color: #ffffff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .welcome-message {
        font-size: 24px;
    }

    .card-header {
        padding: 16px;
    }

    .card-content {
        padding: 20px;
    }

    .metric-value {
        font-size: 28px;
    }

    .recent-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-meta {
        width: 100%;
        justify-content: space-between;
    }
}

/* Loading State */
.dashboard-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #cd5928;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner-small {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #cd5928;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card-loading {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.card-loading p {
    margin: 10px 0 0 0;
    font-size: 14px;
}

/* Error State */
.dashboard-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #8c181b;
}

/* Card Specific Styles */
.orders-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.bookings-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.wellness-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.loyalty-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.content-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

.rewards-card .card-header {
    background: linear-gradient(135deg, #cd5928 0%, #8c181b 100%);
}

/* Print Styles */
@media print {
    .dashboard-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .card-button {
        display: none;
    }
}

