/* Ortak Bileşen CSS'leri - Zero@Design */

/* Renk Tokenları - Bosch Brand Colors */
:root {
    /* Ana Renkler */
    --bosch-green: #005530;
    --bosch-red: #D51635;
    --navy: #02154e;
    --orange: #f9ba00;
    
    /* Sistem Renkleri */
    --bg: #0b1222;
    --panel: #111b34;
    --muted: #8ea0bf;
    --ink: #e6ebff;
    --brand: #3b82f6;
    --brand-color: var(--brand);
    --ok: #16a34a;
    --warn: #f59e0b;
    --alert: #ef4444;
    --pill: #1f2a44;
    --line: #1c2a4d;
    --background: var(--bg);
    
    /* Text Renkleri */
    --text-color: #e6ebff;
    --text-muted: #8ea0bf;
    
    /* Card ve Border Renkleri */
    --card-bg: #111b34;
    --border-color: #1c2a4d;
    --hover-bg: rgba(59, 130, 246, 0.1);
    
    /* Chart Renkleri */
    --chart-blue: #4facfe;
    --chart-red: #ff416c;
    --chart-green: #56ab2f;
    --chart-orange: #f093fb;
    
    /* RGB Değerleri (box-shadow için) */
    --primary-rgb: 59, 130, 246;
}

/* KPI Kartları */
.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.kpi {
    background: linear-gradient(135deg, var(--panel), rgba(59, 130, 246, 0.05));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--bosch-green));
}

.kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kpi-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.kpi-unit {
    color: var(--muted);
    font-size: 0.8rem;
}

/* Pill/Badge Bileşenleri */
.pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill.success {
    background: linear-gradient(135deg, var(--ok), #22c55e);
    color: white;
}

.pill.warning {
    background: linear-gradient(135deg, var(--warn), #fbbf24);
    color: white;
}

.pill.danger {
    background: linear-gradient(135deg, var(--alert), #f87171);
    color: white;
}

.pill.info {
    background: linear-gradient(135deg, var(--brand), #60a5fa);
    color: white;
}

/* Card Bileşenleri */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.card-header h3,
.card-header h5 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

/* Grid Sistemi */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--panel), rgba(59, 130, 246, 0.05));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--bosch-green));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-title {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.stat-unit {
    color: var(--muted);
    font-size: 0.8rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
}

.table-container th {
    background: linear-gradient(135deg, var(--brand), var(--bosch-green));
    color: white;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.table-container tr:hover {
    background: var(--hover-bg);
}

/* Segment Navigation */
.seg {
    background: #0f1a33;
    border-radius: 10px;
    padding: 4px;
    display: inline-flex;
    gap: 2px;
}

.seg button {
    all: unset;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.seg button:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--ink);
}

.seg button.active {
    background: var(--brand);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Form Elements */
.form-control,
.form-select {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), #60a5fa);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--brand);
    color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    color: white;
}

/* Blockchain Status Bileşenleri */
.blockchain-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.blockchain-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.blockchain-card {
    background: linear-gradient(135deg, var(--panel), rgba(59, 130, 246, 0.05));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blockchain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--bosch-green));
}

.blockchain-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-active {
    background-color: var(--ok);
    animation: pulse 2s infinite;
}

.status-inactive {
    background-color: var(--alert);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.metric-card {
    background: var(--panel);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-color), #667eea);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .kpis {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kpis {
        grid-template-columns: 1fr;
    }
}