/* Copyright (c) 2026 Uğur Yıldız. All rights reserved.
   SPDX-License-Identifier: LicenseRef-hitsm-Proprietary */

/* Portal (/destek), tanıtım (/demo) ve giriş ekranı. Renkler hitsm/brand.py ile aynı tutulur. */
:root {
	--h-ink: #0f1b33;
	--h-ink-2: #4b5a73;
	--h-ink-3: #7a879c;
	--h-primary: #3046d9;
	--h-primary-dark: #2235b0;
	--h-primary-soft: #eceffd;
	--h-accent: #f2a541;
	--h-accent-soft: #fdf2e1;
	--h-ok: #1e9e6a;
	--h-ok-soft: #e4f5ec;
	--h-bad: #d64545;
	--h-bad-soft: #fbe9e9;
	--h-warn: #a96a00;
	--h-warn-soft: #fff4e0;
	--h-info: #2457c5;
	--h-info-soft: #e8effc;
	--h-bg: #f4f6fb;
	--h-surface: #ffffff;
	--h-line: #dfe4ee;
	--h-line-soft: #eef1f6;
	--h-radius: 12px;
	--h-font: var(--font-stack, "InterVariable", "Inter", "Segoe UI", system-ui, sans-serif);
}

.h { font-family: var(--h-font); color: var(--h-ink); background: var(--h-bg); font-size: 14px; line-height: 1.55; min-height: 100vh; padding-bottom: 56px; }
.h * { box-sizing: border-box; }
.h a { color: var(--h-primary); }
.h-wrap { max-width: 1180px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-left, 0px)) 0; display: flex; flex-direction: column; gap: 20px; }
.h h1, .h h2, .h h3 { margin: 0; color: var(--h-ink); letter-spacing: -0.01em; }
.h h1 { font-size: 26px; font-weight: 800; }
.h h2 { font-size: 18px; font-weight: 700; }
.h h3 { font-size: 15px; font-weight: 700; }
.h p { margin: 0; }
.h-muted { color: var(--h-ink-2); }
.h-small { font-size: 13px; }
.h-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* Üst menü */
.h-top { background: var(--h-ink); color: #fff; }
.h-nav { max-width: 1180px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; min-height: 60px; }
.h-nav a { color: #c9d2e6; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.h-nav a:hover { color: #fff; }
.h-nav a.is-active { color: #fff; border-bottom-color: var(--h-accent); }
.h-nav .h-brand { display: flex; align-items: center; gap: 10px; border: 0; margin-right: 10px; }
.h-nav .h-brand img { display: block; }
.h-nav .h-spacer { flex: 1 1 auto; }
.h-nav .h-user { color: #c9d2e6; font-size: 13px; }
.h-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--h-accent); color: var(--h-ink); font-size: 12px; font-weight: 800; margin-left: 4px; }

/* Kartlar ve yerleşim */
.h-card { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: var(--h-radius); padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.h-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.h-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.h-grow { flex: 1 1 auto; min-width: 0; }
.h-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.h-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.h-side { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }

.h-hero { background: linear-gradient(120deg, var(--h-ink) 0%, #1a2b55 55%, var(--h-primary-dark) 100%); color: #fff; border-radius: var(--h-radius); padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.h-hero h1 { color: #fff; }
.h-hero p { color: #cfd7ec; max-width: 680px; }
.h-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(242, 165, 65, 0.18); }
.h-search { display: flex; gap: 8px; max-width: 680px; position: relative; z-index: 1; }
.h-search input { flex: 1 1 auto; min-height: 48px; border-radius: 8px; border: 0; padding: 0 16px; font: inherit; font-size: 15px; }

.h-tile { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--h-ink); background: var(--h-surface); border: 1px solid var(--h-line); border-radius: var(--h-radius); padding: 16px 18px; transition: border-color .15s, box-shadow .15s; }
.h a.h-tile { color: var(--h-ink); text-decoration: none; }
.h-tile:hover { border-color: var(--h-primary); box-shadow: 0 4px 14px rgba(48, 70, 217, 0.10); }
.h-tile .h-ico { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--h-primary-soft); color: var(--h-primary); display: flex; align-items: center; justify-content: center; }
.h-tile .h-ico.is-adm { background: var(--h-accent-soft); color: #9a5a00; }
.h-tile b { display: block; font-size: 15px; }

.h-action { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--h-radius); text-decoration: none; color: #fff; }
.h a.h-action { color: #fff; text-decoration: none; }
.h-action b { font-size: 16px; }
.h-action span { color: rgba(255, 255, 255, 0.82); font-size: 13px; }
.h-action.is-red { background: #c2410c; }
.h-action.is-blue { background: var(--h-primary); }
.h-action.is-ink { background: #1f2d4f; }
.h-action.is-green { background: #13795b; }

/* Durum ve öncelik rozetleri */
.h-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--h-line-soft); color: var(--h-ink-2); }
.h-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.h-pill.t-ok { background: var(--h-ok-soft); color: var(--h-ok); }
.h-pill.t-bad { background: var(--h-bad-soft); color: var(--h-bad); }
.h-pill.t-warn { background: var(--h-warn-soft); color: var(--h-warn); }
.h-pill.t-info { background: var(--h-info-soft); color: var(--h-info); }
.h-pill.t-muted { background: var(--h-line-soft); color: var(--h-ink-3); }

/* Liste */
.h-list { display: flex; flex-direction: column; }
.h-item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--h-line-soft); text-decoration: none; color: var(--h-ink); }
.h a.h-item { color: var(--h-ink); text-decoration: none; }
.h-item:last-child { border-bottom: 0; }
.h-item:hover { background: var(--h-bg); }
.h-item .h-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--h-ink-3); min-width: 120px; }
.h-empty { padding: 24px; text-align: center; color: var(--h-ink-3); }

/* Form */
.h-field { display: flex; flex-direction: column; gap: 6px; }
.h-field label { font-weight: 600; font-size: 13px; }
.h-field .h-req { color: var(--h-bad); }
.h input[type="text"], .h input[type="date"], .h input[type="number"], .h input[type="search"], .h select, .h textarea { font: inherit; color: var(--h-ink); border: 1px solid var(--h-line); border-radius: 8px; padding: 10px 12px; background: #fff; min-height: 44px; width: 100%; }
.h textarea { min-height: 110px; resize: vertical; }
.h-check { display: flex; gap: 10px; align-items: center; min-height: 32px; }
.h-check input { width: 18px; height: 18px; }

.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid var(--h-line); background: var(--h-surface); color: var(--h-ink); text-decoration: none; }
.h a.h-btn { color: var(--h-ink); text-decoration: none; }
.h-btn:hover { border-color: var(--h-ink-2); }
.h-btn-primary, .h a.h-btn-primary { background: var(--h-primary); color: #fff; border-color: var(--h-primary); }
.h-btn-primary:hover { background: var(--h-primary-dark); border-color: var(--h-primary-dark); }
.h-btn-danger { background: var(--h-bad); color: #fff; border-color: var(--h-bad); }
.h-btn-accent, .h a.h-btn-accent { background: var(--h-accent); color: var(--h-ink); border-color: var(--h-accent); }
.h-btn[disabled] { opacity: .5; cursor: not-allowed; }
.h button:focus-visible, .h a:focus-visible, .h input:focus-visible, .h textarea:focus-visible, .h select:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 2px; }

.h-note { border-radius: 8px; padding: 12px 14px; font-size: 13.5px; background: var(--h-info-soft); color: #1f3d7a; }
.h-note.is-warn { background: var(--h-warn-soft); color: #7a4b00; }
.h-note.is-ok { background: var(--h-ok-soft); color: #11603f; }
.h-note.is-bad { background: var(--h-bad-soft); color: #8f2323; }

/* Kayıt ayrıntısı */
.h-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13.5px; }
.h-facts dt { color: var(--h-ink-3); }
.h-facts dd { margin: 0; }
.h-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.h-step { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--h-line); color: var(--h-ink-3); background: #fff; }
.h-step.is-done { background: var(--h-ok-soft); color: var(--h-ok); border-color: transparent; }
.h-step.is-now { background: var(--h-primary); color: #fff; border-color: var(--h-primary); font-weight: 700; }
.h-timeline { display: flex; flex-direction: column; gap: 12px; }
.h-msg { border: 1px solid var(--h-line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.h-msg.is-me { background: var(--h-primary-soft); border-color: transparent; }
.h-msg header { display: flex; gap: 8px; font-size: 12.5px; color: var(--h-ink-3); margin-bottom: 4px; }
.h-msg header b { color: var(--h-ink); }
.h-article { font-size: 15px; line-height: 1.7; }
.h-article img { max-width: 100%; height: auto; }
.h-article code { background: var(--h-line-soft); padding: 1px 6px; border-radius: 4px; }

.h-stars { display: inline-flex; gap: 4px; }
.h-star { background: none; border: 0; padding: 4px; cursor: pointer; color: #c6cedb; min-width: 36px; min-height: 36px; }
.h-star.is-on { color: var(--h-accent); }
.h-star svg { fill: currentColor; }

.h-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--h-ink); color: #fff; padding: 12px 18px; border-radius: 8px; z-index: 1000; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.h-dialog { border: 0; border-radius: var(--h-radius); padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(15, 27, 51, .3); }
.h-dialog::backdrop { background: rgba(15, 27, 51, .45); }
.h-dialog form { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 640px) {
	.h-wrap { padding-top: 16px; }
	.h-card { padding: 16px; }
	.h-hero { padding: 22px 20px; }
	.h-item .h-id { min-width: 0; }
	.h-facts { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- giriş ekranı */
.h-login { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; overflow: auto; background: #fff; font-family: var(--h-font); }
.h-login-brand { background: radial-gradient(900px 520px at 110% 110%, rgba(124, 92, 255, .45), transparent 60%), radial-gradient(700px 420px at -10% -10%, rgba(242, 165, 65, .18), transparent 60%), linear-gradient(160deg, var(--h-ink) 0%, #152450 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.h-login-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 64px solid rgba(242, 165, 65, 0.16); }
.h-login-pitch { max-width: 480px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.h-login-pitch h1 { font-size: 32px; line-height: 1.2; font-weight: 800; margin: 0; color: #fff; }
.h-login-pitch p { color: #cfd7ec; font-size: 15px; margin: 0; }
.h-login-pitch ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; color: #e3e8f6; }
.h-login-pitch li { display: flex; gap: 10px; }
.h-login-pitch li span { color: var(--h-accent); font-weight: 800; }
.h-login-foot { color: #9aa7c4; font-size: 13px; position: relative; z-index: 1; }
.h-login-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--h-bg); }
.h-login-form { width: 100%; max-width: 420px; }
.h-login-form .page-card { box-shadow: 0 12px 40px rgba(15, 27, 51, 0.08); border-radius: var(--h-radius); }
.h-login-form .btn-primary { background: var(--h-primary); border-color: var(--h-primary); }
.h-login-help, .h-login-notice { font-size: 13px; color: var(--h-ink-2); margin: 16px 4px 0; }
.h-login-notice a { color: var(--h-primary); font-weight: 700; }
.h-login-institution { display: flex; justify-content: center; margin-bottom: 22px; }
/* Beyaz zeminli kurum logosu açık zeminde kutu gibi görünmesin. */
.h-login-institution img { display: block; height: 64px; width: auto; max-width: 260px; object-fit: contain; mix-blend-mode: multiply; }
.h-login-kicker { font-size: 14px; font-weight: 700; color: var(--h-primary); margin-bottom: 4px; }
@media (max-width: 900px) {
	.h-login { grid-template-columns: 1fr; position: static; }
	.h-login-brand { padding: 28px 24px; }
	.h-login-pitch h1 { font-size: 24px; }
	.h-login-pitch ul, .h-login-brand::after { display: none; }
}
