/* App-wide custom styles */

/* Drawer Header */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    background-color: white;
}

.drawer-logo {
    max-height: 96px;
    max-width: 100%;
    object-fit: contain;
}

/* Firma Select in AppBar */
.firma-select {
    max-width: 250px;
    margin: 0 8px;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

.firma-select:focus {
    outline: none;
    border-color: #5a6f3a;
    box-shadow: 0 0 0 2px rgba(90, 111, 58, 0.2);
}

.firma-select option {
    padding: 8px;
}

/* Protokol Defteri & Muayene Kayıtları - İş Kazası satır rengi */
.is-kazasi-row td {
    background-color: #FFF3E0 !important;
}

/* === İşçi Kayıt Durumu Kartı === */
.er-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
}
.er-status-card:focus-visible { outline: 2px solid #5a6f3a; outline-offset: 2px; }
.er-status-card.is-active  { border-color: #8fb569; background: #f2f5ee; }
.er-status-card.is-passive { border-color: #d1d5db; background: #f9fafb; }

.er-status-led {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
}
.er-status-card.is-active .er-status-led {
    background: #5a6f3a;
    box-shadow: 0 0 0 4px rgba(90, 111, 58, 0.18);
    animation: erPulseLed 2s ease-in-out infinite;
}
.er-status-card.is-passive .er-status-led {
    background: #9ca3af;
    box-shadow: 0 0 0 4px rgba(156, 163, 175, 0.18);
}
@keyframes erPulseLed {
    0%, 100% { box-shadow: 0 0 0 4px rgba(90, 111, 58, 0.18); }
    50%       { box-shadow: 0 0 0 7px rgba(90, 111, 58, 0.05); }
}

.er-status-text { display: flex; flex-direction: column; gap: 1px; }
.er-status-lbl {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    font-weight: 600;
}
.er-status-val { font-size: 13px; font-weight: 600; color: #374151; }
.er-status-card.is-passive .er-status-val { color: #6b7280; }
.er-status-card.is-active  .er-status-val { color: #5a6f3a; }

.er-iswitch {
    position: relative;
    width: 42px; height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    border: 1px solid #9ca3af;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.er-iswitch::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.er-status-card.is-active .er-iswitch { background: #5a6f3a; border-color: #5a6f3a; }
.er-status-card.is-active .er-iswitch::after { transform: translateX(18px); }

/* === İşçi VKİ (BMI) Göstergesi === */
.er-bmi-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.er-bmi-head { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.er-bmi-label {
    font-size: 11.5px; font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.er-bmi-value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.er-bmi-unit  { font-size: 11px; color: #6b7280; font-weight: 500; margin-left: 4px; }
.er-bmi-status {
    font-size: 12px; font-weight: 600;
    padding: 3px 8px; border-radius: 999px; letter-spacing: 0.01em;
}
.er-bmi-status[data-cat="under"] { background: oklch(0.93 0.06 240); color: oklch(0.4 0.15 240); }
.er-bmi-status[data-cat="normal"]{ background: oklch(0.93 0.08 155); color: oklch(0.38 0.13 155); }
.er-bmi-status[data-cat="over"]  { background: oklch(0.93 0.07 75);  color: oklch(0.42 0.13 75); }
.er-bmi-status[data-cat="obese"] { background: oklch(0.93 0.06 25);  color: oklch(0.45 0.16 25); }
.er-bmi-status[data-cat="none"]  { background: #f3f4f6; color: #9ca3af; }

.er-bmi-bar {
    position: relative;
    height: 10px; border-radius: 999px; overflow: visible;
    background: linear-gradient(to right,
        oklch(0.7 0.13 240) 0%,   oklch(0.7 0.13 240) 18.5%,
        oklch(0.7 0.16 155) 18.5%, oklch(0.7 0.16 155) 41.7%,
        oklch(0.75 0.16 75) 41.7%, oklch(0.75 0.16 75) 58.3%,
        oklch(0.65 0.18 25) 58.3%, oklch(0.65 0.18 25) 100%);
}
.er-bmi-marker {
    position: absolute; top: -4px; bottom: -4px; width: 4px;
    background: #1f2937;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 0 2px #ffffff, 0 2px 6px rgba(0,0,0,0.25);
}
.er-bmi-marker[data-empty="true"] { display: none; }

.er-bmi-scale {
    display: grid;
    grid-template-columns: 18.5fr 23.2fr 16.6fr 41.7fr;
    font-size: 10px; color: #9ca3af; font-family: monospace;
}
.er-bmi-scale span { padding: 0 2px; }
.er-bmi-scale span:not(:first-child) { border-left: 1px dashed #e5e7eb; }

.er-bmi-legend {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4px 10px; font-size: 11px; color: #6b7280;
}
.er-bmi-legend .lg-item { display: flex; align-items: center; gap: 6px; }
.er-bmi-legend .lg-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* === Detay sayfası etiket/değer tabloları (Isciler/Detay + MuayeneDetay ortak) === */
.detay-lbl {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 11px;
    padding: 5px 8px;
    border: 1px solid rgba(0,0,0,0.1);
    white-space: nowrap;
    width: 1%;
}
.detay-val {
    padding: 5px 10px;
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 13px;
}
