.message-alert {
  margin: 0 0 20px 0;
  padding: 16px;
  border-radius: 6px;
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.5;
}

.message-alert-warning {
  background-color: rgba(255, 209, 102, 0.15);
  border-color: var(--warn);
  color: #8b6914;
}

.message-alert-error {
  background-color: rgba(255, 107, 107, 0.15);
  border-color: var(--bad);
  color: #8b2020;
}

.message-alert-success {
  background-color: rgba(29, 209, 161, 0.15);
  border-color: var(--good);
  color: #0b5f4c;
}

.app-footer {
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: #999;
}

.carrier-form-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.carrier-form-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.carrier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: var(--glass-border-nested);
}

.carrier-header-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.carrier-icon {
  font-size: 48px;
}

.carrier-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
}

.back-button {
  background: rgba(255, 255, 255, 0.1);
  border: var(--glass-border-nested);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.section-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: var(--glass-border-nested);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.fg {
  display: flex;
  flex-direction: column;
}

.fg label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.fg input,
.fg select,
.fg textarea {
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border-nested);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.fg input.invalid,
.fg select.invalid,
.fg textarea.invalid {
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.05);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--glass-border-nested);
}

.btn-submit {
  background: var(--yellow);
  color: var(--text-main);
  border: 1px solid var(--yellow-dark);
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.4);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: var(--glass-border-nested);
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.info-box {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-main);
}

.warning-box {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-main);
}

.error-box {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-main);
}

.widget-container {
  margin: 16px 0;
  border: var(--glass-border-nested);
  border-radius: 8px;
  overflow: hidden;
}

.widget-container iframe {
  display: block;
  width: 100%;
  border: none;
}

.carrier-messages-wrap {
  margin-bottom: 24px;
}

.save-contact-box {
  display: none;
  margin: 12px 0 0 0;
}

.save-contact-btn {
  background: #34d399;
  color: #fff;
}

.save-contact-status {
  margin-left: 12px;
  font-size: 13px;
  color: #22c55e;
  display: none;
}

.ab-picker-inline {
  position: absolute;
  z-index: 999999;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  max-height: 280px;
  overflow: auto;
  min-width: 320px;
}

.ab-item-inline {
  padding: 8px 12px;
  cursor: pointer;
}

.ab-item-inline:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ab-item-title {
  font-weight: 600;
}

.ab-item-sub {
  font-size: 12px;
  color: #666;
}

.is-hidden {
  display: none;
}

.block {
  display: block;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.section-label-mt32 {
  margin-top: 32px;
}

.field-help-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.field-help-text-sm {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.label-strong {
  font-weight: 600;
}

.cod-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-no-margin {
  margin: 0;
}

.selected-point-box {
  display: none;
  padding: 12px;
  border-radius: 8px;
}

.selected-point-box-success {
  padding: 16px;
  margin-bottom: 24px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.selected-point-box-muted {
  margin: 16px 0;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border-nested);
}

.selected-point-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.selected-point-title-strong {
  font-weight: 700;
  color: var(--text-main);
}

.selected-point-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.selected-point-name-md {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.selected-point-address {
  opacity: 0.9;
  font-size: 14px;
}

.selected-point-code {
  font-size: 11px;
  margin-top: 8px;
  color: var(--blue);
  font-family: monospace;
}

.selected-point-code-muted {
  opacity: 0.7;
  font-size: 12px;
}

.selected-location-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.selected-location-text {
  font-size: 14px;
  line-height: 1.6;
}

.payment-warning-box {
  margin-top: 14px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.08), rgba(255, 255, 255, 0.01));
  border-left: 4px solid #b91c1c;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 2px 8px 0 rgba(185, 28, 28, 0.04);
}

.warning-icon {
  margin-right: 8px;
}

#packeta-map-widget {
  width: 100%;
  min-height: 600px;
  height: 70vh;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border-nested);
  margin-bottom: 24px;
  background: var(--glass-bg-nested);
}

#packeta-map-widget iframe {
  height: 100% !important;
  min-height: 600px !important;
}

#packeta-selected-point {
  transition: all 0.3s ease;
  border-left: 4px solid #34d399;
}

#ppl-parcelshop-map button {
  background: transparent !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  color: #333 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
}

#ppl-parcelshop-map button:hover {
  background: #f0f0f0 !important;
}

#ppl-parcelshop-map button:focus {
  outline: 2px solid #007bff !important;
  outline-offset: 2px !important;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--glass-border-nested);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.balikovna-search-results {
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--glass-border-nested);
  background: var(--glass);
  display: none;
}

.balikovna-iframe-wrapper {
  margin-top: 8px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 900px;
  min-width: 320px;
  height: 480px;
  min-height: 320px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border-nested);
}

.balikovna-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  min-height: 320px;
  max-height: 640px;
}

.balikovna-result-item-row {
  padding: 10px;
  border-bottom: 1px solid var(--glass-border-nested);
  cursor: pointer;
  transition: background 0.2s;
}

.balikovna-result-item-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.balikovna-item-name {
  font-weight: 600;
  color: var(--text);
}

.balikovna-item-address {
  font-size: 12px;
  color: var(--muted);
}

.balikovna-item-phone {
  font-size: 11px;
  color: var(--blue);
}

.balikovna-result-empty {
  padding: 10px;
  color: var(--muted);
}

.balikovna-result-error {
  padding: 10px;
  color: var(--red);
}

.kpi-num-top {
  margin-top: 8px;
}

.kpi-num-warn {
  color: var(--warn);
}

.kpi-tag-sm {
  font-size: 11px;
}

.kpi-num-sm {
  font-size: 18px;
}

.quick-actions-row {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.quick-actions-push-right {
  margin-left: auto;
}

.kpi-title {
  margin: 0;
  color: var(--muted);
}

.support-modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 720px;
  max-width: 95%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  padding: 18px;
}

.support-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.support-modal-title {
  margin: 0;
}

.support-modal-grid {
  display: flex;
  gap: 12px;
}

.support-col {
  flex: 1;
  max-height: 440px;
  overflow: auto;
}

.support-col-left {
  border-right: 1px solid #eee;
  padding-right: 12px;
}

.support-col-right {
  padding-left: 12px;
}

.support-inbox-row {
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.support-unread {
  color: var(--bad);
  margin-left: 6px;
}

.support-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.support-input {
  width: 100%;
  margin-bottom: 8px;
}

.support-textarea {
  width: 100%;
  height: 160px;
  margin-bottom: 8px;
}

.support-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-status {
  color: var(--muted);
}

.support-thread {
  margin-top: 12px;
  display: none;
}

.support-thread-messages {
  max-height: 180px;
  overflow: auto;
  border: 1px solid #eee;
  padding: 8px;
  border-radius: 6px;
  background: #fafafa;
}

.heatmap-controls-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.heatmap-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 6px;
}

.heatmap-label-left {
  margin-left: 12px;
}

.heatmap-panel {
  height: 360px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.heatmap-map {
  width: 100%;
  height: 100%;
}

.heatmap-empty {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 4;
  color: var(--muted);
  font-size: 14px;
}

.muted-text {
  color: var(--muted);
}

.chart-card-donut {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  min-width: 320px;
  max-width: 100%;
}

.donut-chart-canvas {
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 420px;
  min-width: 240px;
  min-height: 240px;
  aspect-ratio: 1/1;
}

.chart-placeholder {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2;
  pointer-events: none;
}

.chart-placeholder-svg {
  position: absolute;
  top: 0;
  left: 0;
}

.chart-placeholder-text {
  position: relative;
  z-index: 3;
  text-align: center;
  width: 100%;
  color: #b0b6be;
  font-size: 1.1em;
  font-weight: 500;
  opacity: 0.8;
}

.status-chips-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-card-relative {
  position: relative;
}

/* Prevent canvas growth feedback loops on dashboard cards */
.dash-wrap .chart-card {
  min-height: 260px;
  max-height: 360px;
  overflow: hidden;
}

.dash-wrap .chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-wrap .chart-card-donut {
  min-height: 320px;
  max-height: 320px;
}

.support-list-item {
  padding: 10px 6px;
  border-bottom: 1px solid #f1f1f1;
}

.support-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-ticket-subject-row {
  display: flex;
  align-items: center;
}

.ticket-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.ticket-indicator.unread {
  animation: blink 1s step-start infinite;
}

.support-ticket-email {
  font-size: 12px;
  color: var(--muted);
}

.support-ticket-right {
  text-align: right;
}

.support-ticket-btn-wrap {
  margin-top: 6px;
}

.support-msg-wrap {
  margin-bottom: 8px;
}

.support-msg-meta {
  font-size: 12px;
  color: var(--muted);
}

.support-msg-body {
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  margin-top: 6px;
  white-space: pre-wrap;
}

.support-reply-box {
  margin-top: 10px;
}

.support-reply-textarea {
  width: 100%;
  height: 110px;
  margin-bottom: 8px;
}

.support-reply-actions {
  display: flex;
  gap: 8px;
}

.api-link {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.api-link:hover {
  color: var(--yellow-dark);
  text-decoration: underline;
}

.tab-toggle {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
}

.tab-toggle button {
  height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  border: 2px solid #ffcc00;
  background: #fff;
  color: #000;
}

.tab-toggle button:hover {
  background: #efefef;
}

.tab-toggle button.active {
  background: #ffcc00;
  color: #000;
  border-color: #ffcc00;
}

.table-view-content {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.table-view-content > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ab-edit {
  color: #0066cc;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.ab-edit:hover {
  text-decoration: underline;
}

.error-message {
  background: #ffebee;
  border: 1px solid #f44336;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  color: #c62828;
  font-weight: 500;
  display: none;
}

.success-message {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  color: #2e7d32;
  font-weight: 500;
  display: none;
}

.documentation-page .doc-content {
  padding: 0 15px;
}

.doc-content section {
  margin-bottom: 32px;
}

.doc-content h2 {
  margin: 24px 0 16px 0;
  font-size: 24px;
  font-weight: 600;
}

.doc-content h3 {
  margin: 16px 0 12px 0;
  font-size: 18px;
  font-weight: 600;
}

.doc-content p {
  margin: 12px 0;
  line-height: 1.6;
  padding: 0 15px;
}

.doc-content ul,
.doc-content ol {
  margin: 12px 0;
  padding-left: 45px;
}

.doc-content li {
  margin: 8px 0;
  line-height: 1.6;
}

.doc-content .code-block {
  margin: 12px 15px;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 6px;
  overflow-x: auto;
}

.doc-content .code-block pre {
  margin: 0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}
