:root {
  --navy-950: #090e1a;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  --orange-50: #fff7ed;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --cyan-600: #0284c7;
  --cyan-100: #e0f2fe;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--slate-100);
  color: var(--navy-900);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 276px;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-box {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.brand-card img.brs-logo {
  height: 32px;
  object-fit: contain;
}

.brand-subtitle {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-subtitle span.title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffffff;
}

.brand-subtitle span.badge {
  background: var(--orange-600);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.nav-menu {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--slate-400);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.nav-item.active {
  background: var(--orange-600);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-item.active .nav-pill {
  background: rgba(15, 23, 42, 0.35);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.loop-banner-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loop-banner-box img {
  width: 100%;
  max-height: 52px;
  object-fit: contain;
}

/* Main Content Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #ffffff;
  height: 70px;
  padding: 0 28px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy-900);
  letter-spacing: -0.3px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-900);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
}

.status-strip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-500);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-container {
  padding: 26px 28px 60px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange-600);
  color: #ffffff;
}
.btn-primary:hover {
  background: #c2410c;
}

.btn-navy {
  background: var(--navy-900);
  color: #ffffff;
}
.btn-navy:hover {
  background: var(--navy-800);
}

.btn-emerald {
  background: var(--emerald-600);
  color: #ffffff;
}
.btn-emerald:hover {
  background: #047857;
}

.btn-amber {
  background: var(--amber-500);
  color: var(--navy-950);
}
.btn-amber:hover {
  background: var(--amber-600);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--slate-200);
  color: var(--navy-800);
}
.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 9px;
}

/* Filter Bar & Summary Banner */
.summary-banner {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.summary-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.op-tag {
  background: var(--orange-600);
  color: #fff;
  font-weight: 900;
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.summary-counts {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.filter-pill.active {
  background: #ffffff;
  color: var(--navy-900);
  border-color: #ffffff;
}

/* Sade Operasyon Kartları (AGENTS.md 4.A.1 kuralına birebir uygun) */
.op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(410px, 1fr));
  gap: 18px;
}

.op-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  border: 2px solid var(--slate-200);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.op-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.op-card.status-active {
  border-color: var(--orange-600);
}
.op-card.status-waitingInvoiceCode {
  border-color: var(--amber-500);
}
.op-card.status-invoiced {
  border-color: var(--emerald-500);
}

.op-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ship-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ship-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--orange-50);
  color: var(--orange-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ship-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--navy-900);
}

.ship-meta {
  font-size: 12.5px;
  color: var(--slate-500);
  font-weight: 600;
  margin-top: 2px;
}

.status-badge {
  font-size: 11px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 9px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.status-badge.active {
  background: var(--orange-100);
  color: #c2410c;
}
.status-badge.waitingInvoiceCode {
  background: var(--amber-100);
  color: #b45309;
}
.status-badge.invoiced {
  background: var(--emerald-100);
  color: #047857;
}

.op-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.info-badge {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.info-badge.lashing {
  background: var(--cyan-100);
  color: var(--cyan-600);
}
.info-badge.unlashing {
  background: var(--amber-100);
  color: #b45309;
}
.info-badge.staff {
  background: var(--slate-100);
  color: var(--navy-700);
}
.info-badge.photos {
  background: #ecfdf5;
  color: #047857;
}

.op-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.op-card-actions .btn {
  flex: 1;
}

/* Tables & Cards */
.panel-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-bottom: 22px;
}

.panel-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-card-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--navy-900);
}

.panel-card-body {
  padding: 20px 22px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-100);
  font-size: 13.5px;
  color: var(--navy-800);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--slate-50);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  border: 1px solid var(--slate-200);
}

.kpi-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--slate-500);
  text-transform: uppercase;
}

.kpi-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--navy-900);
  margin-top: 6px;
}

/* Photo Grid (+ and -) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.photo-card {
  background: #ffffff;
  border-radius: 16px;
  border: 2px solid var(--slate-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-card.positive {
  border-color: var(--emerald-500);
}

.photo-card.negative {
  border-color: var(--red-600);
}

.photo-visual {
  height: 175px;
  background: var(--navy-900);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.photo-visual:hover img {
  transform: scale(1.03);
}

.photo-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  cursor: zoom-in;
  opacity: 0.9;
}

.brs-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.brs-lightbox-backdrop.open {
  display: flex;
}

.brs-lightbox-dialog {
  width: min(1160px, 96vw);
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
}

.brs-lightbox-header {
  padding: 12px 18px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brs-lightbox-stage {
  flex: 1;
  min-height: 320px;
  max-height: calc(92vh - 125px);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  padding: 12px;
}

.brs-lightbox-stage img {
  max-width: 100%;
  max-height: calc(92vh - 150px);
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.brs-lightbox-stage img.zoomed {
  max-width: none;
  max-height: none;
  width: 165%;
  cursor: zoom-out;
}

.brs-lightbox-footer {
  padding: 11px 18px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.photo-sign-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.photo-sign-pill.pos {
  background: var(--emerald-500);
  color: #ffffff;
}

.photo-sign-pill.neg {
  background: var(--red-600);
  color: #ffffff;
}

.photo-zone-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

.photo-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.photo-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--navy-900);
}

.photo-note {
  font-size: 12.5px;
  color: var(--slate-600);
  background: var(--slate-50);
  padding: 9px 11px;
  border-radius: 9px;
  border-left: 3px solid var(--slate-400);
}

.photo-meta {
  font-size: 11.5px;
  color: var(--slate-500);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* YAKA KARTI / KREDİ KARTI BOYUTU (CR80: 85.6mm x 54mm Dikey / Yatay Standart) */
/* KURAL (Madde 2): Kart üzerinde İSİM YER ALMAZ! Sadece BRS Logo + QR Kod + BRS-QR-xxx kart kodu yer alır (devredilebilir kaliteli kart) */
.badge-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.id-badge-card {
  width: 240px;
  height: 360px;
  background: #ffffff;
  border: 2px solid var(--navy-900);
  border-radius: 18px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  position: relative;
  margin: 0 auto;
}

.id-badge-slot {
  width: 46px;
  height: 7px;
  background: var(--slate-200);
  border-radius: 99px;
  border: 1px solid var(--slate-400);
}

.id-badge-logo {
  height: 34px;
  object-fit: contain;
  margin-top: 6px;
}

.id-badge-qr-box {
  background: #ffffff;
  padding: 12px;
  border-radius: 14px;
  border: 2px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-badge-code {
  font-size: 16px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--navy-900);
  background: var(--slate-100);
  border: 1.5px solid var(--slate-300);
  border-bottom: 3px solid var(--orange-600);
  border-radius: 10px;
  padding: 6px 12px;
  letter-spacing: 1.2px;
  width: 100%;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-window.modal-sm {
  max-width: 520px;
}

.modal-header {
  padding: 18px 24px;
  background: var(--navy-900);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16.5px;
  font-weight: 900;
}

.modal-close {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 24px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy-800);
}

.form-control {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-900);
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--orange-600);
}

/* Tabs inside Operation Detail */
.subtabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--slate-200);
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.subtab-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.subtab-btn.active {
  background: var(--navy-900);
  color: #ffffff;
}

/* Login Screen (LooP + BRS Lojistik) */
.login-screen {
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0%, #090e1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.login-loop-logo {
  height: 44px;
  object-fit: contain;
}

.login-brs-logo {
  height: 40px;
  object-fit: contain;
}

.login-brand-divider {
  width: 1.5px;
  height: 34px;
  background: var(--slate-200);
}

.login-subtitle {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  color: var(--slate-500);
  margin-bottom: 20px;
}

.login-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.login-mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--slate-600);
  cursor: pointer;
}

.login-mode-btn.active {
  background: var(--navy-900);
  color: #ffffff;
}

.login-error-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-100);
  color: var(--red-600);
  font-size: 12.5px;
  font-weight: 700;
}

/* Print Stylesheet for Yaka Kartı & GİB e-Fatura */
#print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .app-shell,
  .modal-backdrop {
    display: none !important;
  }
  #print-area,
  #print-area * {
    visibility: visible;
  }
  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff;
  }
  .print-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12mm;
    padding: 8mm;
  }
  .id-badge-card {
    width: 54mm !important;
    height: 85.6mm !important;
    border: 1.5px solid #0f172a !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 0 !important;
  }
  .port-pdf-report {
    padding: 10mm;
    color: #0f172a;
    font-family: system-ui, -apple-system, sans-serif;
  }
}

/* ============================================================================
 * LİMAN PORTALI (FAZ 1-4) KURUMSAL STİLLERİ
 * ========================================================================== */
.port-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.port-tabs-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.port-tab-btn {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.port-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
.port-filters-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.port-filter-input {
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  color: #0f172a;
  background: #ffffff;
}
.port-op-summary-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 820px) {
  .port-op-summary-row {
    grid-template-columns: 1fr;
  }
}
.port-cover-mouth-card {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.port-cover-mouth-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  border: 1px solid #7dd3fc;
}
.port-timeline-box {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.port-zone-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.port-zone-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.port-zone-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.port-notes-section {
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}
.port-note-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.port-note-item.from-port {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.port-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.port-lightbox-img {
  max-width: 90vw;
  max-height: 74vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.port-lightbox-caption {
  margin-top: 12px;
  color: #f8fafc;
  text-align: center;
  max-width: 720px;
}
.port-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 22px;
  cursor: pointer;
}


/* ============================================================================
 * FAZ 2: TAKVİM (AJANDA + AYLIK İSTATİSTİK), FATURALAR OCR & AYARLAR STİLLERİ
 * ========================================================================== */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.cal-weekday-label {
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  color: #334155;
  background: #f1f5f9;
  padding: 8px 4px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cal-day-cell {
  min-height: 116px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.14s ease;
  cursor: pointer;
}

.cal-day-cell:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.cal-day-cell.muted {
  background: #f8fafc;
  opacity: 0.45;
  cursor: default;
}

.cal-day-cell.today {
  border: 2px solid #ea580c;
  background: #fffaf5;
}

.cal-day-cell.has-stats {
  background: #f0fdf4;
  border-color: #86efac;
}

.cal-day-num {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 900;
  color: #0f172a;
}

.cal-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.cal-pill.op {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.cal-pill.payment {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.cal-pill.alarm {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.cal-pill.done {
  background: #f1f5f9;
  color: #64748b;
  text-decoration: line-through;
}

.settings-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rbac-matrix-table th,
.rbac-matrix-table td {
  text-align: center;
  padding: 9px 8px !important;
  font-size: 12px;
}

.rbac-matrix-table th:first-child,
.rbac-matrix-table td:first-child {
  text-align: left;
  font-weight: 800;
}

@media (max-width: 960px) {
  .cal-month-grid,
  .cal-grid-header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ============================================================================
 * FAZ 3: WHATSAPP WEB TARZI UYGULAMA İÇİ SOHBET & WP QR MOTORU STİLLERİ
 * ========================================================================== */
.wp-chat-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 148px);
  min-height: 540px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wp-chat-sidebar {
  border-right: 1.5px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.wp-chat-room-item {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.14s ease;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.wp-chat-room-item:hover {
  background: #f1f5f9;
}

.wp-chat-room-item.active {
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
}

.wp-chat-main {
  display: flex;
  flex-direction: column;
  background: #efeae2;
  background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 0);
  background-size: 18px 18px;
  min-height: 0;
}

.wp-chat-header {
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.wp-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wp-msg-row {
  display: flex;
  width: 100%;
}

.wp-msg-row.mine {
  justify-content: flex-end;
}

.wp-msg-row.theirs {
  justify-content: flex-start;
}

.wp-msg-bubble {
  max-width: 68%;
  padding: 9px 13px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.wp-msg-bubble.mine {
  background: #d9fdd3;
  color: #0f172a;
  border-top-right-radius: 2px;
}

.wp-msg-bubble.theirs {
  background: #ffffff;
  color: #0f172a;
  border-top-left-radius: 2px;
}

.wp-chat-composer {
  background: #f8fafc;
  border-top: 1.5px solid #e2e8f0;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .wp-chat-shell {
    grid-template-columns: 1fr;
    height: auto;
  }
}
