/* static/css/pages.css - ОПТИМИЗИРАН (само уникални стилове) */

/* Таблица за поръчки - уникални */
#ordersTable {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#ordersTable thead {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
}

#ordersTable thead th {
    color: white;
    font-weight: 600;
    padding: 15px;
    border: none;
}

#ordersTable tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#ordersTable tbody tr:hover {
    background: linear-gradient(to right, rgba(13, 110, 253, 0.08), rgba(108, 117, 125, 0.05));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

#ordersTable tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Редове и статуси - уникални */
.order-row {
    animation: orderRowFadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.order-row:nth-child(odd) {
    background: rgba(0,0,0,0.01);
}

.order-row:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

/* Специфични закъснения за редове */
.order-row:nth-child(1) { animation-delay: 0.05s; }
.order-row:nth-child(2) { animation-delay: 0.1s; }
.order-row:nth-child(3) { animation-delay: 0.15s; }
.order-row:nth-child(4) { animation-delay: 0.2s; }
.order-row:nth-child(5) { animation-delay: 0.25s; }

/* Статус баджове - уникални */
.status-badge {
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Специфични градиенти за статуси */
.status-badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800) ;
    color: #212529;
}

.status-badge.bg-info {
    background: linear-gradient(135deg, #17a2b8, #0dcaf0) ;
    color: white;
}

.status-badge.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997) ;
    color: white;
}

.status-badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14) ;
    color: white;
}

/* Форми за търсене - уникални */
#searchForm .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid #dee2e6;
    border-right: none;
    transition: all 0.3s ease;
}

#searchForm .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#searchForm .btn-primary {
    border-radius: 0 25px 25px 0;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border: 2px solid #0d6efd;
    padding: 0 25px;
}

#statusFilter {
    border-radius: 25px;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

#statusFilter:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Статистика карти - уникални */
.stats-card {
    transition: all 0.4s ease;
    border: 2px solid transparent;
    background: linear-gradient(white, white), linear-gradient(135deg, #f8f9fa, #e9ecef);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: statsCardFadeIn 0.6s ease-out;
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-8px);
    border: 2px solid;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Специфични hover ефекти за статистика карти */
.stats-card:nth-child(1):hover {
    border-image: linear-gradient(135deg, #0d6efd, #6610f2) 1;
}

.stats-card:nth-child(2):hover {
    border-image: linear-gradient(135deg, #198754, #20c997) 1;
}

.stats-card:nth-child(3):hover {
    border-image: linear-gradient(135deg, #0dcaf0, #17a2b8) 1;
}

.stats-card:nth-child(4):hover {
    border-image: linear-gradient(135deg, #ffc107, #fd7e14) 1;
}

/* Privacy и Terms страници - уникални */
.privacy-container, .terms-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.7;
}

.privacy-header, .terms-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    border-radius: 15px;
}

.privacy-header h1, .terms-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.last-updated {
    color: rgba(255,255,255,0.8);
    font-style: italic;
}

.privacy-section, .terms-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
}

.terms-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.privacy-section h2, .terms-section h2 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.privacy-list, .terms-list {
    padding-left: 20px;
    margin: 20px 0;
}

.privacy-list li, .terms-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.terms-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
}

.important-note {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 8px solid #ffc107;
    padding: 20px;
    margin: 25px 0;
    border-radius: 10px;
    animation: pulseEffect 2s infinite;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

/* Таблици за Terms - уникални */
.terms-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.terms-table thead {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
}

.terms-table th {
    color: white;
    padding: 15px;
    font-weight: 600;
}

.terms-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.terms-table tbody tr:hover {
    background: linear-gradient(to right, rgba(0, 123, 255, 0.05), rgba(40, 167, 69, 0.03));
}

/* Навигационни бутони - уникални */
.back-link, .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link {
    background: #007bff;
    color: white;
    margin-top: 30px;
}

.back-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.nav-btn {
    min-width: 200px;
    margin-top: 30px;
}

.nav-btn.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.nav-btn.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* УНИКАЛНИ АНИМАЦИИ за pages.css */
@keyframes orderRowFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulseEffect {
    0%,100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Responsive за pages - специфични */
@media (max-width: 768px) {
    #ordersTable { font-size: 0.9rem; }
    #ordersTable thead th, #ordersTable tbody td { padding: 10px; }
    .privacy-container, .terms-container { padding: 20px 15px; }
    .privacy-header h1, .terms-header h1 { font-size: 2rem; }
    .privacy-section, .terms-section { padding: 20px; }
    .nav-btn { min-width: 100%; margin: 5px 0; }
    .stats-card { margin-bottom: 15px; }
}

@media (max-width: 576px) {
    #searchForm { flex-direction: column; }
    #searchForm .form-control, #searchForm .btn-primary {
        border-radius: 8px;
        margin: 5px 0;
        width: 100%;
    }
    .privacy-header, .terms-header { padding: 20px; }
    .privacy-header h1, .terms-header h1 { font-size: 1.5rem; }
}

/* Dark mode за pages - специфични */
@media (prefers-color-scheme: dark) {
    .privacy-section, .terms-section, .terms-table {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    .privacy-section h2, .terms-section h2 {
        color: #ffffff;
        border-bottom-color: #404040;
    }
    .important-note {
        background: linear-gradient(135deg, #332701, #665004);
    }
    .contact-info {
        background: #2d2d2d;
        color: #e0e0e0;
    }
}

/* Print styles за pages - специфични */
@media print {
    .nav-btn, .back-link { display: none !important; }
    .privacy-section, .terms-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}