/* ==========================================================================
   ABlok Bilisim Servis: marka katmani (theme.css'ten sonra yuklenir)
   Yesil taban, turuncu vurgu. Yalnizca gorunumu degistirir; sinif adlari ve
   davranis ayni kalir. Dis yazi tipi yok (sistem yazi tipleri).
   ========================================================================== */
:root {
    --mayra-red: #126444;
    --mayra-red-dark: #0c4a33;
    --ab-brand: #126444;
    --ab-brand-dark: #0c4a33;
    --ab-brand-soft: #e6f2ec;
    --ab-accent: #f97316;
    --ab-side-1: #0a1f17;
    --ab-side-2: #0e2a20;
    --ink: #0f1f19;
    --muted: #5d6e66;
    --mayra-bg: #f3f6f4;
    --mayra-border: #e1e8e3;
    --surface-soft: #f7faf8;
    --bs-link-color: #126444;
    --bs-link-hover-color: #0c4a33;
    --bs-body-font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-primary: #126444;
    --bs-primary-rgb: 18, 100, 68;
    --bs-focus-ring-color: rgba(249, 115, 22, .35);
}

body.admin-body { background: var(--mayra-bg); }
code { color: var(--ab-brand-dark); background: var(--ab-brand-soft); }

/* ---- kenar cubugu ---- */
.sidebar, .sidebar-offcanvas {
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(18, 100, 68, .45), transparent 65%),
        linear-gradient(180deg, var(--ab-side-2) 0%, var(--ab-side-1) 100%);
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.brand-mark {
    background: linear-gradient(135deg, #1a8a5f, #0c4a33);
    box-shadow: 0 6px 16px -4px rgba(18, 100, 68, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-text small { color: #8fb09f; letter-spacing: .14em; }
.sidebar-link { color: rgba(214, 231, 222, .78); }
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(18, 100, 68, .6), rgba(18, 100, 68, .12));
}
.sidebar-link.active::before { background: var(--ab-accent); }
.sidebar-link.active i { color: #ffb37a; }

/* ---- ust bar ---- */
.topbar { background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---- butonlar ---- */
.btn-danger {
    --bs-btn-bg: var(--ab-brand);
    --bs-btn-border-color: var(--ab-brand);
    --bs-btn-hover-bg: var(--ab-brand-dark);
    --bs-btn-hover-border-color: var(--ab-brand-dark);
    --bs-btn-active-bg: var(--ab-brand-dark);
    --bs-btn-active-border-color: var(--ab-brand-dark);
    --bs-btn-focus-shadow-rgb: 18, 100, 68;
    background-color: var(--ab-brand);
    border-color: var(--ab-brand);
    box-shadow: 0 4px 12px -4px rgba(18, 100, 68, .55);
}
.btn-danger:hover, .btn-danger:focus { background-color: var(--ab-brand-dark); border-color: var(--ab-brand-dark); box-shadow: 0 6px 16px -4px rgba(18, 100, 68, .6); }
.btn-new-intake { background: var(--ab-accent); border-color: var(--ab-accent); color: #1a1208; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .7); }
.btn-new-intake:hover { background: #ea6208; border-color: #ea6208; color: #1a1208; }
.btn-outline-danger { --bs-btn-color: #b3261e; --bs-btn-border-color: #e9b7b3; --bs-btn-hover-bg: #b3261e; --bs-btn-hover-border-color: #b3261e; }
.btn { border-radius: .6rem; font-weight: 500; }
.form-control, .form-select { border-radius: .6rem; border-color: #d3ddd7; }
.form-control:focus, .form-select:focus { border-color: var(--ab-brand); box-shadow: 0 0 0 .22rem rgba(18, 100, 68, .15); }
.form-check-input:checked { background-color: var(--ab-brand); border-color: var(--ab-brand); }
.card-header i.bi:first-child { color: var(--ab-brand); }
.nav-tabs .nav-link.active { color: var(--ab-brand); border-bottom-color: var(--ab-accent); }

/* ---- tablolar ---- */
.table > thead > tr > th {
    font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: #4d5f56; background: #f1f5f2; border-bottom: 1px solid var(--mayra-border);
    padding-block: .8rem;
}
.table > tbody > tr > td { padding-block: .85rem; border-color: #eef2ef; }
.table-hover > tbody > tr:hover > * { --bs-table-hover-bg: #f6faf7; }

/* ---- kullanici sayfasi ---- */
.user-avatar {
    flex: none; width: 40px; height: 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: #fff; letter-spacing: .03em;
    background: linear-gradient(135deg, #1a8a5f, #0c4a33);
}
.user-inactive .user-avatar { background: #a7b3ad; }
.user-inactive td { opacity: .72; }
.user-inactive td:last-child { opacity: 1; }
.status-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .75rem; font-weight: 600; padding: .22rem .65rem; border-radius: 999px;
}
.status-pill i { font-size: .45rem; }
.status-pill-on { color: #0c4a33; background: #e3f3ea; }
.status-pill-on i { color: #1a9a68; }
.status-pill-off { color: #6b7280; background: #eef0f1; }
.status-pill-off i { color: #9ca3af; }
.users-page .modal-content { border: 0; border-radius: 1rem; box-shadow: 0 30px 80px -20px rgba(15, 31, 25, .45); }

/* ---- giris sayfasi ---- */
.login-page, body.auth-body { background: radial-gradient(1000px 480px at 50% -10%, #d8eadf, #f3f6f4); }
.login-card, .auth-card { border: 0; border-radius: 1.1rem; box-shadow: 0 28px 70px -28px rgba(15, 31, 25, .35); }

/* ---- teknik servis kabul formu: modern gorunum ---- */
#intakeForm { counter-reset: step; max-width: 1120px; }
#intakeForm > .card { border-radius: 18px; border: 1px solid var(--mayra-border); box-shadow: 0 2px 4px rgba(15,31,25,.04), 0 14px 32px -18px rgba(15,31,25,.2); overflow: hidden; }
#intakeForm > .card > .card-header {
    counter-increment: step; display: flex; align-items: center; justify-content: flex-start !important; gap: .75rem;
    padding: 1rem 1.25rem; font-size: 1.05rem; font-weight: 700; background: linear-gradient(180deg, #fff, #f7faf8);
}
#intakeForm > .card > .card-header::before {
    content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ab-brand); color: #fff; font-size: .85rem; font-weight: 700;
}
#intakeForm > .card > .card-header .btn { margin-left: auto; }
#intakeForm > .card > .card-body { padding: 1.4rem 1.25rem; }
#intakeForm .form-label { font-size: .82rem; font-weight: 600; color: #2b3a33; margin-bottom: .35rem; }
#intakeForm .form-control:not(textarea):not(.form-control-sm), #intakeForm .form-select { min-height: 46px; }
#intakeForm .form-control, #intakeForm .form-select { border-radius: .7rem; }
#intakeForm textarea.form-control { min-height: 84px; }

.device-row {
    position: relative; background: #fff; border: 1px solid var(--mayra-border) !important; border-radius: 16px !important;
    padding: 1.25rem 1.25rem 1.25rem 1.5rem !important; box-shadow: var(--shadow-sm);
}
.device-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ab-accent); }
.device-row h6 { color: var(--ab-brand) !important; font-weight: 700; }

/* secenekler: onay kutusu / radyo yerine hap (chip) gorunumu */
[data-physical-group] .form-check, [data-password-scope] .form-check { padding: 0; margin: 0; min-height: 0; }
[data-physical-group] .form-check-input, [data-password-scope] .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
[data-physical-group] .form-check-label, [data-password-scope] .form-check-label {
    display: inline-flex; align-items: center; padding: .42rem .9rem; border: 1px solid #d3ddd7; border-radius: 999px;
    background: #fff; font-size: .85rem; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
[data-physical-group] .form-check-label:hover, [data-password-scope] .form-check-label:hover { border-color: var(--ab-brand); background: var(--ab-brand-soft); }
[data-physical-group] .form-check-input:checked + .form-check-label, [data-password-scope] .form-check-input:checked + .form-check-label {
    background: var(--ab-brand-soft); border-color: var(--ab-brand); color: var(--ab-brand-dark); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ab-brand);
}
[data-physical-group] .form-check-input:focus-visible + .form-check-label, [data-password-scope] .form-check-input:focus-visible + .form-check-label { outline: 3px solid rgba(249,115,22,.5); outline-offset: 2px; }
[data-physical-group] .form-check-input:disabled + .form-check-label, [data-password-scope] .form-check-input:disabled + .form-check-label { opacity: .5; cursor: not-allowed; }

.signature-pad { border: 2px dashed #b9cbc1 !important; border-radius: 14px; background: #fbfdfc; max-width: 100%; touch-action: none; }

.intake-actions {
    position: sticky; bottom: 0; z-index: 5; padding: .85rem 0; margin-top: 1rem;
    background: rgba(243, 246, 244, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--mayra-border);
}
.intake-actions .btn-lg { border-radius: .8rem; }
@media (max-width: 575.98px) { .intake-actions { flex-direction: column; } .intake-actions .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Bootstrap'in .d-flex / .btn-group vb. !important kurallari hidden ozelligini eziyordu */
[hidden] { display: none !important; }
