/* Rapor ayarları paneli (DeviceReportSettingsPanel) ve açma/kapama anahtarı boyutu.
   Ayrı dosyada tutulur: app-ui.css başka düzenlemelerde yeniden yazıldığında bu stiller kaybolmasın. */

/* Açma/kapama anahtarı: proje genelinde kompakt boyut (Metronic varsayılanı 2,75x1,75rem fazla büyüktü) */
.form-check.form-switch .form-check-input,
.form-switch.form-check-custom .form-check-input,
.form-check.form-check-custom.form-check-solid.form-switch .form-check-input {
    width: 2rem !important;
    height: 1.1rem !important;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.form-check.form-switch,
.form-switch.form-check-custom {
    min-height: 1.3rem;
}

.drp-intro { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.9rem; margin-bottom: 0.9rem; background: #f4f8ff; border: 1px solid #dbe7fb; border-radius: 0.6rem; color: #3f4254; font-size: 0.85rem; line-height: 1.45; }
.drp-intro__icon { color: var(--bs-primary, #1b84ff); font-size: 1.2rem; line-height: 1.3; }
.drp-intro__title { font-weight: 600; color: #181c32; margin-bottom: 0.15rem; }
.drp-card { background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; margin-bottom: 0.9rem; }
.drp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.7rem 1rem; border-bottom: 1px solid #eff1f6; }
.drp-card__title { margin: 0; font-size: 1rem; font-weight: 600; color: #181c32; display: flex; align-items: center; gap: 0.45rem; }
.drp-card__title i { color: var(--bs-primary, #1b84ff); font-size: 1.15rem; }
.drp-card__body { padding: 0.9rem 1rem; }
.drp-card__foot { display: flex; justify-content: flex-end; padding: 0.6rem 1rem; border-top: 1px solid #eff1f6; }
.drp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
.drp-switch-row { margin-bottom: 0.7rem; }
.drp-switch-row .form-check { margin-bottom: 0.1rem; }
.drp-hint { color: #7e8299; font-size: 0.8rem; margin-top: 0.1rem; }
.drp-time { max-width: 9rem; }
.drp-emails { min-height: 6rem; resize: vertical; }
@media (max-width: 991.98px) { .drp-grid { grid-template-columns: 1fr; } }

/* ---- Onay kutusu: proje genelinde küçük, yuvarlak köşeli, mavi işaretli ---- */
.form-check:not(.form-switch) > .form-check-input[type="checkbox"],
.form-check-input[type="checkbox"]:not(.form-switch .form-check-input) {
    width: 1.05rem !important;
    height: 1.05rem !important;
    margin-top: 0.12rem;
    border-radius: 0.3rem !important;
    border: 1.5px solid #c5cad6 !important;
    background-color: #fff !important;
    background-size: 70% 70% !important;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-check:not(.form-switch) > .form-check-input[type="checkbox"]:hover:not(:disabled) { border-color: var(--bs-primary, #1b84ff) !important; }
.form-check:not(.form-switch) > .form-check-input[type="checkbox"]:focus { box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 27, 132, 255), 0.15) !important; }
.form-check:not(.form-switch) > .form-check-input[type="checkbox"]:checked,
.form-check:not(.form-switch) > .form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--bs-primary, #1b84ff) !important;
    border-color: var(--bs-primary, #1b84ff) !important;
}
.form-check:not(.form-switch) > .form-check-input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
.form-check .form-check-label { font-size: 0.85rem; }

/* ---- Endeks / Akım-Gerilim tabloları: küçük yazı, sıkı satır ---- */
.table.mx-table thead th { font-size: 0.75rem !important; padding: 0.5rem 0.75rem !important; }
.table.mx-table tbody td { font-size: 0.78rem !important; padding: 0.42rem 0.75rem !important; line-height: 1.25 !important; }
.table.mx-table tbody td:first-child { font-size: 0.75rem !important; }
.table.mx-table .badge { font-size: 0.75rem !important; padding: 0.15rem 0.45rem !important; }
.app-mobile-scroll-host .mx-toolbar__title { font-size: 0.85rem; }

/* ---- Rapor paneli: küçültülmüş yazı ve proje stilinde alanlar ---- */
.device-report-panel { font-size: 0.82rem; }
.device-report-panel .app-label { font-size: 0.78rem; margin-bottom: 0.3rem; }
.device-report-panel .form-check-label { font-size: 0.82rem; }
.drp-intro { font-size: 0.78rem; }
.drp-card__title { font-size: 0.9rem; }
.drp-hint { font-size: 0.75rem; }
.device-report-panel table { font-size: 0.78rem; }
.drp-input {
    height: 2.1rem; padding: 0 0.7rem; font-size: 0.8rem; color: #3f4254;
    background: #f9fafc; border: 1px solid #e1e3ea; border-radius: 0.5rem; outline: none; box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease; min-width: 0;
}
.drp-input:hover:not(:disabled) { border-color: #c5cad6; }
.drp-input:focus { border-color: var(--bs-primary, #1b84ff); background: #fff; box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 27, 132, 255), 0.12); }
.drp-input:disabled { opacity: 0.6; }
input.drp-input[type="date"], input.drp-input[type="month"], input.drp-input[type="time"] { width: 9.5rem; }
input.drp-input[type="time"] { width: 7.5rem; }
select.drp-input { padding-right: 1.6rem; width: 8rem; }
textarea.drp-input { height: auto; padding: 0.5rem 0.7rem; line-height: 1.4; }
.drp-manual { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }
.drp-manual__field { display: flex; flex-direction: column; }
.drp-manual__check { display: flex; align-items: center; height: 2.1rem; }
.drp-manual__check .form-check { margin: 0; display: flex; align-items: center; gap: 0.4rem; }

/* ---- Akım / Gerilim: son gelen değerler kartı ---- */
.vt-latest { border: 1px solid #e1e3ea; border-radius: 0.7rem; background: #fff; margin-bottom: 1rem; overflow: hidden; }
.vt-latest__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 1rem; background: #f7f9fc; border-bottom: 1px solid #eff1f6; }
.vt-latest__title { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; font-weight: 600; color: #181c32; }
.vt-latest__title i { color: var(--bs-primary, #1b84ff); font-size: 1.1rem; }
.vt-latest__time { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #5e6278; font-variant-numeric: tabular-nums; }
.vt-latest__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #17c653; box-shadow: 0 0 0 0.2rem rgba(23, 198, 83, 0.18); }
.vt-latest__groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0.9rem 1rem; }
.vt-latest__group-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #7e8299; margin-bottom: 0.45rem; }
.vt-latest__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.vt-tile { --vt-c: #1b84ff; border: 1px solid #e9ecf3; border-radius: 0.6rem; padding: 0.5rem 0.65rem 0.4rem; background: #fff; color: var(--vt-c); }
.vt-tile--ok { --vt-c: #17c653; } .vt-tile--warn { --vt-c: #f6a800; } .vt-tile--bad { --vt-c: #f8285a; } .vt-tile--off { --vt-c: #a1a5b7; } .vt-tile--info { --vt-c: #1b84ff; }
.vt-tile__top { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; }
.vt-tile__phase { font-weight: 700; color: #3f4254; }
.vt-tile__state { font-weight: 600; color: var(--vt-c); }
.vt-tile__value { font-size: 1.3rem; font-weight: 700; color: #181c32; line-height: 1.3; font-variant-numeric: tabular-nums; }
.vt-tile__value small { font-size: 0.75rem; font-weight: 600; color: #7e8299; margin-left: 0.2rem; }
.vt-tile__bar { height: 0.3rem; border-radius: 1rem; background: #eef0f6; overflow: hidden; margin: 0.15rem 0 0.35rem; }
.vt-tile__bar span { display: block; height: 100%; border-radius: 1rem; background: var(--vt-c); }
.vt-tile__spark { display: block; width: 100%; height: 1.5rem; color: var(--vt-c); opacity: 0.85; }
@media (max-width: 991.98px) { .vt-latest__groups { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .vt-latest__tiles { grid-template-columns: 1fr; } }

/* ---- Sayaç / Analizör "Detay" sekmesi ---- */
.dt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: start; }
.dt-card { background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; overflow: hidden; }
.dt-card--wide { max-width: 60rem; }
.dt-card__head { display: flex; align-items: center; gap: 0.45rem; padding: 0.65rem 1rem; border-bottom: 1px solid #eff1f6; background: #f7f9fc; font-size: 0.88rem; font-weight: 600; color: #181c32; }
.dt-card__head i { color: var(--bs-primary, #1b84ff); font-size: 1.1rem; }
.dt-card__sub { margin-left: auto; font-size: 0.78rem; font-weight: 500; color: #7e8299; }
.dt-list { margin: 0; padding: 0.3rem 1rem 0.5rem; }
.dt-list--grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
.dt-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px dashed #eceff5; }
.dt-row:last-child { border-bottom: 0; }
.dt-row dt { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.78rem; font-weight: 500; color: #7e8299; }
.dt-row dt i { font-size: 1rem; color: #a1a5b7; }
.dt-row dd { margin: 0; font-size: 0.82rem; font-weight: 600; color: #181c32; text-align: right; word-break: break-word; }
@media (max-width: 1199.98px) { .dt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .dt-grid, .dt-list--grid { grid-template-columns: 1fr; } }

/* ---- Cihaz detay tabloları (SCADA detay vb.): küçük yazı, ince çizgi, yuvarlak köşe ---- */
.table.cd-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #e1e3ea; border-radius: 0.7rem; overflow: hidden; margin-bottom: 0; }
.table.cd-table thead th { padding: 0.5rem 0.75rem !important; background: #f7f8fb; border: 0 !important; border-bottom: 1px solid #e1e3ea !important; font-size: 0.75rem !important; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #7e8299; white-space: nowrap; }
.table.cd-table tbody td { padding: 0.42rem 0.75rem !important; border: 0 !important; border-bottom: 1px solid #f1f3f9 !important; font-size: 0.78rem !important; line-height: 1.25; color: #3f4254; font-variant-numeric: tabular-nums; vertical-align: middle; }
.table.cd-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.table.cd-table tbody tr:hover td { background: #f1f6ff; }
.table.cd-table tbody tr:last-child td { border-bottom: 0 !important; }
.table.cd-table .badge { font-size: 0.75rem !important; padding: 0.15rem 0.45rem !important; }

/* ===== Ayar sayfaları (sp-*): iki sütunlu kart düzeni ===== */
.sp-page { display: flex; flex-direction: column; gap: 0.9rem; }
.sp-hero { display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; padding: 0.85rem 1.1rem; }
.sp-hero__icon { width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; background: #eef4ff; color: var(--bs-primary, #1b84ff); display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.sp-hero h1 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #181c32; }
.sp-hero p { margin: 0.1rem 0 0; font-size: 0.8rem; color: #7e8299; }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; align-items: start; }
.sp-card { background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; overflow: hidden; }
.sp-card__head { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.75rem 1rem; border-bottom: 1px solid #eff1f6; background: #f7f9fc; }
.sp-card__head > i { color: var(--bs-primary, #1b84ff); font-size: 1.25rem; margin-top: 0.1rem; }
.sp-card__title { margin: 0; font-size: 0.95rem; font-weight: 600; color: #181c32; }
.sp-card__desc { margin: 0.15rem 0 0; font-size: 0.78rem; color: #7e8299; line-height: 1.35; }
.sp-card__body { padding: 0.9rem 1rem; }
.sp-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 1rem; border-top: 1px solid #eff1f6; background: #fcfcfd; font-size: 0.78rem; color: #7e8299; }
.sp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem 1rem; }
.sp-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-field label { display: block; margin-bottom: 0.25rem; font-size: 0.8rem; font-weight: 600; color: #3f4254; }
.sp-field .form-text, .sp-field .sp-hint { margin-top: 0.2rem; font-size: 0.75rem; color: #7e8299; }
.sp-field input[type=number], .sp-field input[type=text], .sp-field select { width: 100%; }
.sp-note { display: flex; gap: 0.5rem; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; border-radius: 0.55rem; background: #f4f8ff; border: 1px solid #dbe8ff; font-size: 0.78rem; color: #4b5675; }
.sp-note i { color: var(--bs-primary, #1b84ff); font-size: 1.05rem; }
.sp-empty { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 2rem 1rem; color: #7e8299; font-size: 0.82rem; text-align: center; }
.sp-empty i { font-size: 2rem; color: #a1a5b7; }
@media (max-width: 1199px) { .sp-grid { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .sp-fields, .sp-fields--3 { grid-template-columns: 1fr; } }

/* ===== Bayi detay ===== */
.dl-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; padding: 1rem 1.2rem; margin-bottom: 0.9rem; }
.dl-hero__logo { width: 4.6rem; height: 4.6rem; border-radius: 0.8rem; object-fit: cover; border: 1px solid #eff1f6; background: #f7f9fc; }
.dl-hero__main { flex: 1 1 18rem; min-width: 0; }
.dl-hero__name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.dl-hero__name h2 { margin: 0; font-size: 1.25rem; font-weight: 700; color: #181c32; }
.dl-hero__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.4rem; font-size: 0.8rem; color: #7e8299; }
.dl-hero__meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.dl-hero__meta i { font-size: 0.95rem; color: #a1a5b7; }
.dl-hero__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 0.9rem; }
.dl-stat { background: #fff; border: 1px solid #e1e3ea; border-radius: 0.7rem; padding: 0.65rem 0.9rem; }
.dl-stat__label { font-size: 0.75rem; color: #7e8299; text-transform: uppercase; letter-spacing: 0.02em; }
.dl-stat__value { margin-top: 0.15rem; font-size: 1.15rem; font-weight: 700; color: #181c32; }
.dl-tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid #e1e3ea; margin-bottom: 0.9rem; }
.dl-tab { border: 0; background: none; padding: 0.55rem 0.8rem; font-size: 0.85rem; font-weight: 600; color: #7e8299; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 0.35rem; }
.dl-tab:hover { color: #181c32; }
.dl-tab.active { color: var(--bs-primary, #1b84ff); border-bottom-color: var(--bs-primary, #1b84ff); }
@media (max-width: 575px) { .dl-stats { grid-template-columns: 1fr; } }

/* ===== İnverter modelleri ===== */
.im-layout { display: grid; grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr); gap: 0.9rem; align-items: start; }
.im-brand-list { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.7rem; }
.im-brand { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.6rem; border: 1px solid transparent; border-radius: 0.55rem; cursor: pointer; transition: background .12s, border-color .12s; }
.im-brand:hover { background: #f7f9fc; }
.im-brand.is-active { background: #eef4ff; border-color: #cfe0ff; }
.im-brand__name { display: flex; align-items: center; gap: 0.4rem; min-width: 0; font-size: 0.86rem; font-weight: 600; color: #181c32; }
.im-brand__name i { color: #a1a5b7; font-size: 1rem; }
.im-brand.is-active .im-brand__name i { color: var(--bs-primary, #1b84ff); }
.im-brand__actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.im-add { margin: 0 0.7rem 0.7rem; }
.im-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.8rem; }
.im-table th { padding: 0.5rem 0.75rem; background: #f7f8fb; color: #7e8299; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; border-bottom: 1px solid #e1e3ea; text-align: left; }
.im-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #eff1f6; vertical-align: middle; }
.im-table tbody tr { cursor: pointer; }
.im-table tbody tr:hover { background: #f1f6ff; }
.im-table tbody tr.is-active { background: #eef4ff; }
.im-table tbody tr:last-child td { border-bottom: 0; }
.im-form { display: grid; gap: 0.85rem; }
.im-form .form-text { font-size: 0.75rem; }
.im-switch { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0.8rem; border: 1px solid #e1e3ea; border-radius: 0.55rem; background: #f9fafc; font-size: 0.82rem; font-weight: 600; color: #3f4254; }
@media (max-width: 991px) { .im-layout { grid-template-columns: 1fr; } }

.sp-fields--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199px) { .sp-fields--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .sp-fields--4 { grid-template-columns: 1fr; } }

.sp-note--warn { background: #fff8e8; border-color: #ffe5a8; }
.sp-note--warn i { color: #f6a800; }
.sp-note a { color: var(--bs-primary, #1b84ff); }

.sp-formula { display: flex; flex-direction: column; gap: 0.4rem; }
.sp-formula code { display: block; padding: 0.45rem 0.7rem; border-radius: 0.5rem; background: #f4f6fa; border: 1px solid #eceff5; color: #3f4254; font-size: 0.78rem; }
.sp-card .app-mobile-list { padding: 0.7rem; }
