/* SlimWP Dashboard Styles */

.slimwp-dashboard-wrap {
    margin: 0;
    padding: 0;
    background: #f0f0f1;
    min-height: 100vh;
}

.slimwp-dashboard {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Dashboard Header */
.slimwp-dashboard-header {
    background: #fff;
    padding: 20px 30px;
    margin: -20px -20px 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.slimwp-dashboard-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
}

.slimwp-header-actions {
    display: flex;
    gap: 10px;
}

.slimwp-header-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Statistics Grid */
.slimwp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.slimwp-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.slimwp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #fff;
}

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

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #50575e;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-meta {
    font-size: 13px;
    color: #8c8f94;
    margin-top: 5px;
}

/* Dashboard Grid Layout */
.slimwp-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.slimwp-dashboard-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.slimwp-dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Dashboard Widgets */
.slimwp-dashboard-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.widget-badge {
    background: #2271b1;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.widget-link {
    color: #2271b1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.widget-link:hover {
    color: #135e96;
}

.widget-content {
    padding: 20px;
}

/* Announcements Slider */
.announcement-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ann-nav-prev,
.ann-nav-next {
    background: none;
    border: none;
    color: #8c8f94;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.ann-nav-prev:hover,
.ann-nav-next:hover {
    color: #2271b1;
}

.ann-nav-prev:disabled,
.ann-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ann-nav-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ann-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dcdcde;
    cursor: pointer;
    transition: all 0.3s;
}

.ann-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #2271b1;
}

.ann-dot:hover:not(.active) {
    background: #8c8f94;
}

.slimwp-announcements-slider {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.announcements-wrapper {
    position: relative;
    width: 100%;
}

.announcement-slide {
    display: none;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
    animation: fadeIn 0.5s;
}

.announcement-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.announcement-slide h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.announcement-excerpt {
    font-size: 14px;
    color: #50575e;
    margin-bottom: 12px;
    line-height: 1.6;
    font-style: italic;
}

.announcement-content {
    font-size: 14px;
    color: #3c434a;
    line-height: 1.6;
}

.announcement-content p {
    margin: 10px 0;
}

.announcement-content ul,
.announcement-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.announcement-content li {
    margin: 5px 0;
}

.announcement-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    font-size: 12px;
    color: #8c8f94;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #f0f0f1;
}

.activity-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-main {
    font-size: 14px;
    color: #1d2327;
    margin-bottom: 4px;
}

.activity-main strong {
    font-weight: 600;
}

.activity-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #8c8f94;
}

.activity-amount {
    font-weight: 600;
}

.activity-amount.positive {
    color: #00a32a;
}

.activity-amount.negative {
    color: #d63638;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    text-decoration: none;
    color: #3c434a;
    transition: all 0.2s;
    text-align: center;
}

.quick-action-btn:hover {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
    transform: translateY(-1px);
}

.quick-action-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
}

.quick-action-btn span:last-child {
    font-size: 12px;
    font-weight: 500;
}

/* Top Users */
.top-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: background 0.2s;
}

.top-user-item:hover {
    background: #f0f0f1;
}

.user-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e0e0e0;
    font-weight: 700;
    font-size: 14px;
    color: #50575e;
}

.user-rank.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #6b5b00;
}

.user-rank.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #d7d7d7 100%);
    color: #4a4a4a;
}

.user-rank.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e4a853 100%);
    color: #5c3a1e;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 2px;
}

.user-points {
    font-size: 12px;
    color: #8c8f94;
}

/* System Health */
.system-health {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.health-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-indicator.good {
    background: #00a32a;
}

.health-indicator.warning {
    background: #dba617;
}

.health-indicator.error {
    background: #d63638;
}

.health-indicator.info {
    background: #72aee6;
}

.health-label {
    font-size: 13px;
    font-weight: 500;
    color: #3c434a;
    flex: 1;
}

.health-message {
    font-size: 12px;
    color: #8c8f94;
}

/* Remote Content Indicators */
.remote-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.promotion-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* Importance Badges */
.importance-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.importance-critical {
    background: #ffebee;
    color: #c62828;
}

.importance-high {
    background: #fff3e0;
    color: #e65100;
}

.importance-medium {
    background: #fff8e1;
    color: #f57c00;
}

.importance-low {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Promo Badge */
.promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4444;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Promotions Slider */
.promotion-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-nav-prev,
.promo-nav-next {
    background: none;
    border: none;
    color: #8c8f94;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.promo-nav-prev:hover,
.promo-nav-next:hover {
    color: #2271b1;
}

.promo-nav-prev:disabled,
.promo-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.promo-nav-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dcdcde;
    cursor: pointer;
    transition: all 0.3s;
}

.promo-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #2271b1;
}

.promo-dot:hover:not(.active) {
    background: #8c8f94;
}

.slimwp-promotions-slider {
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.promotions-wrapper {
    position: relative;
    width: 100%;
}

.promotion-slide {
    display: none;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.5s;
}

.promotion-slide.active {
    display: block;
}

.promotion-slide .promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    color: #fff;
    animation: pulse 2s infinite;
}

.promotion-slide .remote-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.promotion-slide-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f0f0f1;
}

.promotion-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.promotion-slide:hover .promotion-slide-image img {
    transform: scale(1.05);
}

.promotion-slide-content {
    padding: 15px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-top: none;
}

.promotion-slide-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.promotion-slide .promotion-excerpt {
    font-size: 13px;
    color: #8c8f94;
    margin: 8px 0;
    font-style: italic;
}

.promotion-slide .promotion-text {
    font-size: 13px;
    color: #50575e;
    line-height: 1.6;
    margin-bottom: 12px;
}

.promotion-slide .promotion-text ul,
.promotion-slide .promotion-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.promotion-slide .promotion-text li {
    margin: 4px 0;
}

.promotion-slide .promotion-text strong {
    color: #1d2327;
    font-weight: 600;
}

.promotion-slide .promotion-button {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promotion-slide .promotion-button:hover {
    background: #135e96;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Legacy Full Width Promotions (keeping for backward compatibility) */
.slimwp-promotions-section {
    margin-top: 20px;
}

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.promotion-card {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.promotion-card.remote-promotion {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.promotion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.promotion-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f1;
}

.promotion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promotion-content {
    padding: 20px;
}

.promotion-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.promotion-excerpt {
    font-size: 13px;
    color: #8c8f94;
    margin: 8px 0;
    font-style: italic;
}

.promotion-text {
    font-size: 14px;
    color: #50575e;
    line-height: 1.6;
    margin-bottom: 15px;
}

.promotion-button {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.promotion-button:hover {
    background: #135e96;
    color: #fff;
}

/* Content Manager Styles */
.slimwp-content-manager .content-editor-form {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.content-manager-grid {
    display: grid;
    gap: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .slimwp-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .slimwp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .slimwp-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .slimwp-header-actions {
        width: 100%;
        justify-content: center;
    }

    .slimwp-stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .promotions-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.slimwp-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.slimwp-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f1;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}