:root {
  --portal-primary: #696cff;
  --portal-primary-dark: #5457e8;
  --portal-bg: #f5f5f9;
  --portal-card: #ffffff;
  --portal-text: #566a7f;
  --portal-muted: #8b9bb0;
  --portal-heading: #384551;
  --portal-border: #e4e6ef;
  --portal-soft: #f0f1ff;
  --portal-shadow: 0 .35rem 1rem rgba(67, 89, 113, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background:
    radial-gradient(circle at top left, rgba(105,108,255,.10), transparent 28rem),
    radial-gradient(circle at top right, rgba(3,195,236,.07), transparent 22rem),
    var(--portal-bg);
  color: var(--portal-text);
  font-family: 'Public Sans', sans-serif;
}
a { color: inherit; }
.text-heading { color: var(--portal-heading) !important; }

.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }
.portal-topbar { position: sticky; top: 0; z-index: 1030; padding: .9rem 0 .35rem; backdrop-filter: blur(12px); }
.portal-nav-card {
  min-height: 68px;
  border-radius: 1rem;
  background: rgba(255,255,255,.92);
  box-shadow: var(--portal-shadow);
  border: 1px solid rgba(67,89,113,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
}
.portal-brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; min-width: 0; }
.portal-brand-mark {
  width: 42px; height: 42px; border-radius: .95rem;
  background: linear-gradient(135deg, var(--portal-primary), #8b8dff);
  color: #fff; display: inline-grid; place-items: center;
  font-weight: 800; letter-spacing: -.08em; box-shadow: 0 .5rem 1rem rgba(105,108,255,.22); flex: 0 0 auto;
}
.portal-brand-copy { display: grid; line-height: 1.1; min-width: 0; }
.portal-brand-title { color: var(--portal-heading); font-weight: 700; font-size: 1.05rem; }
.portal-brand-copy small { color: var(--portal-muted); margin-top: .15rem; }
.portal-nav-actions { display: inline-flex; align-items: center; gap: .65rem; }
.portal-nav-badge {
  align-items: center; gap: .4rem; padding: .55rem .75rem; border-radius: 999px;
  background: rgba(105,108,255,.10); color: var(--portal-primary); font-size: .85rem; font-weight: 600;
}
.portal-nav-actions .btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; }
.portal-main { flex: 1 0 auto; }
.portal-container { padding-top: 1.1rem; padding-bottom: 2rem; }
.portal-footer { flex-shrink: 0; border-top: 1px solid rgba(67,89,113,.08); background: rgba(255,255,255,.72); }
.portal-footer-inner { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; color: var(--portal-muted); font-size: .85rem; }

.portal-card,
.portal-feature-card,
.portal-kpi-card,
.portal-mobile-row,
.portal-empty-state {
  border: 1px solid rgba(67,89,113,.08);
  border-radius: 1rem;
  box-shadow: var(--portal-shadow);
  background: var(--portal-card);
}
.portal-card { overflow: hidden; }

.portal-hero-card {
  position: relative; overflow: hidden; border-radius: 1.25rem;
  background: linear-gradient(135deg, #696cff 0%, #7f82ff 48%, #03c3ec 140%);
  color: #fff; padding: 1.35rem; display: flex; align-items: stretch; justify-content: space-between; gap: 1rem;
  box-shadow: 0 1rem 2.4rem rgba(105,108,255,.22);
}
.portal-hero-card::after {
  content: ""; position: absolute; right: -6rem; top: -7rem; width: 19rem; height: 19rem;
  background: rgba(255,255,255,.13); border-radius: 50%;
}
.portal-hero-content, .portal-hero-side, .portal-hero-visual { position: relative; z-index: 1; }
.portal-hero-content { min-width: 0; max-width: 760px; }
.portal-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: .82rem; margin-bottom: .75rem;
}
.portal-hero-card h1 { margin: 0 0 .45rem; color: #fff; font-weight: 800; font-size: clamp(1.55rem, 2.8vw, 2.55rem); letter-spacing: -.02em; }
.portal-hero-card p { margin: 0; color: rgba(255,255,255,.78); max-width: 680px; }
.portal-hero-tags { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.portal-hero-tags span {
  display: inline-flex; align-items: center; gap: .38rem; padding: .45rem .65rem; border-radius: .8rem;
  background: rgba(255,255,255,.16); color: #fff; font-size: .86rem; min-width: 0;
}
.portal-hero-side { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; min-width: 170px; text-align: right; }
.portal-status-pill {
  display: inline-flex; align-items: center; justify-content: center; padding: .55rem .8rem; border-radius: 999px; font-weight: 800; margin-bottom: .45rem;
  background: #fff !important;
}
.portal-hero-side small { color: rgba(255,255,255,.72); }
.portal-hero-device {
  width: 230px; min-height: 165px; border-radius: 1.1rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem;
}
.portal-hero-device i { font-size: 3.2rem; margin-bottom: .5rem; }
.portal-hero-device strong { color: #fff; font-size: 1.05rem; }
.portal-hero-device small { color: rgba(255,255,255,.75); margin-top: .25rem; }

.portal-alert { display: flex; align-items: flex-start; gap: .65rem; border: 0; border-radius: 1rem; box-shadow: var(--portal-shadow); }
.portal-alert i { font-size: 1.25rem; margin-top: .1rem; }

.portal-section-heading { display: flex; align-items: flex-start; gap: .8rem; }
.portal-section-icon,
.portal-feature-icon,
.portal-kpi-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  color: var(--portal-primary);
}
.portal-section-icon { width: 42px; height: 42px; border-radius: .9rem; background: rgba(105,108,255,.12); font-size: 1.25rem; }
.portal-section-heading h2 { margin: 0; color: var(--portal-heading); font-size: 1.18rem; font-weight: 800; }
.portal-section-heading p { margin: .18rem 0 0; color: var(--portal-muted); font-size: .88rem; }

.portal-form-grid { display: grid; gap: 1rem; }
.portal-input-lg .input-group-text,
.portal-input-lg .form-control { min-height: 50px; }
.portal-input-lg .input-group-text { border-top-left-radius: .85rem; border-bottom-left-radius: .85rem; }
.portal-input-lg .form-control { border-top-right-radius: .85rem; border-bottom-right-radius: .85rem; }
.form-control, .form-select { border-radius: .75rem; border-color: #d9dee3; }
.form-control:focus, .form-select:focus { border-color: var(--portal-primary); box-shadow: 0 0 0 .18rem rgba(105,108,255,.14); }
textarea.form-control { resize: vertical; }
.portal-divider { display: flex; align-items: center; gap: .75rem; color: var(--portal-muted); font-size: .85rem; }
.portal-divider::before, .portal-divider::after { content: ""; height: 1px; background: var(--portal-border); flex: 1; }
.portal-main-submit { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-primary { background-color: var(--portal-primary); border-color: var(--portal-primary); box-shadow: 0 .3rem .8rem rgba(105,108,255,.20); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--portal-primary-dark); border-color: var(--portal-primary-dark); }

.portal-feature-card { display: flex; gap: 1rem; padding: 1rem; height: 100%; }
.portal-feature-card h3 { color: var(--portal-heading); font-size: 1rem; font-weight: 800; margin: 0 0 .25rem; }
.portal-feature-card p { margin: 0; color: var(--portal-muted); font-size: .9rem; }
.portal-feature-icon { width: 44px; height: 44px; border-radius: .9rem; font-size: 1.25rem; }
.portal-feature-accent { background: linear-gradient(135deg, #fff, rgba(105,108,255,.06)); }

.portal-kpi-card { padding: 1rem; height: 100%; display: grid; gap: .35rem; min-height: 124px; }
.portal-kpi-icon { width: 38px; height: 38px; border-radius: .85rem; font-size: 1.15rem; margin-bottom: .2rem; }
.portal-kpi-card small { color: var(--portal-muted); font-size: .78rem; }
.portal-kpi-card strong { color: var(--portal-heading); font-weight: 800; line-height: 1.2; word-break: break-word; }

.portal-info-list { display: grid; gap: .85rem; }
.portal-info-list > div { display: grid; gap: .2rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--portal-border); }
.portal-info-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-info-list span { font-size: .78rem; color: var(--portal-muted); }
.portal-info-list strong { color: var(--portal-heading); font-weight: 700; word-break: break-word; }

.portal-timeline { display: grid; gap: 1rem; }
.portal-timeline > div { padding-left: 1rem; border-left: 3px solid rgba(105,108,255,.24); }
.portal-timeline span { display: block; font-size: .78rem; color: var(--portal-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.portal-timeline p { margin: .3rem 0 0; color: var(--portal-heading); word-break: break-word; }

.portal-table th { color: #697a8d; font-size: .77rem; text-transform: uppercase; letter-spacing: .04em; }
.portal-table td { vertical-align: middle; }
.portal-empty-state { padding: 1.2rem; text-align: center; color: var(--portal-muted); background: #fafbfc; border-style: dashed; box-shadow: none; }
.portal-mobile-list { display: grid; gap: .75rem; }
.portal-mobile-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem; text-decoration: none; color: var(--portal-text);
  box-shadow: none;
}
.portal-mobile-row strong { color: var(--portal-heading); display: block; font-weight: 800; word-break: break-word; }
.portal-mobile-row small { color: var(--portal-muted); display: block; margin-top: .2rem; }
.portal-mobile-row p { margin: .35rem 0 0; color: var(--portal-text); word-break: break-word; }
.portal-mobile-row .badge { flex-shrink: 0; white-space: nowrap; }
.portal-link-row:hover { transform: translateY(-1px); box-shadow: var(--portal-shadow); color: var(--portal-text); }
.portal-sticky-card { position: sticky; top: 6.5rem; }
.portal-status-large { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; }
.portal-empty-screen h1 { color: var(--portal-heading); font-size: 1.45rem; font-weight: 800; }
.portal-empty-screen p { color: var(--portal-muted); max-width: 460px; margin: 0 auto 1.35rem; }

@media (max-width: 1199.98px) {
  .portal-sticky-card { position: static; }
  .portal-hero-side { align-items: flex-start; text-align: left; min-width: 0; }
}
@media (max-width: 991.98px) {
  .portal-topbar { padding-top: .65rem; }
  .portal-nav-card { border-radius: .9rem; }
  .portal-hero-card { flex-direction: column; padding: 1.15rem; border-radius: 1rem; }
  .portal-hero-tags span { max-width: 100%; overflow-wrap: anywhere; }
  .portal-footer-inner { flex-direction: column; text-align: center; gap: .35rem; }
}
@media (max-width: 767.98px) {
  .container-xxl { padding-left: .85rem; padding-right: .85rem; }
  .portal-container { padding-top: .75rem; padding-bottom: 1.4rem; }
  .portal-nav-card { min-height: 60px; padding: .65rem; }
  .portal-brand-mark { width: 38px; height: 38px; border-radius: .8rem; }
  .portal-brand-title { font-size: .98rem; }
  .portal-brand-copy small { display: none; }
  .portal-nav-actions .btn span { display: none; }
  .portal-hero-card h1 { font-size: 1.45rem; }
  .portal-hero-card p { font-size: .94rem; }
  .portal-hero-tags { gap: .45rem; }
  .portal-hero-tags span { width: 100%; justify-content: flex-start; }
  .portal-section-heading { gap: .65rem; }
  .portal-section-icon { width: 38px; height: 38px; border-radius: .8rem; }
  .portal-section-heading h2 { font-size: 1.05rem; }
  .portal-card .card-body { padding: 1rem !important; }
  .portal-feature-card { padding: .95rem; }
  .portal-kpi-card { min-height: 104px; padding: .9rem; }
  .portal-mobile-row { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .portal-mobile-row .badge { align-self: flex-start; }
  .portal-input-lg .input-group-text,
  .portal-input-lg .form-control { min-height: 48px; }
}
@media (max-width: 420px) {
  .portal-brand-title { font-size: .9rem; }
  .portal-brand-mark { width: 34px; height: 34px; font-size: .9rem; }
  .portal-nav-card { gap: .5rem; }
  .portal-eyebrow { font-size: .76rem; }
  .portal-kpi-card strong { font-size: .95rem; }
}


/* Geçmiş Arızalar Paneli */
.portal-hero-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.portal-hero-actions .btn { min-height: 38px; }
.history-filter-hint {
  display: flex; align-items: flex-start; gap: .55rem; padding: .8rem .9rem;
  border-radius: .9rem; background: rgba(105,108,255,.08); color: var(--portal-text); font-size: .9rem;
}
.history-filter-hint i { color: var(--portal-primary); font-size: 1.1rem; margin-top: .1rem; }
.history-list { display: grid; gap: .85rem; }
.history-item {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) 32px; align-items: center; gap: 1rem;
  padding: 1rem; border: 1px solid rgba(67,89,113,.09); border-radius: 1rem;
  background: #fff; color: var(--portal-text); text-decoration: none; transition: .18s ease;
}
.history-item:hover { color: var(--portal-text); transform: translateY(-1px); box-shadow: var(--portal-shadow); }
.history-date {
  min-height: 78px; border-radius: .95rem; background: rgba(105,108,255,.09);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: .55rem;
}
.history-date strong { color: var(--portal-primary); font-size: 1.45rem; line-height: 1; }
.history-date span { color: var(--portal-muted); font-size: .76rem; margin-top: .25rem; text-transform: uppercase; }
.history-main { min-width: 0; }
.history-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .15rem; }
.history-title-row h3 { color: var(--portal-heading); font-size: 1.05rem; font-weight: 800; margin: 0; word-break: break-word; }
.history-subtitle { color: var(--portal-muted); font-size: .84rem; margin-bottom: .25rem; }
.history-main p { margin: .25rem 0 .55rem; color: var(--portal-text); word-break: break-word; }
.history-process { display: inline-flex; align-items: flex-start; gap: .35rem; color: var(--portal-heading); margin-bottom: .6rem; }
.history-process i { color: #71dd37; margin-top: .1rem; }
.history-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.history-chips span {
  display: inline-flex; align-items: center; gap: .32rem; padding: .38rem .55rem;
  border-radius: 999px; background: #f6f7fb; color: var(--portal-text); font-size: .78rem;
}
.history-chips i { color: var(--portal-primary); }
.history-go { color: var(--portal-primary); font-size: 1.35rem; display: grid; place-items: center; }

@media (max-width: 767.98px) {
  .portal-hero-actions .btn { width: 100%; }
  .history-item { grid-template-columns: 1fr; align-items: stretch; gap: .75rem; padding: .9rem; }
  .history-date { min-height: auto; flex-direction: row; justify-content: flex-start; gap: .45rem; }
  .history-date strong { font-size: 1.05rem; }
  .history-date span { margin-top: 0; }
  .history-title-row { flex-direction: column; gap: .4rem; }
  .history-go { display: none; }
  .history-chips span { width: calc(50% - .25rem); justify-content: center; }
}
@media (max-width: 420px) {
  .history-chips span { width: 100%; }
}
