/* ============================================
   STANDARD COMPONENTS - Consistent Design System
   ============================================ */

/* ====== CARD SYSTEM ====== */

/* Base Card */
.modern-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-lg);
}

/* Card Header - Standart Başlık */
.card-header-modern {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-header-modern h5,
.card-header-modern h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.card-header-modern .header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 14px;
}

/* Card Body */
.card-body-modern {
    padding: 1.5rem;
}

/* Card Title Inside Body */
.card-title-modern {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.card-title-modern i {
    margin-right: 0.5rem;
    font-size: 14px;
}

/* ====== STATISTICS CARDS ====== */

.stat-card-modern {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px var(--shadow-lg);
}

/* Stat Card Layout */
.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.stat-content-wrapper {
    flex: 1;
    min-width: 0;
}

.stat-label-modern {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value-modern {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Stat Icon Color Variants */
.stat-icon-primary {
    background: rgba(59, 125, 221, 0.1);
    color: #3b7ddd;
}

.stat-icon-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stat-icon-success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.stat-icon-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-icon-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
}

/* ====== TABLE SYSTEM ====== */

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table-modern tbody tr:hover {
    background: var(--bg-secondary);
}

.table-modern tbody td {
    padding: 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Table Row Item (Card Style) */
.table-row-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.table-row-card:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px var(--shadow-md);
    border-color: var(--primary);
}

/* ====== PAGINATION SYSTEM ====== */

.pagination-modern {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination-modern .page-item {
    margin: 0;
}

.pagination-modern .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-modern .page-link:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.pagination-modern .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 125, 221, 0.3);
}

.pagination-modern .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====== FILTER BUTTONS ====== */

.filter-group-modern {
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    gap: 0.375rem;
    box-shadow: 0 2px 6px var(--shadow-sm);
    flex-wrap: wrap;
}

.filter-btn-modern {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.filter-btn-modern:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-btn-modern.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(59, 125, 221, 0.25);
}

/* ====== MAP STYLES ====== */

#world-map,
#city-map,
#detail-map {
    height: 100%;
    min-height: 500px;
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {

    #world-map,
    #city-map,
    #detail-map {
        height: 400px;
    }
}

/* ====== INFO BOXES ====== */

.info-box-modern {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.info-box-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-box-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.info-box-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ====== BADGE SYSTEM ====== */

.badge-modern {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
}

.badge-modern i {
    margin-right: 0.375rem;
    font-size: 0.7rem;
}

/* Magnitude Badge - Special Design for Earthquake Lists */
.mag-badge-modern {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(59, 125, 221, 0.1), rgba(59, 125, 221, 0.05));
    border: 2px solid rgba(59, 125, 221, 0.2);
}

.mag-badge-modern .mag-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.mag-badge-modern .mag-unit {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.125rem;
}

/* ====== SECTION HEADERS ====== */

.section-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.section-title-modern i {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 16px;
}

.section-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ====== ICON BOXES ====== */

.icon-box-modern {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.icon-box-lg {
    width: 56px;
    height: 56px;
    font-size: 24px;
}

/* ====== PROGRESS BARS ====== */

.progress-modern {
    height: 8px;
    border-radius: 10px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.progress-bar-modern {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    background: linear-gradient(90deg, var(--primary), #2563aa);
}

/* ====== RESPONSIVE ====== */

@media (max-width: 768px) {
    .stat-card-modern {
        padding: 1rem;
    }

    .stat-value-modern {
        font-size: 1.5rem;
    }

    .pagination-modern .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    .filter-group-modern {
        width: 100%;
        justify-content: center;
    }
}