/* Navbar dropdown dark fix */
.navbar .dropdown-menu {
  background-color: #23272b !important;
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25), 0 1.5px 4px 0 rgba(0,0,0,0.10);
  padding: 0.5rem 0.25rem;
}

.navbar .dropdown-menu .dropdown-item, .notifications-dropdown .dropdown-item, .notifications-dropdown .notification-item {
  color: #fff !important;
  border-radius: 8px;
  margin: 0;
  padding: 0.6rem 1.1rem 0.6rem 1.1rem;
  font-size: 0.98rem;
  position: relative;
  transition: background 0.15s, color 0.15s;
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #212529 !important;
  border: none !important;
}

.navbar .dropdown-menu .dropdown-item:hover, .navbar .dropdown-menu .dropdown-item:focus {
  background: linear-gradient(90deg, #23272b 80%, #223a5e 100%) !important;
  color: #fff !important;
  font-weight: 500;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
  transition: background 0.18s, color 0.18s;
}
.navbar .dropdown-menu .dropdown-header {
  font-size: 1.01rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: transparent;
  border-bottom: 1px solid #343a40;
  margin-bottom: 0.15rem;
  padding-bottom: 0.3rem;
}
/* Linie separator doar pentru notificări, nu pentru fiecare item generic */
.navbar .dropdown-menu .dropdown-item:not(:last-child):not(.notification-item) {
  border-bottom: 1px solid #23272b33;
}

.navbar .dropdown-menu .notification-title {
  color: #00bfff !important;
  font-weight: 600;
  font-size: 1.01rem;
  margin-bottom: 0.05rem;
}
.navbar .dropdown-menu .notification-message {
  color: #fff !important;
  font-size: 0.93rem;
}
.navbar .dropdown-menu .notification-date {
  color: #b0b8c1 !important;
  font-size: 0.89rem;
  margin-top: 0.05rem;
}
.navbar .dropdown-menu .notification-unread {
  background: linear-gradient(90deg, #23272b 80%, #2b3035 100%) !important;
  border-left: 3px solid #00bfff;
}
.navbar .dropdown-menu .no-notifications {
  color: #b0b8c1 !important;
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
}
.navbar .nav-link, .navbar .dropdown-toggle, .navbar .navbar-brand {
  color: #fff !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.navbar .nav-link .bi, .navbar .dropdown-item .bi {
  color: #fff !important;
  font-size: 1.2em;
  margin-right: 0.5em;
  vertical-align: -0.15em;
}
.navbar .badge.bg-danger {
  border: 2px solid #23272b;
  font-size: 0.78em;
  font-weight: 600;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.15);
}
.navbar .dropdown-menu-end {
  right: 0;
  left: auto;
}
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.col-destinatii {
    max-width: 400px !important;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow: hidden;
}
        .changelog-timeline {
            border-left: 3px solid #0d6efd;
            margin-left: 16px;
            padding-left: 24px;
        }
        .changelog-entry {
            position: relative;
        }
        .changelog-entry::before {
            content: '';
            position: absolute;
            left: -32px;
            top: 8px;
            width: 16px;
            height: 16px;
            background: #0d6efd;
            border-radius: 50%;
            border: 3px solid #fff;
            box-shadow: 0 0 0 2px #0d6efd;
        }
        .changelog-date .badge {
            font-size: 0.95rem;
        }
        .changelog-title {
            font-weight: 600;
        }
        .changelog-desc {
            white-space: pre-line;
        }
        .changelog-author {
            margin-top: 2px;
        }

.address-highlight {
  background: #e3f2fd;
  border-left: 4px solid #1976d2;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  margin-bottom: 4px;
  width: 90%;
  display: inline-block;
}

.address-highlight:hover {
  background: #bbdefb;
}
.address-highlight i {
    color: #1976d2;
    margin-right: 6px;
}

:root {
  --app-body-bg: #f8f9fa;
  --app-body-color: #212529;
  --app-surface-bg: #ffffff;
  --app-border-color: #dee2e6;
  --app-link-color: #0d6efd;
  --app-link-hover: #0a58ca;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --app-body-bg: #0f1115;
  --app-body-color: #e9ecef;
  --app-surface-bg: #1a1d23;
  --app-border-color: #2c3036;
  --app-link-color: #66b0ff;
  --app-link-hover: #8cc5ff;
}

body {
  background-color: var(--app-body-bg);
  color: var(--app-body-color);
}

a {
  color: var(--app-link-color);
}

a:hover,
a:focus {
  color: var(--app-link-hover);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .popover,
[data-bs-theme="dark"] .tooltip-inner {
  background-color: var(--app-surface-bg);
  color: var(--app-body-color);
  border-color: var(--app-border-color);
}

[data-bs-theme="dark"] .table {
  --bs-table-color: var(--app-body-color);
  --bs-table-bg: rgba(26, 29, 35, 0.9);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-striped-color: var(--bs-table-color);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-table-hover-color: var(--bs-table-color);
}

[data-bs-theme="dark"] .table thead th {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f1f3f5;
  border-color: var(--app-border-color);
}

[data-bs-theme="dark"] .table-info {
  --bs-table-color: #e3f2ff;
  --bs-table-bg: rgba(62, 120, 195, 0.18);
  --bs-table-border-color: rgba(62, 120, 195, 0.28);
}

[data-bs-theme="dark"] .table-danger {
  --bs-table-color: #ffd9dd;
  --bs-table-bg: rgba(220, 53, 69, 0.22);
  --bs-table-border-color: rgba(220, 53, 69, 0.35);
}

[data-bs-theme="dark"] .table-success {
  --bs-table-color: #d1f8e0;
  --bs-table-bg: rgba(25, 135, 84, 0.18);
  --bs-table-border-color: rgba(25, 135, 84, 0.32);
}

[data-bs-theme="dark"] .table-warning {
  --bs-table-color: #fbeac8;
  --bs-table-bg: rgba(255, 193, 7, 0.22);
  --bs-table-border-color: rgba(255, 193, 7, 0.34);
}

[data-bs-theme="dark"] .table-primary {
  --bs-table-color: #d8e8ff;
  --bs-table-bg: rgba(13, 110, 253, 0.18);
  --bs-table-border-color: rgba(13, 110, 253, 0.30);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-check-input,
[data-bs-theme="dark"] .input-group-text {
  background-color: #1f2229;
  border-color: #383d45;
  color: var(--app-body-color);
}

[data-bs-theme="dark"] .form-select option,
[data-bs-theme="dark"] select option {
  background-color: #1f2229;
  color: #e9ecef;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select::placeholder {
  color: #98a1af;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled,
[data-bs-theme="dark"] .form-check-input:disabled,
[data-bs-theme="dark"] .input-group-text:disabled {
  background-color: #272b33;
  color: #8d96a6;
  border-color: #343945;
}

[data-bs-theme="dark"] .form-select option:disabled {
  color: #7e8797;
}

[data-bs-theme="dark"] footer.footer {
  background-color: var(--app-body-bg);
  border-top-color: var(--app-border-color) !important;
  color: #adb5bd;
}

[data-bs-theme="dark"] footer.footer a {
  color: var(--app-link-color);
}

[data-bs-theme="dark"] .address-highlight {
  background: rgba(25, 118, 210, 0.25);
  border-left-color: #64b5f6;
  color: #d0e6ff;
}

[data-bs-theme="dark"] .address-highlight i {
  color: #90caf9;
}

.btn-theme-toggle {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-theme-toggle .bi {
  font-size: 1.1rem;
}

[data-bs-theme="dark"] .btn-theme-toggle {
  color: #f8f9fa;
  border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-theme-toggle:hover,
[data-bs-theme="dark"] .btn-theme-toggle:focus {
  border-color: #adb5bd;
  background-color: rgba(173, 181, 189, 0.12);
}

[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: rgba(108, 117, 125, 0.45) !important;
  color: #f8f9fa;
}

[data-bs-theme="dark"] .badge.bg-warning {
  color: #1e1f23 !important;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .card .bg-light,
[data-bs-theme="dark"] .list-group-item.bg-light,
[data-bs-theme="dark"] .form-control.bg-light {
  background-color: #262a33 !important;
  color: #e9ecef !important;
  border-color: #383d45 !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #b0bac8 !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1f2229;
  border-color: #343a40;
  color: #e9ecef;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #e9ecef;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: rgba(102, 176, 255, 0.2);
  color: #f8f9fa;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
  background-color: #1f2229;
  border-color: #383d45;
  color: #e9ecef;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e9ecef;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9aa6b8;
}

[data-bs-theme="dark"] .select2-dropdown {
  background-color: #1a1f29;
  border-color: #383d45;
  color: #e9ecef;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.75);
}

[data-bs-theme="dark"] .select2-results__option {
  color: #e9ecef;
}

[data-bs-theme="dark"] .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: rgba(102, 176, 255, 0.35) !important;
  color: #f8f9fa !important;
}

[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
  background-color: #131821;
  border-color: #3a3f46;
  color: #e9ecef;
}

.details-field {
  background-color: rgba(248, 249, 252, 0.9);
  border: 1px solid #d6dce2;
  color: #1f2a37;
}

.details-field:focus {
  border-color: #4c8bf5;
  box-shadow: 0 0 0 0.2rem rgba(76, 139, 245, 0.15);
}

[data-bs-theme="dark"] .details-field {
  background-color: #1f2229;
  border: 1px solid #383d45;
  color: #e9ecef;
}

.details-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(13, 110, 253, 0.12);
  color: #0d3d91;
  font-weight: 600;
  letter-spacing: 0.01em;
}

[data-bs-theme="dark"] .details-role-pill {
  background: rgba(102, 176, 255, 0.16);
  color: #cfe5ff;
}

.dosar-sale-layout {
  align-items: stretch;
}

.dosar-sale-card {
  background: var(--app-surface-bg);
  border: 1px solid var(--app-border-color);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dosar-sale-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12);
}

.sale-summary-card {
  background: linear-gradient(165deg, rgba(13, 110, 253, 0.08), rgba(25, 135, 84, 0.05));
}

.sale-form-card {
  background: linear-gradient(160deg, rgba(248, 249, 252, 0.92), rgba(255, 255, 255, 0.94));
  height: 100%;
}

.sale-warning-panel {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.45);
  border-radius: 16px;
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}

.sale-load-card {
  background: rgba(255, 255, 255, 0.85);
  border-style: solid;
}

.sale-note-box {
  border: 1px dashed rgba(255, 193, 7, 0.7);
  background: rgba(255, 248, 225, 0.6);
  border-radius: 14px;
  padding: 1rem;
}

.sale-map {
  height: 300px;
  border-radius: 16px;
  border: 1px solid var(--app-border-color);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}

.sale-coordinates-display {
  background: rgba(248, 249, 252, 0.85);
}

[data-bs-theme="dark"] .dosar-sale-card {
  background: rgba(26, 29, 35, 0.92);
  border-color: rgba(88, 110, 140, 0.35);
  box-shadow: 0 22px 55px rgba(4, 7, 16, 0.65);
}

[data-bs-theme="dark"] .dosar-sale-card:hover {
  box-shadow: 0 28px 65px rgba(4, 7, 16, 0.78);
}

[data-bs-theme="dark"] .sale-summary-card {
  background: linear-gradient(170deg, rgba(13, 110, 253, 0.28), rgba(25, 135, 84, 0.22));
}

[data-bs-theme="dark"] .sale-form-card {
  background: linear-gradient(160deg, rgba(29, 33, 42, 0.95), rgba(18, 20, 27, 0.96));
}

[data-bs-theme="dark"] .sale-warning-panel {
  background: rgba(255, 193, 7, 0.14);
  border-color: rgba(255, 193, 7, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.18);
}

[data-bs-theme="dark"] .sale-load-card {
  background: rgba(32, 34, 42, 0.85);
}

[data-bs-theme="dark"] .sale-note-box {
  border-color: rgba(255, 213, 102, 0.7);
  background: rgba(255, 193, 7, 0.14);
  color: #f9e8b2;
}

[data-bs-theme="dark"] .sale-map {
  border-color: rgba(82, 96, 120, 0.45);
  background: rgba(12, 15, 22, 0.8);
}

[data-bs-theme="dark"] .sale-coordinates-display {
  background: rgba(36, 40, 52, 0.85);
  color: #f1f3f5;
}

.sale-warning-panel .form-label {
  color: #7a5a00;
}

[data-bs-theme="dark"] .sale-warning-panel .form-label {
  color: #f7d680;
}

.sale-warning-panel .form-control,
.sale-warning-panel .form-select {
  background-color: rgba(255, 255, 255, 0.92);
}

[data-bs-theme="dark"] .sale-warning-panel .form-control,
[data-bs-theme="dark"] .sale-warning-panel .form-select {
  background-color: rgba(29, 33, 42, 0.92);
}
