:root {
    /* === MÜDÜR 5.0 - PASTEL PREMIUM PALET === */
    --primary: #7F9CF5;       /* Soft Indigo (Ana Renk) */
    --primary-dark: #5A67D8;  /* Koyu Ton */
    --primary-light: #e0f3ff; /* Açık Ton */
    --success: #68D391;       /* Soft Mint (Başarılı/Açık) */
    --success-bg: #F0FFF4;
    --danger: #FC8181;        /* Soft Coral (Hata/Kapalı/Çıkış) */
    --danger-bg: #FFF5F5;
    --warning: #F6AD55;       /* Soft Orange (Uyarı) */
    --bg-body: #F3F4F6;       /* Cool Gray (Arkaplan) */
    --bg-card: #FFFFFF;       /* Kart Rengi */
    --text-main: #2D3748;     /* Ana Metin */
    --text-sub: #718096;      /* Alt Metin */
    --border-radius: 24px;    /* Yuvarlaklık */
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
/* =========================================
   1. TEMEL AYARLAR VE KAYDIRMA (SCROLL)
   ========================================= */

/* --- REPLACE the html/body & body blocks --- */
html, body {
  height: 100%;
  overflow: hidden; /* body artık kaydırmaz, .container kaydırır */
  margin: 0;
  padding: 0;
}

/* base body still keeps colors/font */
body {
  background-color: var(--bg-body);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  -webkit-tap-highlight-color: transparent;
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* Kaydırma çubuğunu gizle */
body::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}



/* --- REPLACE the .container block with this --- */
.container {
  width: 100%;
  height: 100vh;                 /* viewport yüksekliğini alır */
  max-width: 480px;
  margin: 0 auto;

  /* Burayı scrollable yapıyoruz */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* iOS esnemesi için */
  overscroll-behavior-y: contain;    /* Android/Chrome: çek-yenileyi engellemeye yardımcı */
  touch-action: pan-y;               /* sadece dikey kaydırma izni */

  /* layout / padding aynen koru */
  padding: 20px;
  padding-bottom: 140px;
  box-sizing: border-box;
  display: block;
  position: relative;
}




/* SİHİRLİ DOKUNUŞ: HER ZAMAN YAYLANMA */
.container::after {
    content: '';
    display: block;
    height: 1px;
    width: 100%;
    min-height: 1px;
}

/* =========================================
   2. HEADER & LOGO
   ========================================= */

/* HEADER KUTUSU (Ana Sayfa İçin Yan Yana Ayarı) */
#header-container {
    display: flex;
    flex-direction: row;       /* Yan yana diz */
    align-items: center;       /* Dikey ortala */
    justify-content: flex-start; /* Sola yasla */
    
    margin-top: 15px;
    margin-bottom: 20px;
    padding-left: 5px;
    gap: 15px;                 /* Logo ile Yazı Arasındaki Boşluk */
}

/* LOGO KUTUSU */
.logo-wrapper {
    position: relative;
    cursor: pointer;
    margin-bottom: 0;          /* Alt boşluğu sıfırla */
    flex-shrink: 0;
}

.logo-card {
    width: 55px;
    height: 55px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.logo-card:active { transform: scale(0.95); }
.logo-card img { width: 100%; height: 100%; object-fit: contain; }



/* YAZI ALANI */
.title-card {
    text-align: left;          /* Yazıyı sola yasla */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
}

.brand-title { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -0.5px; color: var(--text-main); }
.brand-subtitle { font-size: 13px; color: var(--text-sub); font-weight: 500; margin: 0; }

/* =========================================
   3. GİRİŞ EKRANI (LOGIN)
   ========================================= */
#login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 40px 20px;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
}

.login-header h2 { margin: 0 0 5px 0; color: var(--primary); font-weight: 700; }
.login-header p { margin: 0 0 30px 0; color: var(--text-sub); font-size: 13px; }

/* İSTEK: Giriş kutuları daraltıldı */
.input-group {
    background: #F7FAFC;
    border-radius: 18px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    width: 60%; 
    margin: 0 auto 15px auto; 
}
.input-group:focus-within { border-color: var(--primary-light); background: white; }
.input-group i { color: #A0AEC0; margin-right: 10px; }
.input-group input {
    border: none; background: transparent; width: 100%; height: 45px;
    font-size: 15px; color: var(--text-main); font-weight: 500; outline: none;
}

.btn-login {
    width: 60%; 
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none; border-radius: 18px;
    color: white; font-size: 16px; font-weight: 600;
    margin: 10px auto 0 auto; 
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 20px rgba(90, 103, 216, 0.3);
    transition: transform 0.2s;
}
.btn-login:active { transform: scale(0.95); }

/* GİRİŞ EKRANI KİLİDİ */
body.login-mode {
    overflow: hidden; 
    position: fixed; 
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

body.login-mode .container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    padding-bottom: 0;       
}

body.login-mode .glass-card {
    margin-top: -150px; 
    padding-top: 20px !important; 
    padding-bottom: 30px !important;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Giriş ekranında Header'ı tekrar ALT ALTA zorluyoruz */
body.login-mode #header-container {
    flex-direction: column !important; 
    align-items: center !important;    
    justify-content: center !important;
    gap: 0 !important;                 
    margin-bottom: 0 !important;       
    padding-left: 0 !important;        
}

body.login-mode .title-card {
    text-align: center !important;
    margin-bottom: 10px !important;    
    align-items: center !important;
}

body.login-mode .logo-wrapper {
    margin-bottom: 30px !important;
}

/* ==4. KOKPİT (MANUEL SAYFA) KARTLARI== */
/* A. DURUM KARTI (Mod) */
.status-card {
    background: white;
    width: 90%;
    border-radius: 25px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    margin: 0 auto 12px auto; /* Ortala */
    box-shadow: var(--shadow-soft);
    min-height: 50px;
}
.status-icon-box {
    width: 40px; height: 40px;
    border-radius: 14px;
    background: var(--bg-body);
    color: var(--text-sub);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-right: 15px;
    transition: all 0.3s;
}
.status-info { flex-grow: 1; display: flex; flex-direction: column; }
#mod-bilgi-ust { font-weight: 700; font-size: 15px; color: var(--text-main); }
#mod-bilgi-alt { font-size: 12px; color: var(--text-sub); font-weight: 500; }
#mod-etiket {
    background: var(--bg-body); color: var(--text-sub);
    padding: 5px 12px; border-radius: 10px;
    font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
}

/* B. POMPA KARTI (Kompakt) */
.pump-card-new {
    background: white;
    border-radius: 30px;
    padding: 0 20px;
    height: 70px; 
    width: 60%; 
    margin: 0 auto 15px auto; 
	
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    
	box-shadow: var(--shadow-soft);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pump-card-new .left-side { display: flex; align-items: center; gap: 15px; }

.pump-icon-circle {
    width: 50px; 
    height: 50px; 
    border-radius: 50%;
    background: var(--bg-body); 
    color: var(--text-sub);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 28px; transition: all 0.3s;
}

.pump-info h4 { margin: 0; font-size: 15px; color: var(--text-main); transition: color 0.3s;}
.pump-info span { font-size: 11px; color: var(--text-sub); font-weight: 600; text-transform: uppercase; transition: color 0.3s;}

.pump-card-new.active { background: var(--primary) !important; box-shadow: 0 10px 25px rgba(127, 156, 245, 0.5);border-color: transparent;}
.pump-card-new.active .pump-icon-circle { background: transparent !important; color: white !important; animation: spin 0.5s linear infinite; }
.pump-card-new.active .pump-info h4 { color: white !important; }
.pump-card-new.active .pump-info span { color: rgba(255,255,255, 0.8) !important; }
.pump-card-new i.fa-power-off { color: #CBD5E0 !important;transition: color 0.3s;}
.pump-card-new.active i.fa-power-off { color: rgba(255,255,255, 0.5) !important; }


/* C. VANA KARTLARI (IZGARA/GRID) */
#vana-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
}

.valve-card-new {
    /* PASİF (KAPALI) DURUM */
    background: white;
    border-radius: 24px;
    height: 60px; 
    
    display: flex;
    align-items: center; 
    /* justify-content: space-between; <-- Bunu kaldırdık, sola dayalı daha iyi durur */
    
    padding: 0 15px; 
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.valve-card-new:active { transform: scale(0.90); }

/* İkon Kutusu (Pasifken Gri Daire) */
.valve-anim-box {
    width: 42px;       
    height: 42px;      
    border-radius: 50%; 
    
    background: var(--bg-body); /* Gri zemin */
    color: var(--text-sub);     /* Gri ikon */
    
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    font-size: 18px;   
    margin-right: 12px; 
    flex-shrink: 0;   
    transition: all 0.3s;
}



/* Yazı Alanı */
.valve-center-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}



/* Başlık (VANA 1) */
.valve-title {
    font-weight: 800;
    color: var(--text-main);
    font-size: 13px;
    white-space: nowrap;
    transition: color 0.3s;
}



/* Durum (AÇIK/KAPALI) */
.valve-state {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-top: 1px;
    transition: color 0.3s;
}



/* === AKTİF (AÇIK) DURUM - KOMPLE RENKLİ === */
.valve-card-new.active { 
    background: var(--primary) !important; /* Tema Rengi */
    box-shadow: 0 8px 20px rgba(127, 156, 245, 0.4);
    border-color: transparent;
}


/* Aktifken Daire Yok, İkon Beyaz */
.valve-card-new.active .valve-anim-box { 
    background: transparent !important; 
    color: white !important; 
    font-size: 22px; /* İkon biraz büyüsün */
}

/* Aktifken Yazılar Beyaz */
.valve-card-new.active .valve-title { color: white !important; }
.valve-card-new.active .valve-state { color: rgba(255,255,255, 0.8) !important; }

/* Animasyon çubuğunu sildik, gerek kalmadı */
.valve-flow-bar { display: none; }
.valve-card-new.active .valve-flow-bar { display: block; animation: wavePass 2s infinite linear; }



/* =========================================
   5. OTOMATİK MOD SAYFASI
   ========================================= */
.oto-wrapper-card {
    background: white; border-radius: 28px; padding: 25px;
    box-shadow: var(--shadow-soft); margin-bottom: 25px;
}
.oto-section { margin-bottom: 15px; }
.oto-info { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.label { font-size: 11px; font-weight: 700; color: #A0AEC0; letter-spacing: 1px; }
.oto-num {
    /* === RAKAM BOYUTU BURASI === */
    font-size: 28px; /* Bunu artırırsan (Örn: 32px) rakamlar büyür */
    
    font-weight: 800;
    color: var(--primary); /* Rengi buradan alır (Mavi) */
    line-height: 1;
}

/* DAKİKA RAKAMI (DAHA KÜÇÜK) */
.oto-num-min {
    font-size: 20px; /* Normali 28px idi, bunu 20px yaptık. İstersen değiştir. */
    font-weight: 800;
    color: var(--primary); /* Rengi yine Mavi olsun */
    line-height: 1;
}

.unit {
    /* === YAZI BOYUTU (SA, DK) BURASI === */
    font-size: 13px; 
    
    font-weight: 700;
    color: #CBD5E0; /* Gri renk */
    margin-left: 2px;
    margin-right: 2px; /* Rakamlar birbirine yapışmasın diye */
}
.divider { height: 2px; background: #EDF2F7; margin: 20px 0; }

input[type=range].premium-slider { -webkit-appearance: none; width: 100%; background: transparent; touch-action: pan-y;}
input[type=range].premium-slider::-webkit-slider-runnable-track { width: 100%; height: 12px; cursor: pointer; background: #EDF2F7; border-radius: 0px; }
input[type=range].premium-slider::-webkit-slider-thumb { height: 28px; width: 28px; border-radius: 50%; background: white; cursor: pointer; -webkit-appearance: none; margin-top: -7px; box-shadow: 0 4px 8px rgba(0,0,0,0.15); border: 3px solid var(--primary); }

.action-buttons { display: flex; gap: 15px; }
.btn-action { flex: 1; padding: 15px; border-radius: 18px; border: none; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform 0.2s; }
.btn-action:active { transform: scale(0.96); }
.btn-action.start { background: var(--primary); color: white; box-shadow: 0 8px 15px rgba(127, 156, 245, 0.3); }
.btn-action.stop { background: white; color: var(--danger); border: 2px solid var(--danger); }

/* =========================================
   6. AYARLAR SAYFASI
   ========================================= */
.page-header { margin-bottom: 20px; padding-left: 5px; }
.page-header h2 { margin: 0; font-size: 24px; color: var(--text-main); }
.page-header span { color: var(--text-sub); font-size: 13px; }

.settings-card { background: white; border-radius: 20px; overflow: hidden; margin-bottom: 15px; box-shadow: var(--shadow-soft); }
.settings-header { padding: 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: white; }
.icon-title { display: flex; align-items: center; gap: 15px; }
.icon-box { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-body); color: var(--text-sub); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.icon-title span { font-weight: 600; color: var(--text-main); font-size: 15px; }
.col-text { display: flex; flex-direction: column; }
#conn-status-badge { font-size: 10px; color: var(--primary); font-weight: 600; }

.settings-content { display: none; padding: 20px; background: #F8FAFC; border-top: 1px solid #EDF2F7; }
.content-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 13px; color: var(--text-sub); font-weight: 500; }
.content-row:last-child { margin-bottom: 0; }

/* Ayarlar Butonları */
.btn-settings-action { padding: 12px 25px; border-radius: 16px; border: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13px; letter-spacing: 0.5px; transition: all 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.btn-settings-action i { font-size: 16px; }
.settings-label-large { font-size: 14px; font-weight: 600; color: var(--text-main); }

.btn-soft-blue { background-color: var(--primary-light); color: var(--primary-dark); }
.btn-soft-red { background-color: #FFF5F5; color: var(--danger); }
.btn-soft-orange { background-color: #FFFAF0; color: #DD6B20; }
.btn-mini { padding: 8px 15px; border-radius: 12px; border: none; font-weight: 700; font-size: 11px; cursor: pointer; }
.btn-outline { background: white; border: 1px solid #CBD5E0; color: var(--text-main); padding: 8px 12px; }

.premium-input { width: 50px; height: 42px; border: 2px solid #EDF2F7; border-radius: 12px; text-align: center; font-weight: 800; color: var(--text-main); font-size: 16px; background: #F7FAFC; outline: none; transition: border-color 0.2s; }
.premium-input:focus { border-color: var(--primary); background: white; }
.input-row { display: flex; align-items: center; gap: 10px; }

.restart-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.restart-label { white-space: nowrap; font-size: 13px; color: var(--text-main); font-weight: 600; }
.btn-restart-compact { padding: 8px 12px; font-size: 11px; border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; background: transparent; font-weight: 700; cursor: pointer; }

/* Cihaz Bilgi Kartları */
.device-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.info-card-small { background: white; padding: 15px; border-radius: 20px; text-align: center; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: transform 0.2s; }
.info-label { font-size: 10px; color: var(--text-sub); margin-bottom: 5px; text-transform: uppercase; }
.info-value { font-size: 14px; font-weight: 800; color: var(--text-main); }
.version-badge { color: var(--primary); background: var(--primary-light); padding: 3px 8px; border-radius: 8px; display: inline-block; margin-top: 2px; font-size: 12px; font-weight: 700; }

/* Switch iOS Style */
.switch-ios { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch-ios input { opacity: 0; width: 0; height: 0; }
.slider-ios { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CBD5E0; transition: .4s; border-radius: 34px; }
.slider-ios:before { position: absolute; content: ""; height: 22px; width: 22px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
input:checked + .slider-ios { background-color: var(--primary); }
input:checked + .slider-ios:before { transform: translateX(20px); }

/* Yardım Metinleri */
.help-text p { margin: 5px 0; font-size: 12px; line-height: 1.6; }
.help-text ul, .help-text ol { padding-left: 20px; margin: 5px 0 15px 0; }
.code-item { display: flex; justify-content: space-between; align-items: center; background: white; padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; border: 1px solid #E2E8F0; }
.code-item span { font-size: 12px; font-weight: 600; color: var(--text-main); }
.code-item code { font-family: monospace; background: #EDF2F7; padding: 4px 8px; border-radius: 6px; color: var(--primary-dark); font-weight: 700; font-size: 13px; }
.code-item code.red { color: var(--danger); background: var(--danger-bg); }

/* Önemli Not Kutusu */
.important-note { background: #FFF5F5; border-left: 4px solid #FC8181; padding: 12px; margin-bottom: 15px; border-radius: 8px; font-size: 13px; color: #2D3748; line-height: 1.5; }
.important-note strong { color: #C53030; font-weight: 800; }

/* =========================================
   7. AP MODU UYARI KUTUSU
   ========================================= */
.warning-box { background-color: #FFF5F5; border: 1px solid #FED7D7; border-left: 4px solid var(--danger); border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.warning-header { display: flex; align-items: center; gap: 8px; color: #C53030; font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.warning-box p { font-size: 12px; color: #2D3748; line-height: 1.6; margin: 0; }
.highlight-text { background-color: #FEFCBF; padding: 2px 6px; border-radius: 4px; font-weight: 700; color: #744210; font-family: monospace; }

.btn-ap-mode { width: 100%; background: var(--danger); color: white; border: none; border-radius: 16px; padding: 15px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 15px rgba(252, 129, 129, 0.4); transition: transform 0.2s; }
.btn-ap-mode:active { transform: scale(0.96); }
.ap-icons { display: flex; align-items: center; gap: 8px; font-size: 18px; opacity: 0.9; }
.swap-icon { font-size: 12px; opacity: 0.6; }
.btn-ap-mode .btn-text { font-weight: 700; font-size: 14px; letter-spacing: 0.5px; }

/* =========================================
   8. NAV BAR
   ========================================= */
.glass-nav {
    position: fixed; 
	bottom: 40px; 
	left: 50%; 
	transform: translateX(-50%);
    width: 85%; 
	max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px); 
	-webkit-backdrop-filter: blur(15px);
    border-radius: 20px; 
	height: 80px;
    padding: 0 10px; 
	padding-bottom: 5px;
    display: none; 
	justify-content: space-between; 
	align-items: flex-end;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); 
	border: 1px solid rgba(255,255,255,0.6);
    z-index: 1000;
}

.nav-item {
    background: transparent; border: none; color: #A0AEC0; padding: 8px 12px; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1;
}
.nav-item i { font-size: 28px; margin-bottom: 3px; }
.nav-label { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; display: block; opacity: 0.7; }
.nav-item.active { color: var(--primary); transform: translateY(-8px); }
.nav-item.active .nav-label { opacity: 1; }
.nav-divider { width: 0px; height: 35px; background: #CBD5E0; margin-bottom: 12px; }
.logout-btn { color: var(--danger); }
.logout-btn:active { background: var(--danger-bg); }

/* =========================================
   9. MODALLER VE TOAST
   ========================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-glass { background: white; width: 85%; max-width: 300px; padding: 25px; border-radius: 28px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.modal-spinner { border: 7px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: 50%; width: 45px; height: 45px; animation: spin 1s linear infinite; margin: 0 auto 15px auto; }
#modal-text { font-weight: 600; font-size: 15px; color: var(--text-main); margin: 0; }

.toast {
    position: fixed; top: 100px; left: 50%; transform: translateX(-50%) translateY(-50px);
    width: 80%; max-width: 350px; padding: 25px 25px; border-radius: 50px;
    background: #2D3748; color: white; font-weight: 600; font-size: 17px; line-height: 1.5; text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3); z-index: 3000;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    opacity: 0; visibility: hidden; transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-sizing: border-box;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.toast.success { background: var(--success); color: #1C4532; }
.toast.error { background: var(--danger); color: white; }
.toast.warning { background: var(--warning); color: #744210; }

/* Confirm Box */
.confirm-box h3 { margin: 10px 0 8px 0; color: var(--text-main); font-size: 18px; }
.confirm-box p { color: var(--text-sub); margin-bottom: 20px; line-height: 1.5; font-size: 14px; }
.confirm-icon {
    width: 50px; height: 50px; background: #FEFCBF; color: #D69E2E;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold; margin: 0 auto;
}
.confirm-buttons { display: flex; gap: 10px; }
.confirm-buttons button {
    flex: 1; padding: 12px; border-radius: 14px; border: none;
    font-weight: 700; cursor: pointer; font-size: 13px;
}
#btn-confirm-no { background: #EDF2F7; color: var(--text-main); }
#btn-confirm-yes { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(127, 156, 245, 0.4); }

/* =========================================
   10. EFEKTLER & ANİMASYONLAR
   ========================================= */
.card-press-effect {
    transform: scale(0.80) !important;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
@keyframes wavePass { 0% { left: -150%; } 100% { left: 150%; } }

/* =========================================
   11. DARK MODE (KARANLIK MOD)
   ========================================= */
body.dark-mode { --bg-body: #1A202C; --bg-card: #2D3748; --text-main: #F7FAFC; --text-sub: #A0AEC0; --primary: #90CDF4; --primary-dark: #63B3ED; --primary-light: rgba(66, 153, 225, 0.2); --success: #68D391; --success-bg: rgba(72, 187, 120, 0.2); --danger: #FC8181; --danger-bg: rgba(245, 101, 101, 0.2); background-color: var(--bg-body); color: var(--text-main); }
body.dark-mode .glass-card { background: rgba(26, 32, 44, 0.85); border: 1px solid rgba(255, 255, 255, 0.05); }
body.dark-mode .input-group { background: #2D3748; }
body.dark-mode .input-group:focus-within { background: #4A5568; }
body.dark-mode .input-group input { color: white; }
body.dark-mode .status-card, body.dark-mode .pump-card-new, body.dark-mode .valve-card-new, body.dark-mode .settings-card, body.dark-mode .oto-wrapper-card, body.dark-mode .logo-card { background: var(--bg-card); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); }
body.dark-mode .status-icon-box, body.dark-mode .pump-icon-circle, body.dark-mode .valve-anim-box, body.dark-mode .icon-box, body.dark-mode #mod-etiket { background: #171923; color: #A0AEC0; }
body.dark-mode .glass-nav { background: rgba(45, 55, 72, 0.9); border: 1px solid rgba(255, 255, 255, 0.05); }
body.dark-mode .modal-glass { background: var(--bg-card); color: white; }
body.dark-mode #modal-text, body.dark-mode h3 { color: white; }
body.dark-mode #btn-confirm-no { background: #4A5568; color: white; }
body.dark-mode .settings-content { background: #232936; border-top-color: #4A5568; }
body.dark-mode .settings-header { background: var(--bg-card); }
body.dark-mode .code-item { background: #2D3748; border-color: #4A5568; }
body.dark-mode .code-item code { background: #171923; color: var(--primary); }
body.dark-mode .valve-card-new.active { background: rgba(66, 153, 225, 0.3); border: 1px solid var(--primary); }
body.dark-mode .valve-card-new.active .valve-number { color: var(--primary); }
body.dark-mode .valve-card-new.active .valve-anim-box { background: #171923; color: var(--primary); }
body.dark-mode input[type=range].premium-slider::-webkit-slider-runnable-track { background: #4A5568; }
body.dark-mode input[type=range].premium-slider::-webkit-slider-thumb { background: #2D3748; border-color: var(--primary); }
body.dark-mode .info-card-small { background: var(--bg-card); box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
body.dark-mode .info-label { color: #A0AEC0; }
body.dark-mode .info-value { color: white; }
body.dark-mode .valve-card-new { background: var(--bg-card); border-color: transparent; }
body.dark-mode .valve-anim-box { background: #1A202C; color: #718096; }
body.dark-mode .btn-soft-blue { background-color: rgba(66, 153, 225, 0.2); color: #90CDF4; }
body.dark-mode .btn-soft-red { background-color: rgba(252, 129, 129, 0.2); color: #FC8181; }
body.dark-mode .settings-label-large { color: #E2E8F0; }
body.dark-mode .btn-soft-orange { background-color: rgba(237, 137, 54, 0.2); color: #FBD38D; }
body.dark-mode .premium-input { background-color: #2D3748; border-color: #4A5568; color: white; }
body.dark-mode .premium-input:focus { border-color: var(--primary); }
body.dark-mode .content-row[style*="border-bottom"] { border-bottom-color: #2D3748 !important; }
body.dark-mode .warning-box { background-color: rgba(252, 129, 129, 0.1); border-color: rgba(252, 129, 129, 0.2); }
body.dark-mode .warning-box p { color: #E2E8F0; }
body.dark-mode .warning-header { color: var(--danger); }
body.dark-mode .highlight-text { background-color: rgba(254, 252, 191, 0.2); color: #FAF089; }
body.dark-mode .important-note { background: rgba(252, 129, 129, 0.15); color: #E2E8F0; border-left-color: #FC8181; }
body.dark-mode .important-note strong { color: #FC8181; }






/* ============================================================
   OTOMATİK MOD - İKON VE BAŞLIK DÜZENİ
   ============================================================ */

/* Sol tarafı gruplayan kutu */
.info-left {
    display: flex;
    align-items: center; /* Dikey ortala */
    gap: 8px; /* İkon ile Yazı arasındaki mesafe */
}

/* İkon Ayarları */
.info-left i {
    font-size: 25px; /* İkon Boyutu (Buradan büyütebilirsin) */
    color: var(--primary); /* İkon Rengi (Tema rengi olsun) */
    width: 24px; /* Hizalama bozulmasın diye sabit genişlik */
    text-align: center;
}

/* Etiket Ayarı (Mevcut .label sınıfını ezer/düzenler) */
.oto-info .label {
    margin: 0; /* Eski marginleri sıfırla */
    font-size: 12px;
    font-weight: 700;
    color: #A0AEC0;
    letter-spacing: 0.5px;
}

/* Dark Mode Uyumu */
body.dark-mode .info-left i {
    color: var(--primary); /* Karanlıkta da mavi kalsın */
}







/* ============================================================
   SEÇENEK 2: GLASS BLUR (BULANIKTAN NETLEŞME)
   ============================================================ */

.page {
    animation-duration: 0.4s; /* Efektin görülmesi için bir tık uzun */
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

/* İLERİ GİDERKEN */
@keyframes blurInRight {
    0% { 
        filter: blur(10px); /* Bulanık başla */
        opacity: 0; 
        transform: translateX(15px) scale(0.98); /* Hafif sağda ve küçük */
    }
    100% { 
        filter: blur(0); /* Netleş */
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

/* GERİ GİDERKEN */
@keyframes blurInLeft {
    0% { 
        filter: blur(10px); 
        opacity: 0; 
        transform: translateX(-15px) scale(0.98); /* Hafif solda ve küçük */
    }
    100% { 
        filter: blur(0); 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

/* JS sınıfları */
.anim-right { animation-name: blurInRight; }
.anim-left { animation-name: blurInLeft; }




/* === VANA HATA DURUMU (AYDINLIK MOD) === */

/* 1. Kartın Kendisi (Zemin ve Çerçeve) */
.valve-card-new.error {
    background-color: #FFF5F5 !important; /* Çok açık kırmızı/pembe zemin */
    border: 2px solid #FC8181 !important; /* Canlı Kırmızı Çerçeve */
    box-shadow: 0 4px 15px rgba(252, 129, 129, 0.2) !important; /* Kırmızımsı gölge */
}

/* 2. İkonun Arkasındaki Yuvarlak Kutu */
.valve-card-new.error .valve-anim-box {
    background-color: #FED7D7 !important; /* Daha koyu pembe */
    color: #C53030 !important; /* Koyu Kırmızı İkon Rengi */
}

/* 3. İKONUN KENDİSİ (BOYUT AYARI BURADA) */
.valve-card-new.error .valve-anim-box i {
    font-size: 28px !important; /* <-- MÜDÜR, BOYUTU BURADAN DEĞİŞTİR (Örn: 28px) */
}

/* 4. Durum Yazısı (ULAŞILAMADI !!) */
.valve-card-new.error .valve-state {
    color: #C53030 !important; /* Koyu Kırmızı Yazı */
    font-weight: 900 !important;
}


/* ============================================================
   LED DURUMU (KALP ATIŞI & GRİ OFFLINE - FİNAL)
   ============================================================ */

/* Varsayılan Dot Şekli (Bu zaten varsa silme, yoksa ekle) */
.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--bg-body);
    box-shadow: none;
    animation: none;
    background-color: #9CA3AF; 
    transition: background-color 0.5s, box-shadow 0.5s;
    z-index: 5;
}

/* 1. ONLINE: Yeşil ve Kalp Atışı */
.status-dot.online {
    background-color: var(--success) !important;
    box-shadow: 0 0 15px var(--success);
    animation: pulse 2s infinite; /* Yavaş, canlı kalp atışı */
}

/* 2. OFFLINE: Gri ve Hareketsiz (Ölü) */
.status-dot.offline {
    background-color: #9CA3AF !important; /* Mat Gri */
    box-shadow: none;
    animation: none; /* Hareket yok */
}

/* 3. PINGING: Sarı ve Hızlı Atış (Sorgu) */
.status-dot.pinging {
    background-color: var(--warning) !important;
    box-shadow: 0 0 10px var(--warning);
    animation: pulse 0.5s infinite; /* Hızlı atış */
}

/* Kalp Atışı Animasyonu */
@keyframes pulse {
    0% { transform: scale(0.90); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.90); opacity: 0.7; }
}



/* === YENİ DURUM YAZISI STİLİ === */
#status-text {
    position: absolute;
    
    /* --- KONUM AYARLARI (Buradan Oyna) --- */
    bottom: -18px;   /* Logodan ne kadar aşağıda olacağı */
    right: -2px;     /* Sağa yaslama (Dot ile aynı hizada olması için) */
    
    /* --- GÖRÜNÜM AYARLARI (Buradan Oyna) --- */
    font-size: 10px;       /* Yazı büyüklüğü */
    font-weight: 700;      /* Yazı kalınlığı */
    letter-spacing: 0.3px; /* Harf aralığı */
    
    /* Varsayılan Renk (Offline Rengi) */
    color: #9CA3AF;        
    
    /* Animasyon (Renk değişimi yumuşak olsun) */
    transition: color 0.4s ease;
    white-space: nowrap;   /* Yazıyı tek satırda tut */
    z-index: 6;            /* Her şeyin üstünde görünsün */
}

/* Çevrimiçi Olduğunda (Yeşil) */
#status-text.online {
    color: var(--success); /* Tema yeşili */
}

/* Pinging (Sarı/Turuncu) */
#status-text.pinging {
    color: var(--warning); /* Tema sarısı */
}


/* === DEBİ GÖSTERGE KUTUSU === */
.readonly-display {
    background-color: #E2E8F0; /* Gri Zemin */
    color: #4A5568;            /* Koyu Gri Yazı */
    border: 1px solid #CBD5E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    width: 50px;               /* Input ile aynı genişlik */
    cursor: default;           /* Tıklanmaz imleci */
    user-select: none;
}

/* Karanlık Mod Uyumu */
body.dark-mode .readonly-display {
    background-color: #2D3748;
    color: #A0AEC0;
    border-color: #4A5568;
}





/* =========================================
   12. SULAMA GEÇMİŞİ LİSTESİ (YENİ)
   ========================================= */

.history-item {
    background: white;
    border-bottom: 1px solid #EDF2F7;
    padding: 15px; /* İç boşluk */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    width: 100%;
    box-sizing: border-box; /* Taşmayı engeller */
    gap: 15px; /* Sol ve Sağ tarafın birbirine girmesini engeller */
}

/* Sol Taraf (Yazı Alanı) */
.history-item > div:first-child {
    flex: 1; /* Mevcut boşluğu doldur */
    min-width: 0; /* Yazı çok uzunsa kutuyu patlatmasın */
    padding-left: 5px;
}

/* Sağ Taraf (Su Miktarı) */
.history-item > div:last-child {
    flex-shrink: 0; /* Asla küçülme */
    text-align: right;
}

/* Tarih Yazısı */
.history-date {
    font-size: 11px;
    color: #A0AEC0;
    margin-top: 3px;
    font-weight: 500;
}

/* Yanıp Sönen İkon Hızı */
.fa-fade {
    animation-duration: 1.5s;
    margin-right: 4px;
}
