/*
 * Price List V3 — Clean, Modern, Professional
 * Redesigned for SMM Fastzone
 */

/* ========================================
   LAYOUT
   ======================================== */

.price-list-v3 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hide breadcrumb/header when this page is active */
.page-content:has(.price-list-v3) nav[aria-label="breadcrumb"],
.page-content:has(.price-list-v3) .page-header {
    display: none;
}

/* ========================================
   PAGE HEADER
   ======================================== */

.pl-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border-radius: 18px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.pl-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.pl-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 16px;
}

.pl-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.pl-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    max-width: 420px;
}

.pl-header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 24px;
}

.pl-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pl-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.pl-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pl-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.25);
}

/* ========================================
   FILTERS
   ======================================== */

.pl-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Platform Pills */
.pl-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.pl-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pl-pill:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #6366f1;
}

.pl-pill.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.pl-pill i {
    font-size: 14px;
}

/* Search & Category Row */
.pl-filter-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.pl-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 16px;
    transition: all 0.2s ease;
}

.pl-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pl-search i {
    color: #9ca3af;
    font-size: 14px;
}

.pl-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    padding: 12px 0;
}

.pl-search input::placeholder {
    color: #9ca3af;
}

.pl-category-select {
    min-width: 240px;
}

/* ========================================
   TABLE
   ======================================== */

.pl-table-wrapper {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pl-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 520px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}

.pl-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.pl-table-container::-webkit-scrollbar-track {
    background: transparent;
}

.pl-table-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
}

.pl-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.35);
}

.pl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pl-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pl-table thead th {
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    text-align: left;
    white-space: nowrap;
    background: #f8fafc;
}

.th-id { width: 60px; }
.th-service { min-width: 280px; }
.th-price { width: 140px; }
.th-range { width: 140px; }
.th-action { width: 150px; }

/* Category Row */
.category-row td {
    padding: 0 !important;
    border: none !important;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #ede9fe;
}

.category-name {
    font-size: 13px;
    font-weight: 700;
    color: #4338ca;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-name::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #6366f1;
    border-radius: 2px;
}

.category-count {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 10px;
    border-radius: 99px;
}

/* Service Row */
.service-row td {
    padding: 12px 18px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.service-row:hover {
    background: #fafbff;
}

.service-row:last-child td {
    border-bottom: none;
}

.td-id {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.td-service {
    padding-right: 24px !important;
}

.service-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-name-text {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

.service-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag-refill {
    background: #dcfce7;
    color: #16a34a;
}

.tag-api {
    background: #f3f4f6;
    color: #6b7280;
}

.td-price .price-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

.td-range .range-value {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.td-action {
    white-space: nowrap;
}

.pl-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pl-detail-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.pl-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.pl-order-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Table Footer */
.pl-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    flex-shrink: 0;
}

.pl-result-count {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.pl-result-count span {
    font-weight: 700;
    color: #6366f1;
}

/* Pagination */
.pl-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pg-btn:hover:not(.pg-disabled):not(.pg-active) {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #6366f1;
}

.pg-btn.pg-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.pg-btn.pg-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pg-dots {
    font-size: 13px;
    color: #9ca3af;
    padding: 0 4px;
}

/* Per Page Select */
.pl-per-page {
    flex-shrink: 0;
}

.pl-per-page select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: auto;
}

.pl-per-page select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========================================
   DARK THEME
   ======================================== */

.dark-theme .pl-filters .pl-pill {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

.dark-theme .pl-filters .pl-pill:hover {
    background: #334155;
    border-color: #818cf8;
    color: #c7d2fe;
}

.dark-theme .pl-filters .pl-pill.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.dark-theme .pl-search {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .pl-search:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.dark-theme .pl-search input {
    color: #f1f5f9;
}

.dark-theme .pl-search input::placeholder {
    color: #64748b;
}

.dark-theme .pl-table-wrapper {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.dark-theme .pl-table thead,
.dark-theme .pl-table thead th {
    background: #0f172a;
    border-color: #334155;
    color: #818cf8;
}

.dark-theme .category-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-top: 1px solid #334155;
    border-bottom: 1px solid #2d3a4d;
}

.dark-theme .category-name {
    color: #c7d2fe;
}

.dark-theme .category-name::before {
    background: #818cf8;
}

.dark-theme .category-count {
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
}

.dark-theme .service-row td {
    border-color: #1e293b;
    background: transparent;
}

.dark-theme .service-row:hover td {
    background: #263347;
}

.dark-theme .service-row:hover .price-value,
.dark-theme .service-row:hover .service-name-text,
.dark-theme .service-row:hover .range-value,
.dark-theme .service-row:hover .td-id {
    color: #f1f5f9;
}

.dark-theme .td-id {
    color: #64748b;
}

.dark-theme .service-name-text {
    color: #e2e8f0;
}

.dark-theme .service-tag.tag-refill {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.dark-theme .service-tag.tag-api {
    background: #334155;
    color: #94a3b8;
}

.dark-theme .td-price .price-value {
    color: #f1f5f9;
}

.dark-theme .td-range .range-value {
    color: #64748b;
}

.dark-theme .pl-detail-btn {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

.dark-theme .pl-detail-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.dark-theme .pl-order-btn {
    background: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.dark-theme .pl-order-btn:hover {
    background: #818cf8;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.dark-theme .pl-table-footer {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .pl-result-count {
    color: #94a3b8;
}

.dark-theme .pl-result-count span {
    color: #a5b4fc;
}

.dark-theme .pg-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

.dark-theme .pg-btn:hover:not(.pg-disabled):not(.pg-active) {
    background: #334155;
    border-color: #818cf8;
    color: #c7d2fe;
}

.dark-theme .pg-btn.pg-active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.dark-theme .pl-per-page select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dark-theme .pl-header {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #6d28d9 100%);
}

.dark-theme .pl-header-stats {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.1);
}

.dark-theme .pl-table-container::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .pl-header-content {
        flex-direction: column;
        text-align: center;
    }

    .pl-subtitle {
        max-width: 100%;
    }

    .pl-filter-row {
        flex-direction: column;
    }

    .pl-category-select {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .pl-header {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .pl-title {
        font-size: 20px;
    }

    .pl-filter-pills {
        gap: 6px;
    }

    .pl-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .pl-pill span {
        display: none;
    }

    .pl-pill i {
        font-size: 16px;
    }

    .pl-table thead th {
        padding: 10px 12px;
        font-size: 10px;
    }

    .service-row td {
        padding: 10px 12px !important;
    }

    .th-range {
        display: none;
    }

    .td-range {
        display: none;
    }

    .service-name-text {
        font-size: 12px;
    }

    .pl-detail-btn span {
        display: none;
    }

    .pl-order-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .pl-table-footer {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .pl-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pl-table-container {
        max-height: 400px;
    }

    .pl-filter-row {
        flex-direction: column;
    }

    .pl-per-page {
        width: 100%;
    }

    .pl-per-page select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pl-header-stats {
        width: 100%;
        justify-content: center;
    }

    .th-id {
        display: none;
    }

    .td-id {
        display: none;
    }
}
