/* ============================================================
   Kütüphane Oda Takip — özel stiller
   style.css'in üzerine eklenir
   ============================================================ */

/* ---------- Oda grid (kart görünümü) ---------- */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 8px 0;
}

.room-card {
    position: relative;
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease, background .5s ease;
    overflow: hidden;
    cursor: pointer;
}
.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.room-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.room-card__code {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.5px;
}
.room-card__name {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}
.room-card__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.room-card__occupants {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.room-card__occupants i { font-size: 18px; color: #6366f1; }
.room-card__time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #111827;
}

.room-card__foot {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

/* ---------- Durum renkleri ---------- */
.room-card--idle {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-color: #e5e7eb;
}
.room-card--idle .room-card__badge { background: #e5e7eb; color: #4b5563; }

.room-card--ok {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #10b981;
}
.room-card--ok .room-card__badge { background: #10b981; color: #fff; }
.room-card--ok .room-card__time { color: #065f46; }

.room-card--warn {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #f59e0b;
}
.room-card--warn .room-card__badge { background: #f59e0b; color: #fff; }
.room-card--warn .room-card__time { color: #92400e; }

.room-card--critical {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
}
.room-card--critical .room-card__badge { background: #ef4444; color: #fff; }
.room-card--critical .room-card__time { color: #991b1b; }
.room-card--critical.room-card--blink {
    animation: room-blink 1s ease-in-out infinite;
}

.room-card--single {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2), 0 6px 20px rgba(234, 88, 12, 0.25);
    animation: single-pulse 2s ease-in-out infinite;
}
.room-card--single .room-card__badge { background: #ea580c; color: #fff; }
.room-card--single .room-card__time { color: #7c2d12; }

@keyframes room-blink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
@keyframes single-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* ---------- Oda kroki (plan view) ---------- */
.floor-plan {
    position: relative;
    width: 100%;
    padding-bottom: 55%; /* 16:9 hafif basık */
    background: repeating-linear-gradient(
        45deg,
        #f9fafb,
        #f9fafb 12px,
        #f3f4f6 12px,
        #f3f4f6 24px
    );
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}
.floor-plan__room {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    transition: transform .15s ease, background .5s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.floor-plan__room:hover { transform: scale(1.02); z-index: 2; }
.floor-plan__room .plan-code {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.floor-plan__room .plan-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    margin-top: 2px;
    background: rgba(0,0,0,0.25);
    padding: 1px 8px;
    border-radius: 6px;
}
.floor-plan__room .plan-people {
    font-size: 11px;
    margin-top: 4px;
    opacity: .9;
}

/* Plan — duruma göre */
.plan-idle { background: #9ca3af; }
.plan-ok { background: linear-gradient(135deg, #10b981, #059669); }
.plan-warn { background: linear-gradient(135deg, #f59e0b, #d97706); }
.plan-critical { background: linear-gradient(135deg, #ef4444, #b91c1c); animation: room-blink 1s infinite; }
.plan-single {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    animation: single-pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.3), 0 6px 16px rgba(234, 88, 12, 0.4);
}

/* Layout editor */
.floor-plan--editor .floor-plan__room {
    cursor: move;
    outline: 2px dashed rgba(255,255,255,0.5);
}

/* ---------- Üye kartı (arama ekranı) ---------- */
.member-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: border-color .15s;
}
.member-card:hover { border-color: #6366f1; }
.member-card__photo {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}
.member-card__photo.placeholder {
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 24px;
}
.member-card__body { flex: 1; min-width: 0; }
.member-card__name { font-weight: 600; color: #111827; }
.member-card__meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.member-card__notes { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.note-chip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
}
.note-chip.warning { background: #fef3c7; color: #92400e; }
.note-chip.incident { background: #fee2e2; color: #991b1b; }
.badge-status.ACTIVE { background: #e5e7eb; color: #374151; }
.badge-status.WHITELIST { background: #d1fae5; color: #065f46; }
.badge-status.BLACKLIST { background: #fee2e2; color: #991b1b; }

/* ---------- Oturum detayı ---------- */
.session-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
}
.session-timer.warn { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #92400e; }
.session-timer.critical { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #991b1b; animation: room-blink 1s infinite; }
