:root {
  --app-bg: #f7fafd;
  --app-card: #ffffff;
  --app-primary: #2563eb;
  --app-primary-ink: #1e40af;
  --app-primary-soft: #dbeafe;
  --app-text: #223046;
  --app-muted: #7a869a;
  --app-border: #e3e8ee;
}

body.app-body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  font-size: 13px;
}

.app-navbar {
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
  border-bottom: 1px solid #dbe3f1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.app-navbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-navbar-sticky {
  position: sticky;
  top: 0;
  z-index: 1200;
  backdrop-filter: blur(10px);
}

.app-user-chip {
  white-space: nowrap;
  color: #475569;
  font-weight: 600;
}

.brand-dot {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 0;
}

.app-nav-link {
  color: #334155 !important;
  border-radius: 11px;
  padding: 8px 12px !important;
  font-weight: 600;
  font-size: 13px;
}

.app-nav-link:hover,
.app-nav-link.active {
  background: #dbeafe;
  color: #1e40af !important;
}

.app-brand {
  color: #1e293b !important;
}

.app-brand:hover {
  color: #0f172a !important;
}

.app-brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}

.app-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-brand-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.app-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
}

.app-menu-dropdown {
  min-width: 210px;
  border-radius: 12px;
  border-color: #dbe3f1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.app-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid #dbe3f1;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.app-title { margin: 0; font-size: 1.03rem; font-weight: 700; }
.app-subtitle { margin: 0; color: var(--app-muted); font-size: 0.8rem; }

.app-card {
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-card);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.form-control, .form-select, .btn {
  min-height: 34px;
  font-size: 13px;
}
.app-card .card-body { padding: 0.8rem 0.9rem; }

.app-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 12px;
  background: linear-gradient(180deg, #eef5ff, #f7fafd 35%);
}

.app-login-shell {
  width: 100%;
  max-width: 430px;
}

.app-login-card {
  width: 100%;
  max-width: 430px;
  border-color: #dbe3f1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.login-logo-wrap {
  text-align: center;
}

.login-logo-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.login-brand { display: block; text-align: center; }
.login-brand h1 {
  font-size: 1.1rem;
  font-weight: 700;
}

.app-login-card .form-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.app-login-card .form-control {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #cfe0fb;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1e293b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.app-login-card .form-control::placeholder {
  color: #94a3b8;
}

.app-login-card .form-control:focus {
  border-color: #60a5fa;
  background: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.16);
}

.login-meta-strip {
  border-color: #d7e4fa;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.login-info {
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 7px 9px;
  background: #f8fbff;
}

.mobile-bottom-nav {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 7px;
  display: flex;
  background: #ffffff;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  z-index: 1050;
  overflow: hidden;
}

.mobile-nav-item {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 3px;
  font-size: 10px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav-item i { font-size: 14px; }
.mobile-nav-item.active { color: var(--app-primary-ink); background: var(--app-primary-soft); }

.nfc-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--app-primary-ink);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 7px;
  border-radius: 999px;
}

.nfc-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #dbe3f1;
  border-radius: 10px;
  background: #ffffff;
}

.nfc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.nfc-session-card {
  border-color: #dbeafe;
  background: #f8fbff;
}

.nfc-session-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nfc-session-content {
  padding: 10px 12px;
}

.nfc-session-label {
  display: block;
  font-size: 10px;
  color: var(--app-muted);
}

.nfc-result {
  border: 1px solid #dbe3f1;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 36px;
  font-weight: 600;
  color: #334155;
}

.nfc-ripple-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
}

.nfc-ripple {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(37, 99, 235, 0.45);
  border-radius: 999px;
  animation: nfcPulse 2s infinite;
}

.nfc-ripple.r2 { animation-delay: .5s; }
.nfc-ripple.r3 { animation-delay: 1s; }

@keyframes nfcPulse {
  0% { transform: scale(.7); opacity: .8; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

.nfc-person-card {
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nfc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(180deg, #1e40af, #60a5fa);
  color: #fff;
  font-weight: 700;
}

.nfc-person-name {
  font-weight: 700;
  font-size: 12px;
}

.nfc-person-dept {
  color: var(--app-muted);
  font-size: 11px;
}

.nfc-screen {
  border-radius: 16px;
  transition: box-shadow .2s ease, background .2s ease;
}

.nfc-page-fixed {
  height: calc(100vh - 170px);
  overflow: hidden;
}

body.app-body.nfc-lock {
  height: 100vh;
  overflow: hidden;
  touch-action: manipulation;
}

body.app-body.nfc-lock main.container-fluid {
  height: calc(100vh - 78px);
  overflow: hidden;
}

.nfc-screen.ok {
  box-shadow: none;
}

.nfc-screen.error {
  box-shadow: none;
}

.nfc-screen.reading {
  box-shadow: none;
}

.nfc-skeleton {
  border: 1px solid var(--app-border);
  border-radius: 9px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.sk {
  display: inline-block;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 45%, #f1f5f9 65%);
  background-size: 240px 100%;
  animation: skMove 1.2s infinite linear;
  border-radius: 6px;
}

.sk-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sk-line { height: 10px; }
.sk-line.w1 { width: 72%; }
.sk-line.w2 { width: 48%; }

@keyframes skMove {
  from { background-position: 0 0; }
  to { background-position: 240px 0; }
}

.app-toast {
  position: fixed;
  right: 12px;
  bottom: 78px;
  background: #111827;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  opacity: 0;
  transform: translateY(8px);
  transition: all .2s ease;
  z-index: 2000;
}

.app-toast.show {
  opacity: .98;
  transform: translateY(0);
}

.app-toast.ok { background: #166534; }
.app-toast.warn { background: #92400e; }
.app-toast.error { background: #991b1b; }

.nfc-hero-card { background: linear-gradient(145deg, #eff6ff, #ffffff 58%); }

.nfc-hero-title { text-align: center; font-size: 1.08rem; margin: 0; font-weight: 700; }
.nfc-hero-subtitle { text-align: center; color: var(--app-muted); font-size: 0.88rem; margin: 8px 0 12px; }
.nfc-scan-btn { border-radius: 12px; font-weight: 700; min-height: 44px; font-size: 14px; }
.nfc-section-title { font-weight: 700; margin-bottom: 8px; font-size: 13px; }

.nfc-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nfc-type-card {
  border: 1px solid #d4deed;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1f2937;
  min-height: 66px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all .2s ease;
  position: relative;
}

.nfc-type-cards .nfc-type-card:not(.active) {
  opacity: 0.72;
}

.nfc-type-card[data-value="GIRIS"] {
  border-color: #b7e4c7;
  background: linear-gradient(180deg, #f6fef9, #eefbf3);
}

.nfc-type-card[data-value="GIRIS"] .nfc-type-icon {
  background: #dcfce7;
  color: #166534;
}

.nfc-type-card[data-value="CIKIS"] {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7f7, #fff1f1);
}

.nfc-type-card[data-value="CIKIS"] .nfc-type-icon {
  background: #fee2e2;
  color: #991b1b;
}

.nfc-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #eff6ff;
  color: var(--app-primary-ink);
}

.nfc-type-content strong {
  display: block;
  font-size: 13px;
}

.nfc-type-content small {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.nfc-type-card.active {
  box-shadow: 0 8px 18px rgba(30, 41, 59, 0.12);
  opacity: 1;
  transform: translateY(-1px);
}

.nfc-type-card[data-value="GIRIS"].active {
  border-color: #4ade80;
  background: linear-gradient(180deg, #ecfdf3, #dcfce7);
  color: #14532d;
}

.nfc-type-card[data-value="GIRIS"].active .nfc-type-icon {
  background: #22c55e;
  color: #ffffff;
}

.nfc-type-card[data-value="CIKIS"].active {
  border-color: #f87171;
  background: linear-gradient(180deg, #fff1f2, #ffe4e6);
  color: #7f1d1d;
}

.nfc-type-card[data-value="CIKIS"].active .nfc-type-icon {
  background: #ef4444;
  color: #ffffff;
}

.nfc-type-card.active::after {
  content: "✓ Aktif";
  position: absolute;
  right: 9px;
  top: -8px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.03em;
}

.nfc-type-card[data-value="GIRIS"].active::after {
  background: #16a34a;
}

.nfc-type-card[data-value="CIKIS"].active::after {
  background: #dc2626;
}

.nfc-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nfc-modal-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #64748b;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

.nfc-modal-item {
  border: 1px solid #e5edf8;
  border-radius: 12px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nfc-modal-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px !important;
}

.nfc-modal-badge.giris {
  background: #dcfce7;
  color: #166534 !important;
  border: 1px solid #86efac;
}

.nfc-modal-badge.cikis {
  background: #fee2e2;
  color: #991b1b !important;
  border: 1px solid #fca5a5;
}

#nfcConfirmModal .modal-content,
#nfcScanModal .modal-content,
#nfcStatusModal .modal-content {
  border-radius: 14px;
  border: 1px solid #dbe3f1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

#nfcConfirmModal .modal-header {
  border-bottom: 1px solid #e5edf8;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

#nfcConfirmModal .modal-footer {
  border-top: 1px solid #e5edf8;
  background: #fbfdff;
}

#nfcConfirmModal .modal-title {
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
}

#nfcConfirmModal .modal-body strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

#nfcConfirmModal .modal-dialog {
  max-width: 560px;
}

#nfcConfirmModal .modal-content {
  border-radius: 16px;
  border-color: #cfddf5;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.2);
}

#nfcConfirmModal .btn.btn-primary {
  border-radius: 10px;
  font-weight: 700;
  min-width: 148px;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}

#nfcConfirmModal .btn.btn-outline-secondary {
  border-radius: 10px;
  font-weight: 600;
}

#nfcScanModal .modal-body .spinner-border {
  width: 1.6rem;
  height: 1.6rem;
}

#nfcStatusModal .modal-header {
  border-bottom: 1px solid #e5edf8;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

#nfcStatusModal .modal-footer {
  border-top: 1px solid #e5edf8;
}

.nfc-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
}

#nfcStatusModal.status-ok .nfc-status-icon {
  background: #dcfce7;
  color: #166534;
}

#nfcStatusModal.status-error .nfc-status-icon {
  background: #fee2e2;
  color: #991b1b;
}

#nfcStatusModal.status-warn .nfc-status-icon {
  background: #fef3c7;
  color: #92400e;
}

#nfcStatusModal.status-info .nfc-status-icon {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 992px) {
  .app-navbar .container-fluid { padding-left: 8px !important; padding-right: 8px !important; }
  .app-brand-title { font-size: 13px; }
  .app-brand-subtitle { font-size: 11px; }
  .app-user-chip { display: inline; font-size: 10px; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
  .brand-logo-img { width: 60px; height: 60px; }
  .app-nav-link { padding: 7px 10px !important; font-size: 11px; }
  .app-page-header { padding: 10px 11px; margin-bottom: 10px; }
  .nfc-meta-strip { padding: 7px 8px; }
  .nfc-meta-item { font-size: 11px; }
  .nfc-page-fixed { height: calc(100vh - 160px); }
  main.container-fluid { padding: 10px 10px 74px !important; }
  .app-card .card-body { padding: 0.84rem; }
  .nfc-hero-title { font-size: 1rem; }
  .nfc-hero-subtitle { font-size: 0.84rem; }
  .nfc-type-cards { grid-template-columns: 1fr 1fr; }
  .app-login-shell { max-width: 390px; }
  .login-logo-img { width: 90px; height: 90px; border-radius: 0; }
  .login-brand h1 { font-size: 1rem; }
  .app-login-card .form-control { font-size: 16px; }
  .nfc-session-grid { grid-template-columns: 1fr; }
  .nfc-modal-grid { grid-template-columns: 1fr; }
}
