/* ===== DISCOUNTS MODULE ===== */
/* Все стили с префиксом dsc_ для избежания конфликтов */

/* Основной контейнер */
.dsc-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Заголовок страницы */
.dsc-header {
    text-align: center;
    margin-bottom: 40px;
}

.dsc-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.dsc-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    border-radius: 2px;
}

.dsc-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Карточка текущей скидки */
.dsc-current-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.dsc-current-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    opacity: 0.05;
    border-radius: 50%;
}

.dsc-current-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.dsc-current-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.dsc-current-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.dsc-current-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.dsc-current-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.dsc-current-history {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--bg-secondary);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.dsc-current-history:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.dsc-history-badge {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.dsc-current-history:hover .dsc-history-badge {
    background: white;
    color: var(--primary-color);
}

/* Сетка акций */
.dsc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Карточка акции */
.dsc-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.dsc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.dsc-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.dsc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.dsc-card:hover .dsc-card-image img {
    transform: scale(1.1);
}

.dsc-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.dsc-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dsc-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.dsc-card-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.dsc-card-discount {
    margin: 15px 0;
}

.dsc-discount-value {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    padding: 5px 20px;
    border-radius: 50px;
    border: 2px dashed var(--primary-color);
}

.dsc-card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dsc-card-code {
    background: var(--bg-secondary);
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dsc-card-code span {
    color: var(--text-muted);
}

.dsc-card-code code {
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.dsc-copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
}

.dsc-copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

.dsc-card-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Пустое состояние */
.dsc-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-secondary);
    border-radius: 30px;
    grid-column: 1 / -1;
}

.dsc-empty-icon {
    font-size: 80px;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.dsc-empty h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.dsc-empty p {
    color: var(--text-secondary);
}

/* ===== ИСТОРИЯ СКИДОК ===== */
.dsc-history-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.dsc-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.dsc-history-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 30px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.dsc-history-back:hover {
    background: var(--primary-color);
    color: white;
}

.dsc-history-title {
    font-size: 2rem;
    margin: 0;
    color: var(--text-primary);
}

.dsc-current-info-badge {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 30px;
    font-size: 16px;
}

.dsc-history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Карточка истории */
.dsc-history-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.dsc-history-card-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dsc-history-card-title i {
    color: var(--primary-color);
}

.dsc-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Таймлайн */
.dsc-timeline {
    position: relative;
    padding-left: 20px;
}

.dsc-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.dsc-timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 25px;
}

.dsc-timeline-dot {
    position: absolute;
    left: -18px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    z-index: 1;
}

.dsc-timeline-dot.dsc-positive {
    background: var(--primary-color);
}

.dsc-timeline-dot.dsc-neutral {
    background: var(--text-muted);
}

.dsc-timeline-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 15px;
}

.dsc-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dsc-timeline-date {
    font-size: 13px;
    color: var(--text-muted);
}

.dsc-timeline-discount {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.dsc-timeline-reason {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dsc-timeline-footer {
    font-size: 12px;
    color: var(--text-muted);
}

.dsc-timeline-admin i {
    margin-right: 4px;
}

/* Заказы в истории */
.dsc-orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dsc-order-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 15px;
}

.dsc-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dsc-order-number {
    font-weight: 600;
    color: var(--text-primary);
}

.dsc-order-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.dsc-order-status.dsc-new {
    background: var(--warning-color);
    color: white;
}
.dsc-order-status.dsc-processed {
    background: var(--info-color);
    color: white;
}
.dsc-order-status.dsc-completed {
    background: var(--success-color);
    color: white;
}
.dsc-order-status.dsc-cancelled {
    background: var(--danger-color);
    color: white;
}

.dsc-order-details {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.dsc-order-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin: 5px 0;
}

.dsc-order-row.dsc-discount-row {
    color: var(--success-color);
}

.dsc-order-row.dsc-total-row {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.dsc-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.dsc-order-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dsc-order-link:hover {
    text-decoration: underline;
}

/* Мобильная FAB-кнопка */
.dsc-mobile-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
}

.dsc-fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.dsc-fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.dsc-fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Адаптивность */
@media (max-width: 992px) {
    .dsc-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .dsc-history-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dsc-current-card {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }

    .dsc-current-history {
        width: 100%;
        justify-content: center;
    }

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

    .dsc-history-grid {
        grid-template-columns: 1fr;
    }

    .dsc-history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dsc-history-title {
        font-size: 1.8rem;
    }

    .dsc-timeline {
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .dsc-title {
        font-size: 2rem;
    }

    .dsc-current-value {
        font-size: 36px;
    }

    .dsc-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .dsc-card-code {
        width: 100%;
        justify-content: space-between;
    }

    .dsc-fab-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
