.coin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* === Page header === */
.coin-page-header {
    margin-bottom: 1.5rem;
}

.coin-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.25rem 0;
}

.coin-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

/* === Stats === */
.coin-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.15rem;
}

/* === Coin grid (index page) === */
.coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.coin-card-link {
    text-decoration: none;
    color: inherit;
}

.coin-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.coin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.coin-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.coin-card-name {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.coin-symbol-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.coin-symbol-badge-lg {
    width: 48px;
    height: 48px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.coin-symbol-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.coin-name-secondary {
    font-size: 0.78rem;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.coin-name {
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
}

/* === Search & Filters === */
.coin-filters {
    margin-bottom: 1.5rem;
}

.coin-filter-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.coin-search-group {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
}

.coin-filter-group {
    min-width: 160px;
}

.coin-filter-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
}

.coin-filter-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    color: #2c3e50;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

.coin-filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.coin-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #dc2626;
    text-decoration: none;
    background: #fee2e2;
    transition: all 0.2s;
    white-space: nowrap;
    height: fit-content;
}

.coin-filter-reset:hover {
    background: #fecaca;
    color: #b91c1c;
}

.coin-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    color: #2c3e50;
    outline: none;
    transition: border-color 0.2s;
}

.coin-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.coin-search-input::placeholder {
    color: #adb5bd;
}

/* === Pagination === */
.coin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.coin-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: #475569;
    background: white;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    position: static;
}

.coin-pagination .page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.coin-pagination .page-current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    pointer-events: none;
}

.coin-pagination .page-dots {
    color: #adb5bd;
    padding: 0 0.25rem;
}

.chain-badge {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
}

.coin-card-body {
    padding: 0.75rem 1.25rem 1rem;
}

.coin-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.meta-item {
    font-size: 0.82rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.coin-card-contract {
    margin-top: 0.5rem;
}

.coin-card-contract code {
    font-size: 0.75rem;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* === Detail page header === */
.coin-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.coin-detail-title {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.coin-detail-title h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
}

.coin-detail-name {
    font-weight: 400;
    font-size: 1.1rem;
    color: #7f8c8d;
}

.coin-disabled-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fee2e2;
    color: #dc2626;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #e2e8f0;
    color: #334155;
}

/* === Admin actions === */
.coin-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coin-toggle-form {
    margin: 0;
}

.btn-disable-coin,
.btn-enable-coin {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-disable-coin {
    background: #fee2e2;
    color: #dc2626;
}

.btn-disable-coin:hover {
    background: #fecaca;
    color: #b91c1c;
}

.btn-enable-coin {
    background: #dcfce7;
    color: #166534;
}

.btn-enable-coin:hover {
    background: #bbf7d0;
    color: #14532d;
}

/* === Info row === */
.coin-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.info-card-label {
    font-size: 0.78rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

/* === Contract block === */
.contract-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.contract-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
}

.contract-value {
    font-size: 0.82rem;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    word-break: break-all;
    font-family: 'Roboto Mono', monospace;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #475569;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* === Sections === */
.coin-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-count {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* === Table === */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
}

.coin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
}

.coin-table thead {
    background-color: #f8f9fa;
}

.coin-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #8a8a9a;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.coin-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.coin-table tbody tr:last-child td {
    border-bottom: none;
}

.coin-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* === Exchange cell === */
.exchange-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exchange-logo-sm {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.exchange-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.exchange-link:hover {
    text-decoration: underline;
    color: #3498db;
}

.tier-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.tier-badge.tier-1 { background-color: #27ae60; }
.tier-badge.tier-2 { background-color: #f39c12; }
.tier-badge.tier-3 { background-color: #e74c3c; }
.tier-badge.tier-4 { background-color: #7f8c8d; }

/* === Trade types === */
.trade-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.trade-type-link {
    text-decoration: none;
    transition: opacity 0.2s;
}

.trade-type-link:hover {
    opacity: 0.8;
}

.trade-type-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
}

.trade-type-badge.trade-type-spot {
    background-color: #dcfce7;
    color: #166534;
}

.trade-type-badge.trade-type-futures,
.trade-type-badge.trade-type-фьючерсы {
    background-color: #fef3c7;
    color: #92400e;
}

.trade-type-delisted {
    text-decoration: line-through;
    opacity: 0.5;
}

/* === API icon inside trade type badge === */
.api-icon {
    margin-left: 0.25rem;
    font-size: 0.7rem;
}

.api-icon-ok {
    color: #166534;
}

.api-icon-partial {
    color: #92400e;
}

/* === Price cells === */
.askbid-cell {
    white-space: nowrap;
}

.askbid-cell .ask,
.askbid-cell .bid {
    display: block;
    font-size: 0.78rem;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.4;
}

.askbid-cell .ask { color: #16a34a; }
.askbid-cell .bid { color: #dc2626; }

/* === Volume === */
.volume-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    font-weight: 500;
}

/* === Funding === */
.funding-rate {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
}

.funding-rate.positive { color: #16a34a; }
.funding-rate.negative { color: #dc2626; }

/* === Max position === */
.max-pos-usd {
    display: block;
    font-size: 0.72rem;
    color: #7f8c8d;
}

/* === Spread cells === */
.spread-pct {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.spread-pct-reverse {
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0.8;
}

.spread-pct.positive,
.spread-pct-reverse.positive { color: #16a34a; }
.spread-pct.negative,
.spread-pct-reverse.negative { color: #dc2626; }

.spread-avg {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.82rem;
    color: #475569;
}

/* === Exchange badges === */
.exchange-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-1 {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-2 {
    background-color: #fef3c7;
    color: #92400e;
}

/* === Time info === */
.time-info {
    font-size: 0.82rem;
    color: #2c3e50;
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.date-info {
    font-size: 0.72rem;
    color: #7f8c8d;
}

/* === Listing dates === */
.listing-dates {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.listing-date-item {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    line-height: 1.3;
}

.listing-date-item .date-main {
    font-size: 0.82rem;
    font-weight: 500;
    color: #2c3e50;
}

.listing-date-item .date-time {
    font-size: 0.72rem;
    color: #7f8c8d;
}

/* === Text muted === */
.text-muted {
    color: #adb5bd;
}

/* === Empty state === */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .coin-container {
        padding: 1rem;
    }

    .coin-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .coin-info-row {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contract-block {
        flex-direction: column;
        align-items: flex-start;
    }
}
