/* =========================================================
   TUAZ — Online İşlemler (kurumsal portal girişi)
   ========================================================= */

/* Üst bant */
.op-hero { position: relative; background: var(--ink-950); color: #fff; padding: calc(var(--header-h) + 40px + 56px) 0 150px; overflow: hidden; isolation: isolate; }
.op-hero-bg { position: absolute; inset: 0; z-index: -2; }
.op-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .32; }
.op-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,9,19,.97) 0%, rgba(5,9,19,.85) 55%, rgba(5,9,19,.6) 100%); }
.op-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--g-gold); opacity: .9; }
.op-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; margin: 0 0 8px; }
.op-hero p { margin: 0; color: var(--silver-400); font-size: 1.02rem; }
.op-hero .breadcrumb { margin-bottom: 18px; }

/* Gövde */
.op-body { background: var(--paper); padding: 0 0 100px; }
.op-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: -100px; position: relative; z-index: 2; }

.op-card { background: #fff; border: 1px solid var(--paper-line); border-radius: 20px; box-shadow: 0 1px 2px rgba(5,9,19,.04), 0 24px 60px -24px rgba(5,9,19,.28); overflow: hidden; }
.op-card-head { display: flex; align-items: center; gap: 16px; padding: 26px 30px; border-bottom: 1px solid var(--paper-line); }
.op-card-head h2 { font-size: 1.2rem; margin: 0 0 2px; letter-spacing: -.01em; }
.op-card-head p { margin: 0; font-size: .88rem; color: var(--silver-500); line-height: 1.5; }
.op-card-head .p-counter { margin-left: auto; }
.op-head-ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--ink-900); color: var(--gold-300); font-size: 1.05rem; }
.op-head-ic.is-green { background: #ECFDF5; color: #047857; }
.op-card-body { padding: 28px 30px; }
.op-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 30px; background: var(--paper); border-top: 1px solid var(--paper-line); font-size: .82rem; color: var(--silver-500); }
.op-card-foot i { color: var(--gold-600); margin-right: 6px; }
.op-card-foot a { color: var(--text-body-dark); font-weight: 600; }
.op-card-foot a:hover { color: var(--gold-700); }
.op-login { border-top: 3px solid var(--gold-500); }

/* Sekmeler */
.login-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--paper-line); margin-bottom: 24px; }
.login-tab { position: relative; z-index: 1; height: 42px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; font-family: var(--f-display); font-weight: 600; font-size: .9rem; color: var(--text-body-dark); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: color .3s; }
.login-tab.active { color: #fff; }
.tab-glider { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: var(--ink-900); box-shadow: 0 6px 16px -8px rgba(5,9,19,.6); transition: transform .4s var(--ease); }
.login-tab[data-type="firma"].active ~ .tab-glider { transform: translateX(100%); }

/* Alanlar */
.form-group-modern { margin-bottom: 18px; }
.form-group-modern label { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; font-size: .84rem; color: var(--text-dark); margin-bottom: 8px; }
.form-group-modern label i { color: var(--gold-600); font-size: .78rem; }
.form-control-modern { width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid #D9D3C4; background: #fff; font: inherit; color: var(--text-dark); transition: border-color .25s, box-shadow .25s; }
.form-control-modern::placeholder { color: #A1A8B5; }
.form-control-modern:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(226,184,92,.18); }
.pw-wrap { position: relative; }
.pw-wrap .form-control-modern { padding-right: 50px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--silver-500); cursor: pointer; }
.pw-toggle:hover { color: var(--gold-700); background: var(--paper); }
.captcha-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.captcha-q { height: 52px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--paper-line); color: var(--text-dark); font-family: var(--f-display); font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.recaptcha-box { overflow-x: auto; }
.code-input { text-align: center; letter-spacing: .6em; font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; height: 58px; }
.btn-block { width: 100%; margin-top: 6px; --bh: 54px; border-radius: 12px; }
.op-login .btn-ghost { color: var(--text-dark); border: 1px solid #D9D3C4; background: #fff; backdrop-filter: none; }
.op-login .btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-700); }
.login-help { margin: 18px 0 0; font-size: .84rem; color: var(--silver-500); text-align: center; }
.login-help a { color: var(--gold-700); font-weight: 600; }
.login-help a:hover { text-decoration: underline; }

/* Uyarılar */
.alert-modern { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .87rem; margin-bottom: 20px; line-height: 1.5; }
.alert-modern i { margin-top: 3px; }
.alert-modern.is-error { background: #FDECEC; color: #9B1C1C; border: 1px solid #F8C9C9; }
.alert-modern.is-warn { background: #FEF6E4; color: #8A5A00; border: 1px solid #F6DFAF; }
.alert-modern.is-info { background: #EAF6F0; color: #0F6B47; border: 1px solid #C3E8D5; }

/* Doğrulama kodu */
.code-intro { text-align: center; margin-bottom: 20px; }
.code-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--paper-line); color: var(--gold-700); font-size: 1.3rem; }
.code-intro h3 { font-size: 1.15rem; }
.code-intro p { font-size: .9rem; margin: 0 0 6px; }
.code-intro .muted { color: var(--silver-500); }
.cancel-form { text-align: center; margin-top: 14px; }
.link-btn { border: 0; background: none; color: var(--silver-500); font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--gold-700); }

/* Giriş yapılmış */
.me { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--paper-line); margin-bottom: 18px; }
.me-avatar { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.me-avatar img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-500); background: #fff; }
.me-dot { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: #10B981; border: 2px solid #fff; }
.me h3 { font-size: 1.1rem; margin: 0 0 2px; }
.me p { margin: 0; color: var(--gold-700); font-weight: 600; font-size: .86rem; }
.me-actions { display: grid; gap: 10px; }

/* Online kullanıcılar */
.p-counter { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #ECFDF5; border: 1px solid #A7F3D0; color: #047857; font-family: var(--f-display); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.p-counter .status-dot { background: #10B981; }
.p-counter div { display: inline; }
.op-team .op-card-body { padding: 18px 20px 22px; }
#online-users-container { max-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #D9D3C4 transparent; }
#online-users-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.online-user-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; background: #fff; border: 1px solid var(--paper-line); transition: border-color .2s, box-shadow .2s, background .2s; }
.online-user-item:hover { border-color: var(--gold-400); box-shadow: 0 8px 20px -12px rgba(5,9,19,.3); }
.online-user-vip { background: linear-gradient(135deg, #FBF5E6, #fff); border-color: #EBD9A8; }
.user-avatar-wrapper { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--gold-500); background: #fff; }
.user-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-info { min-width: 0; flex: 1; }
.user-name { color: var(--text-dark); font-family: var(--f-display); font-weight: 600; font-size: .9rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--gold-700); font-size: .76rem; font-weight: 600; }
.online-indicator { width: 9px; height: 9px; border-radius: 50%; background: #10B981; flex-shrink: 0; box-shadow: 0 0 0 3px #D1FAE5; }
.no-users { grid-column: 1 / -1; text-align: center; padding: 34px 10px; color: var(--silver-500); font-size: .92rem; }
#online-users-loading { text-align: center; padding: 34px 10px; color: var(--silver-500); font-size: .92rem; }
.spinner-modern { width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid #EFE6CF; border-top-color: var(--gold-500); animation: spin .8s linear infinite; }

/* Kullanıcı detay modalı */
#userDetailsModal { position: fixed; inset: 0; z-index: 10000; background: rgba(5,9,19,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 20px; align-items: center; justify-content: center; overflow: auto; }
.user-details-modal-card { width: 100%; max-width: 480px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 20px; border-top: 3px solid var(--gold-500); box-shadow: var(--shadow-2); position: relative; }
.udm-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--paper-line); }
.user-details-modal-title { margin: 0; font-size: 1.1rem; }
.udm-close { width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--paper); color: var(--silver-500); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.udm-close:hover { color: var(--gold-700); }
#userDetailsContent { padding: 22px; overflow: auto; }
.udm-person { display: flex; gap: 14px; align-items: center; }
#userModalAvatar { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--gold-500); overflow: hidden; background: #fff; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.udm-names { min-width: 0; }
#userModalName { margin: 0 0 4px; font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#userModalRole { color: var(--gold-700); font-weight: 700; font-size: .85rem; }
.user-details-grid { display: grid; grid-template-columns: 130px 1fr; gap: 12px 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--paper-line); font-size: .9rem; }
.user-details-grid > div:nth-child(odd) { color: var(--silver-500); font-weight: 600; }
.user-details-grid > div:nth-child(even) { color: var(--text-dark); font-weight: 700; word-break: break-word; }

@media (max-width: 1100px) {
  .op-grid { grid-template-columns: 1fr; max-width: 640px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .op-hero { padding: calc(var(--header-h) + 40px) 0 120px; }
  .op-card-head, .op-card-body { padding-left: 20px; padding-right: 20px; }
  .op-card-foot { padding: 14px 20px; }
  #online-users-content { grid-template-columns: 1fr; }
  .op-team .op-card-head { flex-wrap: wrap; }
}

/* Google reCAPTCHA: ortalı */
.recaptcha-group label { justify-content: center; }
.recaptcha-box { display: flex; justify-content: center; align-items: center; padding: 14px 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--paper-line); overflow: hidden; }
.recaptcha-box .g-recaptcha { display: inline-block; }
@media (max-width: 380px) {
  .recaptcha-box .g-recaptcha { transform: scale(.88); transform-origin: center; }
}
