/* Cyprus SCADA giriş ve kurum seçimi — "Damla ve Halka" tasarımı (login.html ve portal.html ortak kullanır).
   Yerleşim: geniş ekranda solda marka + slogan + sahne, sağda beyaz form paneli; dar ekranda tek sütun
   (marka → sahne → form → slogan → altbilgi). Sayfa betiklerinin style.display ile açıp kapattığı öğelerin
   (#username, #usernameManual, #tenantGroup, #tenantChip, #unutLink, #alert/#errBox, #masterLink) görünürlüğüne
   burada !important ile karışılmaz. */
:root {
    --g-zemin: #E6F0EC; --g-murekkep: #0A243B; --g-ikincil: #355876; --g-ikincil2: #45637C; --g-soluk: #4E6D87;
    --g-bag: #11665E; --g-dugme: #0E4A45; --g-odak: #3FB7A7; --g-cizgi: #8CADC7; --g-kenar: #CFDCE7;
    --g-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --g-sans: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --g-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--g-zemin); color: var(--g-murekkep); font-family: var(--g-sans); -webkit-text-size-adjust: 100%; }
a { color: var(--g-bag); }
a:hover { color: var(--g-murekkep); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--g-odak); outline-offset: 1px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--g-odak); outline-offset: 2px; }
.g03-gizli { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- kabuk ---- */
.g03 { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; }
.g03-sol { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding: 48px 64px 0; overflow: hidden; }
.g03-marka { display: flex; align-items: center; gap: 14px; }
.g03-marka svg, .g03-marka img { flex: none; width: 56px; height: 56px; overflow: visible; }
.g03-marka img { object-fit: contain; }
.g03-marka-ad { display: flex; flex-direction: column; min-width: 0; }
.g03-marka-ad b { font-weight: 600; font-size: 20px; letter-spacing: 0.16em; }
.g03-marka-ad i { font-family: var(--g-serif); font-size: 17px; color: var(--g-ikincil); }
.g03-slogan { display: flex; flex-direction: column; gap: 14px; max-width: 540px; margin-top: 24px; }
.g03-slogan h2 { margin: 0; font-family: var(--g-serif); font-weight: 400; font-size: clamp(42px, 4.7vw, 60px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.g03-slogan p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--g-ikincil); max-width: 440px; }
.g03-sahne { position: relative; flex: 1 1 auto; min-height: 250px; margin: 0 -64px 0; }
.g03-sahne svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.g03-sag { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 32px 56px; background: #FFFFFF; border-left: 1px solid var(--g-kenar); }
.g03-ust { display: flex; justify-content: flex-end; min-height: 44px; }
.g03-dil { display: flex; gap: 18px; font-size: 14px; }
.g03-dil a { min-width: 24px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--g-ikincil2); text-decoration: none; }
.g03-dil a[aria-current="true"] { color: var(--g-murekkep); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
#langSlot { display: none; }                                   /* i18n.js düğmesi yerine .g03-dil bağlantıları */
.stage { flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.card { width: 100%; max-width: 360px; min-width: 0; }

/* ---- form ---- */
.card form { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.g03-bas { display: flex; flex-direction: column; gap: 6px; }
.g03-bas h1 { margin: 0; font-family: var(--g-serif); font-weight: 400; font-size: 44px; line-height: 1.05; }
.g03-kurum { margin: 0; font-size: 13px; line-height: 1.5; color: var(--g-ikincil2); }
.g03-kurum a { font-weight: 600; display: inline-block; padding: 6px 0; }
.g03-kurum.adli #tenantChip { display: none !important; }     /* kurumun adı biliniyorsa kod rozeti gerekmez */
.g03-kurum:not(.kurumlu) .g03-ayrac { display: none; }
.field-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-group > label { font-size: 13px; font-weight: 600; color: var(--g-ikincil); }
.field { min-width: 0; }
.field input, .field select {
    display: block; width: 100%; height: 48px; padding: 0 2px; margin: 0;
    border: 0; border-bottom: 1.5px solid var(--g-cizgi); border-radius: 0; background-color: transparent;
    font: 17px var(--g-sans); color: var(--g-murekkep);
    appearance: none; -webkit-appearance: none;
}
.field input::placeholder { color: #8296A8; }
.field select {
    padding-right: 28px; cursor: pointer; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2311665E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat; background-position: right 4px center;
}
.field select option { color: var(--g-murekkep); background: #FFFFFF; }
.field select + input { margin-top: 6px; }
.remember-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
label.remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 15px; font-weight: 400; color: var(--g-ikincil); cursor: pointer; }
label.remember input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--g-dugme); cursor: pointer; }
.unut { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.btn-primary {
    width: 100%; height: 54px; padding: 0 20px; border: 0; border-radius: 27px; background: var(--g-dugme); color: #FFFFFF;
    font: 600 16px var(--g-sans); letter-spacing: 0.03em; cursor: pointer; transition: background-color .15s;
}
.btn-primary:hover { background: #0A3A36; }
.btn-primary:disabled { opacity: .62; cursor: progress; }
.err { display: none; padding: 10px 14px; border-left: 3px solid #C23B3B; border-radius: 6px; background: #FBECEC; color: #8A1C1C; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.err.bilgi { border-left-color: #D69E00; background: #FFF4DB; color: #6A4B00; }

/* ---- altbilgi ---- */
.g03-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; font-size: 13px; color: var(--g-soluk); }
.g03-alt a { color: var(--g-soluk); display: inline-flex; align-items: center; min-height: 32px; }
.g03-alt a:hover { color: var(--g-murekkep); }
.g03-alt-baglar { display: flex; flex-wrap: wrap; gap: 0 14px; flex-basis: 100%; }
.g03-alt-baglar:empty { display: none; }
#brandFooter { position: static !important; transform: none !important; flex-basis: 100%; color: var(--g-soluk) !important; pointer-events: auto !important; }

/* ---- kurum seçimi: telefonda aç (QR) penceresi ---- */
.qr-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 36, 59, 0.55); }
.qr-modal.show { display: flex; }
.qr-card { position: relative; width: 100%; max-width: 400px; max-height: 100%; overflow: auto; padding: 30px 26px 24px; border-radius: 16px; background: #FFFFFF; color: var(--g-murekkep); text-align: center; box-shadow: 0 24px 64px rgba(10, 36, 59, 0.30); }
.qr-card h2 { margin: 0 0 4px; font-family: var(--g-serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.qr-sub { margin-bottom: 18px; font-size: 14px; color: var(--g-ikincil2); }
.qr-box { display: inline-block; padding: 10px; margin-bottom: 14px; border: 1px solid var(--g-kenar); border-radius: 12px; background: #FFFFFF; }
.qr-box canvas, .qr-box img { display: block; max-width: 100%; height: auto; }
.qr-url { padding: 10px 12px; margin-bottom: 14px; border-radius: 8px; background: var(--g-zemin); color: var(--g-bag); font: 13px ui-monospace, Consolas, monospace; word-break: break-all; cursor: pointer; }
.qr-steps { padding: 12px 14px; margin-bottom: 16px; border-radius: 8px; background: #F4F7F9; color: var(--g-ikincil); font-size: 13.5px; line-height: 1.65; text-align: left; }
.qr-steps strong { color: var(--g-murekkep); }
.qr-close { min-width: 140px; height: 46px; border: 0; border-radius: 23px; background: var(--g-dugme); color: #FFFFFF; font: 600 15px var(--g-sans); cursor: pointer; }
.qr-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--g-ikincil2); font-size: 18px; cursor: pointer; }

/* ---- sahne canlandırmaları ---- */
@keyframes g03dus { 0% { transform: translateY(-230px); opacity: 0; filter: blur(7px); } 10% { opacity: .4; } 28% { filter: blur(0); opacity: 1; } 42% { transform: translateY(0); opacity: 1; filter: blur(0); } 45% { transform: translateY(5px); opacity: 0; filter: blur(0); } 100% { transform: translateY(5px); opacity: 0; filter: blur(0); } }
@keyframes g03halka { 0%, 44% { transform: scale(.15); opacity: 0; } 48% { opacity: .85; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes g03bit { 0%, 40% { transform: scale(.5); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes g03parilti { 0%, 100% { opacity: .12; transform: translateX(0); } 50% { opacity: .5; transform: translateX(6px); } }
@keyframes g03sicra { 0%, 41% { transform: scale(.2); opacity: 0; } 43% { opacity: .95; } 56%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes g03yansi { 0%, 22% { opacity: 0; } 41% { opacity: .34; } 45%, 100% { opacity: 0; } }
@keyframes g03ksonar { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes g03knabiz { 0% { stroke-dashoffset: 64; } 35%, 100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .g03 [style*="animation"] { animation: none !important; }
    .g03 .g03-anlik { display: none; }
}

/* ---- alçak geniş ekran (ör. 1366×768 dizüstü): sahne ve boşluklar kısalır ---- */
@media (min-width: 900px) and (max-height: 720px) {
    .g03-sol { padding-top: 32px; gap: 20px; }
    .g03-slogan { margin-top: 8px; }
    .g03-slogan h2 { font-size: clamp(38px, 4vw, 50px); }
    .g03-sag { padding-top: 20px; padding-bottom: 20px; gap: 12px; }
    .card form { gap: 16px; }
    .g03-bas h1 { font-size: 38px; }
}

/* ---- dar ekran: tek sütun ---- */
@media (max-width: 899px) {
    .g03 { flex-direction: column; }
    .g03-sol, .g03-sag { display: contents; }
    .g03-marka { order: 1; gap: 12px; padding: 26px 76px 0 24px; }
    .g03-marka svg, .g03-marka img { width: 48px; height: 48px; }
    .g03-marka-ad b { font-size: 18px; }
    .g03-marka-ad i { font-size: 15px; line-height: 1.2; }
    .g03-ust { position: absolute; top: 28px; right: 16px; min-height: 0; }
    .g03-dil a { min-width: 44px; font-size: 14px; }
    .g03-dil a:not([aria-current="true"]) { display: none; }
    .g03-sahne { order: 2; margin: 0; }
    .g03-sahne svg { position: static; height: auto; aspect-ratio: 810 / 640; max-height: none; }
    .stage { order: 3; flex: 0 0 auto; align-items: flex-start; justify-content: center; padding: 4px 24px 0; }
    .card { max-width: 480px; }
    .card form { gap: 16px; }
    .g03-bas { flex-direction: column-reverse; gap: 2px; }
    .g03-bas h1 { font-size: 40px; }
    .g03-kurum { font-size: 14px; }
    .g03-kurum a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
    .g03-slogan { order: 4; align-items: center; max-width: none; margin: auto 24px 0; padding-top: 30px; text-align: center; }
    .g03-slogan h2 { font-style: italic; font-size: 18px; line-height: 1.3; letter-spacing: 0; color: var(--g-ikincil); }
    .g03-slogan p { display: none; }
    .g03-alt { order: 5; justify-content: center; gap: 0 6px; padding: 4px 24px 20px; font-size: 12.5px; text-align: center; }
    .g03-alt > span + span:not(.g03-alt-baglar)::before { content: "· "; }
    .g03-alt-baglar { justify-content: center; }
    .g03-alt a { min-height: 44px; }
}
@media (max-width: 359px) {
    .g03-marka { padding-left: 16px; padding-right: 64px; }
    .g03-marka-ad i { font-size: 13.5px; }
    .stage { padding-left: 16px; padding-right: 16px; }
    .g03-bas h1 { font-size: 36px; }
}

/* ===== Sahne katmanı (kurumsal ana sayfa ile ortak; kaynak web/site/index.html, üretici scratchpad/sahne_kur.cjs) ===== */
.g03-sahne .izgara { stroke: #FFFFFF; stroke-width: .8; opacity: .55; }
.g03-sahne .ag { stroke: #0E4A45; stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .85; animation: g03akis 1.8s linear infinite; }
.g03-sahne .parilti { fill: #3FC3B1; opacity: .85; }
.g03-sahne .akis { fill: none; stroke: #0E4A45; stroke-width: 1.4; stroke-dasharray: 3 6; opacity: .55; animation: g03akis 1.6s linear infinite; }
@keyframes g03akis { to { stroke-dashoffset: -18; } }
.g03-sahne .merkez-rozet rect { fill: #0E4A45; filter: url(#cipGolge); }
.g03-sahne .merkez-rozet text { font: 600 11px var(--g-sans); fill: #FFFFFF; letter-spacing: .04em; }
.g03-sahne .merkez-rozet .alt { font: 500 9px var(--g-mono); fill: #A9E6DC; letter-spacing: 0; }
.g03-sahne .pin-nabiz { transform-box: fill-box; transform-origin: center; animation: g03nabiz 2.8s ease-out infinite; }
.g03-sahne .pin-nabiz.g2 { animation-delay: .7s; } .g03-sahne .pin-nabiz.g3 { animation-delay: 1.4s; } .g03-sahne .pin-nabiz.g4 { animation-delay: 2.1s; }
@keyframes g03nabiz { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
.g03-sahne .cip rect.zemin { fill: #FFFFFF; filter: url(#cipGolge); }
.g03-sahne .cip .c-yer { font: 600 8.5px var(--g-sans); fill: var(--g-soluk); letter-spacing: 0.12em; }
.g03-sahne .cip .c-baslik { font: 600 11px var(--g-sans); fill: var(--g-ikincil); }
.g03-sahne .cip .c-deger { font: 500 13px var(--g-mono); fill: var(--g-murekkep); }
.g03-sahne .cip-cizgi { stroke: #FFFFFF; stroke-width: 1.1; stroke-dasharray: 2 3; opacity: .9; }
.g03-sahne .bitler text { font-family: var(--g-mono); font-weight: 600; fill: #0E4A45; stroke: #FFFFFF; stroke-width: 1; paint-order: stroke; opacity: 0;
    transform-box: fill-box; transform-origin: center; animation: g03bit 9s linear infinite; }
@keyframes g03bit { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 12% { opacity: .7; } 60% { opacity: .55; } 100% { opacity: 0; transform: translate(var(--kayma, 0px), -600px) scale(1.5); } }
.g03-sahne .not { font: 500 10.5px var(--g-sans); fill: rgba(255, 255, 255, .86); paint-order: stroke; stroke: rgba(10, 36, 59, .35); stroke-width: 1.5; }
@media (prefers-reduced-motion: reduce) { .g03-sahne .ag, .g03-sahne .akis, .g03-sahne .pin-nabiz { animation: none; } .g03-sahne .bitler { display: none; } }
@media (max-width: 640px) { .g03-sahne .cip, .g03-sahne .cip-cizgi, .g03-sahne .merkez-rozet, .g03-sahne .akis, .g03-sahne .not { display: none; } }
