* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Open Sans", "Segoe UI", sans-serif;
    background: linear-gradient(145deg, #2f3850 0%, #3d4a6e 45%, #2a3148 100%);
    color: #eef1f7;
}

.sf-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.sf-page-wide {
    max-width: 560px;
}

.sf-facility-title h1 {
    margin: 10px 0 6px;
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.sf-facility-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.45);
    color: #a8f0c6;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sf-field {
    margin-bottom: 18px;
}

.sf-field-icon {
    margin-right: 6px;
}

.sf-icon-water {
    color: #3498db;
}

.sf-icon-electric {
    color: #f1c40f;
}

.sf-icon-pressure {
    color: #e67e22;
}

.sf-input-group {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.sf-input-group .sf-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    flex: 1;
}

.sf-unit {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #eef1f7;
    border: 2px solid #d8deea;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7894;
    white-space: nowrap;
}

.sf-input-group .sf-input:focus {
    border-right: none;
}

.sf-input-group .sf-input:focus + .sf-unit {
    border-color: #3d4a6e;
}

.sf-header h1 {
    margin: 12px 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.sf-header h1 .fa-microphone {
    color: #2ecc71;
    margin-right: 8px;
}

.sf-lead {
    margin: 0;
    color: #c5cde0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sf-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9eb8ff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.sf-back:hover {
    color: #fff;
}

.sf-card {
    margin-top: 24px;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    color: #2a3148;
}

.sf-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3d4a6e;
}

.sf-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d8deea;
    border-radius: 8px;
    font-size: 1.05rem;
    outline: none;
    transition: border-color 0.2s;
}

.sf-input:focus {
    border-color: #3d4a6e;
}

.sf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.sf-btn {
    flex: 1 1 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.sf-btn:active {
    transform: scale(0.98);
}

.sf-btn-primary {
    background: #3d4a6e;
    color: #fff;
}

.sf-btn-primary:hover {
    background: #2f3850;
}

.sf-btn-secondary {
    background: #eef1f7;
    color: #3d4a6e;
    border: 2px solid #d8deea;
}

.sf-btn-secondary:hover {
    background: #e2e8f2;
}

.sf-btn-tesis-ekle {
    background: rgba(241, 196, 15, 0.18);
    color: #7d6608;
    border: 2px solid rgba(241, 196, 15, 0.55);
    text-decoration: none;
}

.sf-btn-tesis-ekle:hover {
    background: rgba(241, 196, 15, 0.32);
    color: #5d4e06;
}

.sf-btn-tesis-ekle .fa {
    color: #b7950b;
}

.sf-btn-icon {
    border: none;
    background: transparent;
    color: #3d4a6e;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
}

.sf-barkod-panel {
    margin-top: 20px;
    padding: 14px;
    border: 2px dashed #c5cde0;
    border-radius: 10px;
    background: #f7f9fc;
}

.sf-barkod-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
    color: #3d4a6e;
}

#barkodReader {
    width: 100%;
    min-height: 240px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.sf-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #6b7894;
}

.sf-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.sf-message.is-info {
    display: block;
    background: #e8f4fd;
    color: #1a5276;
    border: 1px solid #aed6f1;
}

.sf-message.is-success {
    display: block;
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.sf-message.is-error {
    display: block;
    background: #fdedec;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

.sf-footnote {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #a7b0bf;
}

@media (max-width: 480px) {
    .sf-actions {
        flex-direction: column;
    }

    .sf-btn {
        width: 100%;
    }
}

/* ========== Saha operatörü / sesli giriş modu ========== */
.sf-operator {
    -webkit-tap-highlight-color: transparent;
    position: relative;
    min-height: 100vh;
    background-color: #2a3148;
    isolation: isolate;
}

.sf-operator::before {
    content: "";
    position: fixed;
    inset: -16px;
    z-index: -2;
    background: url("../img/sesli-form-factory-bg.jpg") center center / cover no-repeat;
    filter: blur(8px) saturate(0.9) brightness(0.72);
    transform: scale(1.04);
    pointer-events: none;
}

.sf-operator::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        165deg,
        rgba(26, 34, 54, 0.58) 0%,
        rgba(42, 49, 72, 0.64) 48%,
        rgba(32, 40, 62, 0.68) 100%
    );
    pointer-events: none;
}

.sf-operator .sf-page {
    position: relative;
    z-index: 1;
}

.sf-page-operator {
    max-width: 640px;
    padding: 16px 12px 32px;
}

.sf-header-operator .sf-facility-title h1 {
    font-size: clamp(1.4rem, 5vw, 1.85rem);
    margin-top: 14px;
}

.sf-facility-badge-lg {
    padding: 10px 16px;
    font-size: 1rem;
}

.sf-lead-operator {
    font-size: 1.05rem;
    line-height: 1.55;
}

.sf-back-operator {
    font-size: 1rem;
    padding: 8px 0;
    min-height: 44px;
    align-items: center;
}

.sf-voice-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(46, 204, 113, 0.15);
    border: 2px solid rgba(46, 204, 113, 0.35);
    color: #d5f5e3;
    font-size: 0.95rem;
    line-height: 1.45;
}

.sf-voice-banner .fa-microphone {
    font-size: 1.4rem;
    color: #2ecc71;
    margin-top: 2px;
    flex-shrink: 0;
}

.sf-btn-continuous-voice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 14px;
    min-height: 64px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(145deg, #3d4a6e, #2f3850);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.1s, background 0.2s;
}

.sf-btn-continuous-voice .fa-microphone {
    font-size: 1.5rem;
}

.sf-btn-continuous-voice.is-active {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    animation: sf-pulse 1.2s ease-in-out infinite;
}

.sf-operator-field.is-voice-active,
.sf-operator-field.is-selected {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.35);
    background: #fff5f5;
}

.sf-operator-field.is-voice-active .sf-input-operator,
.sf-operator-field.is-selected .sf-input-operator {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.22);
}

.sf-operator-field.is-voice-active .sf-label-operator::after,
.sf-operator-field.is-selected .sf-label-operator::after {
    content: ' ← aktif, numarayı söyleyin';
    color: #c0392b;
    font-size: 0.85em;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
}

.sf-operator-field--tesis {
    border-left: 6px solid #3d4a6e;
}

.sf-operator-field.is-listening {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.35);
    background: #fff5f5;
}

.sf-card-operator {
    margin-top: 16px;
    padding: 20px 16px 24px;
    border-radius: 16px;
}

.sf-operator-field {
    margin-bottom: 22px;
    padding: 16px 14px;
    border-radius: 14px;
    border: 2px solid #e2e8f2;
    background: #f8fafc;
}

.sf-operator-field--water {
    border-left: 6px solid #3498db;
}

.sf-operator-field--electric {
    border-left: 6px solid #f1c40f;
}

.sf-operator-field--pressure {
    border-left: 6px solid #e67e22;
}

.sf-label-operator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.sf-operator-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sf-operator-field--water .sf-operator-icon {
    color: #3498db;
}

.sf-operator-field--electric .sf-operator-icon {
    color: #d4ac0d;
}

.sf-operator-field--pressure .sf-operator-icon {
    color: #e67e22;
}

.sf-operator-input-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: stretch;
}

.sf-operator-input-row--single {
    grid-template-columns: 1fr auto;
    margin-bottom: 12px;
}

.sf-input-filled {
    border-color: #2ecc71;
    background: #f0fff4;
}

.sf-input-operator {
    min-height: 72px;
    padding: 16px 18px;
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
    border-width: 3px;
    border-radius: 12px;
    background: #fff;
    color: #1a2236;
}

.sf-input-operator:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2);
}

.sf-input-operator::placeholder {
    color: #b8c2d4;
    font-weight: 600;
}

.sf-unit-operator {
    min-width: 64px;
    padding: 0 16px;
    font-size: 1.1rem;
    font-weight: 800;
    border-width: 3px;
    border-radius: 12px;
    background: #eef1f7;
    justify-content: center;
}

.sf-btn-voice {
    width: 72px;
    min-height: 72px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}

.sf-btn-voice:active {
    transform: scale(0.96);
}

.sf-btn-voice.is-listening {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.45);
    animation: sf-pulse 1s ease-in-out infinite;
}

@keyframes sf-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.sf-voice-status {
    min-height: 24px;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #27ae60;
}

.sf-operator-field.is-invalid,
.sf-input-operator.is-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.28);
    background: #fff5f5;
}

.sf-voice-status.is-error {
    color: #c0392b;
}

.sf-actions-operator {
    margin-top: 24px;
    gap: 12px;
}

.sf-tesis-panel {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef1f7;
    border: 2px solid #c5cde0;
    box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(42, 49, 72, 0.06);
}

.sf-tesis-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sf-tesis-badge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 2px solid #c5cde0;
    background: #fff;
    color: #2a3148;
    font-size: 0.67rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    flex: 1 1 auto;
}

.sf-tesis-badge-btn:active {
    transform: scale(0.98);
}

.sf-tesis-badge-btn--list {
    border-color: #3498db;
    color: #1a5276;
    background: #eaf4fd;
}

.sf-tesis-badge-btn--list:hover {
    background: #d4eafc;
}

.sf-tesis-badge-btn--add {
    border-color: rgba(241, 196, 15, 0.65);
    color: #7d6608;
    background: rgba(241, 196, 15, 0.18);
}

.sf-tesis-badge-btn--add:hover {
    background: rgba(241, 196, 15, 0.32);
    color: #5d4e06;
}

.sf-ses-test-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 2px dashed #9b59b6;
    background: rgba(155, 89, 182, 0.1);
    color: #6c3483;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.sf-ses-test-btn .fa {
    font-size: 1rem;
}

.sf-ses-test-btn:hover {
    background: rgba(155, 89, 182, 0.18);
}

.sf-ses-test-btn:active {
    transform: scale(0.98);
}

.sf-ses-test-btn--simple {
    margin-top: 6px;
    border-color: #2980b9;
    background: rgba(41, 128, 185, 0.1);
    color: #1a5276;
}

.sf-ses-test-btn--simple:hover {
    background: rgba(41, 128, 185, 0.18);
}

.sf-ses-test-log {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.65rem;
    max-height: 9rem;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.68rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    color: #1e3a5f;
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed rgba(30, 58, 95, 0.35);
    border-radius: 8px;
}

.sf-ses-test-log.is-error {
    color: #9b1c1c;
    border-color: rgba(155, 28, 28, 0.45);
    background: rgba(254, 242, 242, 0.95);
}

.sf-btn-operator {
    min-height: 60px;
    padding: 16px 20px;
    font-size: 1.15rem;
    border-radius: 12px;
}

.sf-btn-save {
    flex: 1.4;
    min-height: 68px;
    font-size: 1.25rem;
}

.sf-message-operator {
    font-size: 1.05rem;
    padding: 16px 18px;
}

.sf-footnote-operator {
    font-size: 0.9rem;
    margin-top: 16px;
}

.sf-tesisler-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
}

.sf-tesisler-modal[hidden] {
    display: none !important;
}

.sf-tesisler-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.sf-tesisler-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    max-height: min(85vh, 720px);
    display: flex;
    flex-direction: column;
    padding: 18px 16px 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    color: #2a3148;
}

.sf-tesisler-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.sf-tesisler-modal-head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #2a3148;
}

.sf-tesisler-modal-head h2 .fa {
    color: #27ae60;
    margin-right: 8px;
}

.sf-tesisler-hint {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #5a6478;
}

.sf-tesisler-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 2px solid #e2e8f2;
    border-radius: 12px;
}

.sf-tesisler-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.sf-tesisler-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef1f7;
}

.sf-tesisler-table th,
.sf-tesisler-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f2;
}

.sf-tesisler-table th {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3d4a6e;
}

.sf-tesisler-table tbody tr:last-child td {
    border-bottom: none;
}

.sf-tesisler-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.sf-tesisler-no {
    font-weight: 800;
    white-space: nowrap;
    color: #1a5276;
    width: 56px;
}

.sf-tesisler-ad {
    font-weight: 700;
    min-width: 120px;
}

.sf-tesisler-alanlar {
    color: #3d4a6e;
    line-height: 1.45;
}

.sf-tesisler-empty {
    text-align: center;
    color: #7f8c8d;
    padding: 24px 16px !important;
}

body.sf-tesisler-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .sf-tesisler-table {
        font-size: 0.82rem;
    }

    .sf-tesisler-table th,
    .sf-tesisler-table td {
        padding: 8px 10px;
    }
}

.sf-photo-section {
    margin: 8px 0 20px;
    padding: 16px 14px;
    border-radius: 14px;
    border: 2px dashed #c5cde0;
    background: #f7f9fc;
}

.sf-photo-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #3d4a6e;
}

.sf-photo-title .fa-camera {
    color: #8e44ad;
    margin-right: 8px;
}

.sf-photo-hint {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: #6b7894;
    word-break: break-all;
}

.sf-photo-hint code {
    font-size: 0.78rem;
    background: #eef1f7;
    padding: 2px 6px;
    border-radius: 4px;
}

.sf-photo-actions {
    margin-top: 0;
}

.sf-photo-preview-wrap {
    margin-top: 14px;
}

.sf-photo-preview {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 10px;
    border: 2px solid #d8deea;
    background: #fff;
}

.sf-photo-path {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #27ae60;
    word-break: break-all;
}

@media (max-width: 520px) {
    .sf-operator-input-row {
        grid-template-columns: 1fr;
    }

    .sf-operator-input-row .sf-unit-operator,
    .sf-operator-input-row .sf-btn-voice {
        width: 100%;
        min-height: 56px;
    }

    .sf-btn-voice {
        font-size: 1.4rem;
    }

    .sf-actions-operator {
        flex-direction: column;
    }

    .sf-btn-operator,
    .sf-btn-save {
        width: 100%;
    }
}

/* ========== Detay form — onlarca alan, kompakt liste ========== */
.sf-operator-detay {
    overflow-x: hidden;
}

.sf-page-detay {
    max-width: 720px;
    padding-bottom: 24px;
}

.sf-header-compact .sf-facility-title h1 {
    font-size: clamp(1.15rem, 4vw, 1.45rem);
    margin: 8px 0 0;
}

.sf-detay-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.sf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.sf-chip .fa {
    font-size: 0.9em;
    opacity: 0.95;
}

.sf-chip-facility {
    background: rgba(46, 204, 113, 0.28);
    border: 2px solid rgba(46, 204, 113, 0.55);
    color: #d5f5e3;
}

.sf-chip-title {
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    max-width: min(100%, 420px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-detay-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef1f7;
    border: 2px solid #c5cde0;
    box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(42, 49, 72, 0.08);
}

.sf-giris-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.sf-chip-giris {
    background: #fff;
    color: #2a3148;
    border: 2px solid #3d4a6e;
    box-shadow: 0 2px 6px rgba(61, 74, 110, 0.15);
    font-size: 0.82rem;
}

.sf-chip-date {
    color: #1a5276;
    border-color: #3498db;
    background: #eaf4fd;
}

.sf-chip-time {
    color: #7d6608;
    border-color: #f1c40f;
    background: #fef9e7;
}

.sf-chip-voice {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #3d4a6e, #2f3850);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, background 0.2s;
}

.sf-chip-voice:active {
    transform: scale(0.96);
}

.sf-chip-voice.is-active {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    animation: sf-pulse 1.2s ease-in-out infinite;
}

.sf-chip-home {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.15rem;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, background 0.2s, border-color 0.2s;
}

.sf-chip-home:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.sf-chip-home:active {
    transform: scale(0.96);
}

.sf-giris-stack {
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.sf-giris-stack .sf-operator-top-panel {
    margin-top: 0;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #c5cde0;
    box-shadow: inset 0 1px 0 #fff;
}

.sf-giris-stack .sf-card-operator.sf-card-giris {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.sf-card-giris {
    flex: 0 0 auto;
}

.sf-giris-top-panel {
    max-width: 100%;
}

.sf-operator-top-panel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #eef1f7;
}

.sf-giris-guide {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sf-guide-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #d8deea;
    box-shadow: 0 1px 3px rgba(42, 49, 72, 0.06);
}

.sf-guide-row--step {
    border-left: 4px solid #3498db;
}

.sf-guide-row--step:nth-child(2) {
    border-left-color: #27ae60;
}

.sf-guide-row--live {
    align-items: center;
    padding: 7px 11px;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.35);
    border-left: none;
    box-shadow: none;
}

.sf-guide-tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eaf4fd;
    border: 1px solid #aed6f1;
    color: #1a5276;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.sf-guide-tag--action {
    background: #eafaf1;
    border-color: #a9dfbf;
    color: #1e8449;
}

.sf-guide-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sf-guide-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #2a3148;
    line-height: 1.35;
}

.sf-guide-title em {
    font-style: normal;
    font-weight: 800;
    color: #1e8449;
}

.sf-guide-detail {
    font-size: 0.76rem;
    color: #5a6478;
    line-height: 1.4;
}

.sf-guide-detail em {
    font-style: normal;
    font-weight: 700;
    color: #3d4a6e;
}

.sf-guide-detail kbd,
.sf-giris-guide kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f4f6fa;
    border: 1px solid #c5cde0;
    font-family: inherit;
    font-size: 0.88em;
    font-weight: 700;
    color: #1a5276;
    line-height: 1.35;
}

.sf-guide-live-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.25);
    animation: sf-live-pulse 1.8s ease-in-out infinite;
}

.sf-guide-live-text {
    font-size: 0.76rem;
    font-weight: 600;
    color: #1e7e34;
    line-height: 1.35;
}

@keyframes sf-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.sf-header-compact h1 {
    font-size: clamp(1.2rem, 4.5vw, 1.6rem);
    margin: 4px 0 0;
}

.sf-header-compact {
    flex-shrink: 0;
}

.sf-voice-help {
    flex-shrink: 0;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #d5f5e3;
    font-size: 0.82rem;
    line-height: 1.4;
}

.sf-voice-help summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-voice-help summary::-webkit-details-marker {
    display: none;
}

.sf-voice-help summary .fa-microphone {
    color: #2ecc71;
}

.sf-voice-help p {
    margin: 10px 0 0;
}

.sf-btn-continuous-voice-compact {
    flex-shrink: 0;
    min-height: 52px;
    margin-top: 10px;
    font-size: 1rem;
    padding: 12px 16px;
}

.sf-card-detay {
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 12px 10px 8px;
}

.sf-field-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 4px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3d4a6e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sf-field-list-title .fa {
    margin-right: 6px;
    color: #6b7894;
}

.sf-field-count {
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef1f7;
    color: #6b7894;
    font-size: 0.75rem;
}

.sf-field-list {
    max-height: min(62vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f2;
    border-radius: 10px;
    background: #fff;
}

.sf-field-group {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7894;
    background: #f0f3f8;
    border-bottom: 1px solid #e2e8f2;
}

.sf-field-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(72px, 88px) 36px 40px;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #eef1f7;
    background: #fff;
    transition: background 0.15s, box-shadow 0.15s;
}

.sf-field-row:last-child {
    border-bottom: none;
}

.sf-field-row:nth-child(even):not(.is-voice-active) {
    background: #fafbfd;
}

.sf-field-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f0f3f8;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sf-field-row--water .sf-field-row-icon { color: #3498db; }
.sf-field-row--electric .sf-field-row-icon { color: #d4ac0d; }
.sf-field-row--pressure .sf-field-row-icon { color: #e67e22; }
.sf-field-row--generic .sf-field-row-icon { color: #6b7894; }

.sf-field-row-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2a3148;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.sf-field-row-input {
    width: 100%;
    height: 38px;
    padding: 4px 8px;
    border: 1px solid #d8deea;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
    color: #1a2236;
    background: #fff;
    outline: none;
}

.sf-field-row-input:focus {
    border-color: #3d4a6e;
}

.sf-field-row-input.sf-input-filled {
    border-color: #2ecc71;
    background: #f0fff4;
}

.sf-field-row-unit {
    font-size: 0.72rem;
    font-weight: 800;
    color: #6b7894;
    text-align: center;
    white-space: nowrap;
}

.sf-btn-voice-sm {
    width: 40px;
    height: 38px;
    min-height: 0;
    font-size: 0.95rem;
    border-radius: 8px;
    padding: 0;
}

.sf-field-row.is-voice-active,
.sf-field-row.is-selected,
.sf-field-row.is-listening {
    background: #fff5f5 !important;
    box-shadow: inset 4px 0 0 #e74c3c;
}

.sf-field-row.is-voice-active .sf-field-row-input,
.sf-field-row.is-selected .sf-field-row-input,
.sf-field-row.is-listening .sf-field-row-input {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.sf-field-row.is-voice-active .sf-field-row-label::after,
.sf-field-row.is-selected .sf-field-row-label::after {
    content: ' ←';
    color: #c0392b;
    font-weight: 800;
}

.sf-photo-section-compact {
    margin: 10px 0 0;
    padding: 10px;
    border-style: solid;
    border-width: 1px;
}

.sf-btn-photo-compact {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.sf-photo-preview-sm {
    max-height: 120px;
}

.sf-detay-footer {
    margin-top: 14px;
    padding-top: 4px;
    border-top: 1px solid #e2e8f2;
}

.sf-voice-status-compact {
    min-height: 20px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #27ae60;
    text-align: center;
}

.sf-voice-status-compact.is-error {
    color: #c0392b;
}

.sf-actions-sticky {
    margin-top: 0;
    gap: 8px;
}

.sf-btn-footer {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 1rem;
}

@media (max-width: 400px) {
    .sf-field-row {
        grid-template-columns: 24px minmax(0, 1fr) minmax(64px, 76px) 32px 36px;
        gap: 4px;
        padding: 5px 6px;
    }

    .sf-field-row-label {
        font-size: 0.78rem;
    }

    .sf-field-row-input {
        height: 36px;
        font-size: 0.95rem;
    }

    .sf-btn-voice-sm {
        width: 36px;
        height: 36px;
    }
}

/* ========== Saha — tesis tanım ekranı ========== */
.sf-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.sf-btn-saha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(241, 196, 15, 0.2);
    border: 2px solid rgba(241, 196, 15, 0.55);
    color: #ffeaa7;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.sf-btn-saha:hover {
    background: rgba(241, 196, 15, 0.32);
    color: #fff;
}

.sf-btn-saha-inline {
    margin: 8px 0 0;
}

.sf-saha-list {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sf-saha-list-bar,
.sf-saha-form-bar,
.sf-saha-fields-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.sf-saha-fields-bar h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #3d4a6e;
}

.sf-saha-empty {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #6b7894;
    font-size: 0.88rem;
}

.sf-saha-meta-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.sf-saha-field-wide {
    grid-column: 2;
}

.sf-saha-field-full {
    grid-column: 1 / -1;
}

.sf-saha-fields-table-wrap {
    max-height: 320px;
}

.sf-saha-fields-table tbody tr {
    cursor: pointer;
}

.sf-saha-col-keywords {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    color: #6b7894;
}

.sf-saha-empty-row td {
    text-align: center;
    color: #6b7894;
    font-size: 0.88rem;
    padding: 20px 12px !important;
}

.sf-saha-btn-edit,
.sf-saha-btn-delete {
    border: none;
    cursor: pointer;
}

.sf-saha-btn-delete {
    color: #c0392b;
}

.sf-saha-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sf-saha-modal[hidden] {
    display: none !important;
}

.sf-saha-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.sf-saha-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.sf-saha-modal-card h3 {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: #2a3148;
}

.sf-saha-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sf-saha-modal-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7894;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sf-saha-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.sf-saha-modal-actions .sf-btn {
    flex: 1;
    min-height: 44px;
}

.sf-saha-list-title {
    margin: 0 0 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c5cde0;
}

.sf-saha-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 280px;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sf-saha-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    color: #2a3148;
}

.sf-saha-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.sf-saha-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7894;
    background: #f0f3f8;
    border-bottom: 2px solid #e2e8f2;
    white-space: nowrap;
}

.sf-saha-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f7;
    vertical-align: middle;
}

.sf-saha-table tbody tr:hover {
    background: #f8fafc;
}

.sf-saha-table tbody tr:last-child td {
    border-bottom: none;
}

.sf-saha-col-no {
    white-space: nowrap;
    width: 1%;
}

.sf-saha-col-num {
    text-align: center;
    white-space: nowrap;
    width: 1%;
}

.sf-saha-col-action {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.sf-saha-badge {
    display: inline-block;
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef1f7;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b7894;
    text-align: center;
}

.sf-saha-table-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    background: #eef1f7;
    color: #3d4a6e;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.sf-saha-table-link:hover {
    background: #e2e8f2;
    color: #2f3850;
}

.sf-saha-card {
    margin-top: 14px;
}

.sf-saha-form-title {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: #2a3148;
}

.sf-saha-field {
    margin-bottom: 14px;
}

.sf-textarea {
    min-height: 72px;
    resize: vertical;
}

.sf-saha-fields-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0 8px;
}

.sf-saha-fields-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #3d4a6e;
}

.sf-btn-saha-add {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.sf-saha-hint {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: #6b7894;
    line-height: 1.45;
}

.sf-saha-field-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sf-saha-row {
    padding: 12px;
    border: 1px solid #e2e8f2;
    border-radius: 10px;
    background: #f8fafc;
}

.sf-saha-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sf-saha-row-no {
    font-size: 0.82rem;
    color: #6b7894;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sf-saha-row-remove {
    border: none;
    background: transparent;
    color: #c0392b;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
}

.sf-saha-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sf-saha-row-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7894;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sf-saha-keywords-label {
    grid-column: 1 / -1;
}

.sf-saha-actions {
    margin-top: 18px;
}

.sf-lead-operator code {
    font-size: 0.82em;
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 520px) {
    .sf-saha-row-grid {
        grid-template-columns: 1fr;
    }

    .sf-saha-meta-grid {
        grid-template-columns: 1fr;
    }

    .sf-saha-field-wide {
        grid-column: auto;
    }

    .sf-saha-modal-grid {
        grid-template-columns: 1fr;
    }

    .sf-btn-saha {
        padding: 7px 12px;
        font-size: 0.82rem;
    }
}

/* iOS — TTS unlock için gerçek button zorunlu (document touch çalışmıyor) */
.sf-ios-start-overlay[hidden] {
    display: none !important;
}

.sf-ios-start-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 26, 40, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sf-ios-start-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(100%, 320px);
    min-height: 200px;
    padding: 28px 24px;
    border: 2px solid rgba(46, 204, 113, 0.55);
    border-radius: 20px;
    background: linear-gradient(160deg, #3d5a80 0%, #2e4158 100%);
    color: #fff;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sf-ios-start-btn:active {
    transform: scale(0.98);
    border-color: rgba(46, 204, 113, 0.9);
}

.sf-ios-start-btn.is-busy {
    opacity: 0.85;
    border-color: rgba(241, 196, 15, 0.8);
}

.sf-ios-start-btn .fa-microphone {
    font-size: 2.4rem;
    color: #2ecc71;
}

.sf-ios-start-title {
    line-height: 1.3;
}

.sf-ios-start-hint {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.4;
}

.sf-tts-tap-hint {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 99999;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.sf-tts-tap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 420px);
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    background: rgba(241, 196, 15, 0.98);
    color: #1a1a1a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    animation: sfTtsHintPulse 1.6s ease-in-out infinite;
}

.sf-tts-tap-btn:active {
    transform: scale(0.98);
}

.sf-tts-tap-btn .fa-volume-up {
    font-size: 1.2rem;
}

@keyframes sfTtsHintPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
