/* ==========================================================================
   Barkodlu Arama — özgün tema
   Bootstrap 5 üzerine ince bir katman; marka renkleri ve panel düzeni.
   ========================================================================== */

:root {
    --ba-primary: #1d4ed8;
    --ba-primary-dark: #1e3a8a;
    --ba-accent: #06b6d4;
    --ba-dark: #0f172a;
    --ba-surface: #f6f8fc;
    --ba-sidebar-width: 260px;
}

body {
    background-color: var(--ba-surface);
    color: #1f2937;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.btn-primary {
    --bs-btn-bg: var(--ba-primary);
    --bs-btn-border-color: var(--ba-primary);
    --bs-btn-hover-bg: var(--ba-primary-dark);
    --bs-btn-hover-border-color: var(--ba-primary-dark);
    --bs-btn-disabled-bg: var(--ba-primary);
    --bs-btn-disabled-border-color: var(--ba-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--ba-primary);
    --bs-btn-border-color: var(--ba-primary);
    --bs-btn-hover-bg: var(--ba-primary);
    --bs-btn-hover-border-color: var(--ba-primary);
}

a { color: var(--ba-primary); }

.text-gradient {
    background: linear-gradient(90deg, var(--ba-primary), var(--ba-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Genel sayfa ------------------------------------------------------- */
.public-page main { background: #fff; }

.hero {
    background: radial-gradient(1200px 500px at 10% -10%, rgba(6, 182, 212, .12), transparent 60%),
                radial-gradient(900px 500px at 90% 0, rgba(29, 78, 216, .10), transparent 55%),
                #fff;
    padding: 4.5rem 0 3.5rem;
}

.hero-card {
    display: flex;
    justify-content: center;
}

.hero-card__phone {
    width: 280px;
    padding: 14px;
    border-radius: 32px;
    background: linear-gradient(160deg, var(--ba-primary), var(--ba-accent));
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.hero-card__screen {
    background: #fff;
    border-radius: 22px;
    padding: 1.5rem 1.25rem;
}

.feature-step {
    position: relative;
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.5rem;
}

.feature-step__number {
    position: absolute;
    top: -14px;
    left: 1.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ba-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 700;
}

.cta-panel {
    background: linear-gradient(135deg, rgba(29, 78, 216, .08), rgba(6, 182, 212, .10));
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 3rem 1.5rem;
}

.legal-content h2 { margin-top: 1.75rem; }
.legal-content p, .legal-content li { color: #475569; }

/* --- Kimlik doğrulama --------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    background: radial-gradient(900px 400px at 50% -10%, rgba(29, 78, 216, .10), transparent 60%), var(--ba-surface);
}

/* --- Panel -------------------------------------------------------------- */
.panel-shell { display: flex; min-height: 100vh; }

.panel-sidebar {
    width: var(--ba-sidebar-width);
    flex: 0 0 var(--ba-sidebar-width);
    background: var(--ba-dark);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.panel-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.panel-sidebar__nav { padding: .75rem .5rem; overflow-y: auto; flex-grow: 1; }

.panel-sidebar__link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: .95rem;
}

.panel-sidebar__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.panel-sidebar__link.is-active { background: var(--ba-primary); color: #fff; }
.panel-sidebar__link.is-disabled { opacity: .45; cursor: not-allowed; }
.panel-sidebar__footer { padding: .75rem .5rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); }

.panel-main { flex-grow: 1; min-width: 0; }

.panel-topbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e6ebf3;
    position: sticky;
    top: 0;
    z-index: 5;
}

.stat-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ba-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .85rem;
}

.avatar-circle--lg { width: 96px; height: 96px; font-size: 2rem; }

/* --- Mobil -------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .panel-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1045;
        transform: translateX(-100%);
        transition: transform .2s ease-in-out;
    }

    .panel-sidebar.is-open { transform: translateX(0); }
    .hero { padding-top: 3rem; }
}

/* --- Ziyaretçi (QR) ekranı ---------------------------------------------- */
.visitor-page { background: linear-gradient(180deg, var(--ba-dark) 0 180px, var(--ba-surface) 180px); }

.visitor-shell { min-height: 100vh; }

.visitor-header {
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: center;
}

.visitor-main {
    max-width: 460px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.visitor-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem 1.25rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .14);
}

.visitor-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: rgba(29, 78, 216, .10);
    color: var(--ba-primary);
    font-size: 1.75rem;
}

.visitor-icon--muted { background: rgba(100, 116, 139, .12); color: #64748b; }

.visitor-note {
    text-align: center;
    color: #64748b;
    font-size: .85rem;
    margin: 1rem 0 .25rem;
}

.visitor-footer { text-align: center; font-size: .8rem; color: #94a3b8; }
.visitor-footer a { color: #64748b; text-decoration: none; }

[x-cloak] { display: none !important; }
.w-35 { width: 35%; }

/* --- Görüşme odası ------------------------------------------------------- */
.call-room__stage {
    position: relative;
    background: #0b1220;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 60vh;
    display: grid;
    place-items: center;
}

.call-room__stage--audio { aspect-ratio: 16 / 9; max-height: 240px; }

.call-room__remote { width: 100%; height: 100%; object-fit: cover; background: #0b1220; }

.call-room__local {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, .6);
    background: #111827;
}

.call-room__avatar {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .45);
    font-size: 3.5rem;
}

.call-room__timer {
    position: absolute;
    top: 10px;
    left: 12px;
    background: rgba(15, 23, 42, .65);
    color: #fff;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
}

.call-room__info { margin-top: 1rem; }

.call-room__controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.call-room__controls .btn { width: 56px; height: 56px; }

/* --- Panel: gelen arama uyarısı ------------------------------------------ */
.incoming-calls {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 320px;
}

.incoming-calls__item {
    background: #fff;
    border: 1px solid #e6ebf3;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: .85rem;
}

/* --- Yönetici paneli ------------------------------------------------------ */
.admin-sidebar { background: #1e1b2e; }
.admin-sidebar .panel-sidebar__link.is-active { background: #b91c1c; }
.admin-page .panel-topbar { border-bottom-color: #e2c9c9; }
