/*!
 * soteros-shell.css — application shell + Soteros brand
 *
 * Everything in this file used to live at the tail of sb-admin.css, which was
 * 11,083 lines of which 10,589 were unmodified Bootstrap 4.3.1. Bootstrap now
 * comes from vendor/bootstrap/css/bootstrap.soteros.min.css (a Bootstrap 5.3
 * build compiled with BS4 tokens — see scss/soteros-bootstrap.scss), leaving
 * this file to hold only what Soteros actually authored:
 *
 *   1. Brand tokens + .bg-soteros-* utilities  (the original 6 rules)
 *   2. The SB Admin v5.1.1 shell (#wrapper, .sidebar, .card-body-icon, …)
 *   3. Panic-alert styles
 *
 * Ported verbatim from the 4.3.1 build — no visual change intended in 1.12.
 */

/* --- 1. Soteros brand ---------------------------------------------------- */

:root {
  --soteros-dark-blue: #14264c;
  --soteros-blue: #6380e7;
  --soteros-light-blue: #bbd0ff;
  --font-accent: 'Bai Jamjuree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

.ff-accent { font-family: var(--font-accent); }

.bg-soteros-dark-blue { background-color: #14264c !important; }
.bg-soteros-blue { background-color: #6380e7 !important; }
.bg-soteros-light-blue { background-color: #bbd0ff !important; }

/* --- 2. SB Admin shell (ported) ------------------------------------------ */
#wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

#wrapper #content-wrapper {
  overflow-x: hidden;
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 80px;
}

.scroll-to-top {
  position: fixed;
  right: 15px;
  bottom: 15px;
  display: none;
  width: 50px;
  height: 50px;
  text-align: center;
  color: #fff;
  background: rgba(52, 58, 64, 0.5);
  line-height: 46px;
}

.scroll-to-top:focus, .scroll-to-top:hover {
  color: white;
}

.scroll-to-top:hover {
  background: #343a40;
}

.scroll-to-top i {
  font-weight: 800;
}

.smaller {
  font-size: 0.7rem;
}

.o-hidden {
  overflow: hidden !important;
}

.z-0 {
  z-index: 0;
}

.z-1 {
  z-index: 1;
}

.navbar-nav .form-inline .input-group {
  width: 100%;
}

.navbar-nav .nav-item.active .nav-link {
  color: #fff;
}

.navbar-nav .nav-item.dropdown .dropdown-toggle::after {
  width: 1rem;
  text-align: center;
  float: right;
  vertical-align: 0;
  border: 0;
  font-weight: 900;
  content: '\f105';
  font-family: 'Font Awesome 5 Free';
}

.navbar-nav .nav-item.dropdown.show .dropdown-toggle::after {
  content: '\f107';
}

.navbar-nav .nav-item.dropdown.no-arrow .dropdown-toggle::after {
  display: none;
}

.navbar-nav .nav-item .nav-link:focus {
  outline: none;
}

.navbar-nav .nav-item .nav-link .badge {
  position: absolute;
  margin-left: 0.75rem;
  top: 0.3rem;
  font-weight: 400;
  font-size: 0.5rem;
}

@media (min-width: 768px) {
  .navbar-nav .form-inline .input-group {
    width: auto;
  }
}

.sidebar {
  width: 90px !important;
  background-color: #212529;
  min-height: calc(100vh - 56px);
}

.sidebar .nav-item:last-child {
  margin-bottom: 1rem;
}

.sidebar .nav-item .nav-link {
  text-align: center;
  padding: 0.75rem 1rem;
  width: 90px;
}

.sidebar .nav-item .nav-link span {
  font-size: 0.65rem;
  display: block;
}

.sidebar .nav-item .dropdown-menu {
  position: absolute !important;
  -webkit-transform: none !important;
  transform: none !important;
  left: calc(90px + 0.5rem) !important;
  margin: 0;
}

.sidebar .nav-item .dropdown-menu.dropup {
  bottom: 0;
  top: auto !important;
}

.sidebar .nav-item.dropdown .dropdown-toggle::after {
  display: none;
}

.sidebar .nav-item .nav-link {
  color: rgba(255, 255, 255, 0.5);
}

.sidebar .nav-item .nav-link:active, .sidebar .nav-item .nav-link:focus, .sidebar .nav-item .nav-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.sidebar .nav-item.active .nav-link,
.sidebar .nav-item .nav-link.active {
  color: #343a40 !important;
  background-color: #eeeeee;
  border-radius: 0.25rem;
  font-weight: bold;
}

.sidebar.toggled {
  width: 0 !important;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sidebar {
    width: 225px !important;
  }
  .sidebar .nav-item .nav-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem;
    width: 225px;
  }
  .sidebar .nav-item .nav-link span {
    font-size: 1rem;
    display: inline;
  }
  .sidebar .nav-item .dropdown-menu {
    position: static !important;
    margin: 0 1rem;
    top: 0;
  }
  .sidebar .nav-item.dropdown .dropdown-toggle::after {
    display: block;
  }
  .sidebar.toggled {
    overflow: visible;
    width: 90px !important;
  }
  .sidebar.toggled .nav-item:last-child {
    margin-bottom: 1rem;
  }
  .sidebar.toggled .nav-item .nav-link {
    text-align: center;
    padding: 0.75rem 1rem;
    width: 90px;
  }
  .sidebar.toggled .nav-item .nav-link span {
    font-size: 0.65rem;
    display: block;
  }
  .sidebar.toggled .nav-item .dropdown-menu {
    position: absolute !important;
    -webkit-transform: none !important;
    transform: none !important;
    left: calc(90px + 0.5rem) !important;
    margin: 0;
  }
  .sidebar.toggled .nav-item .dropdown-menu.dropup {
    bottom: 0;
    top: auto !important;
  }
  .sidebar.toggled .nav-item.dropdown .dropdown-toggle::after {
    display: none;
  }
}

.card-body-icon {
  position: absolute;
  z-index: 0;
  top: -1.25rem;
  right: -1rem;
  opacity: 0.4;
  font-size: 5rem;
  -webkit-transform: rotate(15deg);
  transform: rotate(15deg);
}

@media (min-width: 576px) {
  .card-columns {
    -webkit-column-count: 1;
    -moz-column-count: 1;
    column-count: 1;
  }
}

@media (min-width: 768px) {
  .card-columns {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
  }
}

@media (min-width: 1200px) {
  .card-columns {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
  }
}

:root {
  --input-padding-x: 0.75rem;
  --input-padding-y: 0.75rem;
}

.card-login {
  max-width: 25rem;
}

.card-register {
  max-width: 40rem;
}

.form-label-group {
  position: relative;
}

.form-label-group > input,
.form-label-group > label {
  padding: var(--input-padding-y) var(--input-padding-x);
  height: auto;
}

.form-label-group > label {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  margin-bottom: 0;
  /* Override default `<label>` margin */
  line-height: 1.5;
  color: #495057;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  -webkit-transition: all 0.1s ease-in-out;
  transition: all 0.1s ease-in-out;
}

.form-label-group input::-webkit-input-placeholder {
  color: transparent;
}

.form-label-group input:-ms-input-placeholder {
  color: transparent;
}

.form-label-group input::-ms-input-placeholder {
  color: transparent;
}

.form-label-group input::-moz-placeholder {
  color: transparent;
}

.form-label-group input::placeholder {
  color: transparent;
}

.form-label-group input:not(:placeholder-shown) {
  padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
  padding-bottom: calc(var(--input-padding-y) / 3);
}

.form-label-group input:not(:placeholder-shown) ~ label {
  padding-top: calc(var(--input-padding-y) / 3);
  padding-bottom: calc(var(--input-padding-y) / 3);
  font-size: 12px;
  color: #777;
}

footer.sticky-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(100% - 90px);
  height: 80px;
  background-color: #e9ecef;
}

footer.sticky-footer .copyright {
  line-height: 1;
  font-size: 0.8rem;
}

@media (min-width: 768px) {
  footer.sticky-footer {
    width: calc(100% - 225px);
  }
}

body.sidebar-toggled footer.sticky-footer {
  width: 100%;
}

@media (min-width: 768px) {
  body.sidebar-toggled footer.sticky-footer {
    width: calc(100% - 90px);
  }
}

/* Panic Alert System Styles */
.panic-alert-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    pointer-events: none;
}

.panic-alert {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    pointer-events: all;
    animation: pulse-glow 2s infinite;
}

.panic-alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.panic-alert-icon {
    font-size: 2rem;
    animation: shake 0.5s infinite;
}

.panic-alert-info {
    flex: 1;
}

.panic-alert-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.panic-alert-details {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.alert-map-link {
    color: white;
    text-decoration: underline;
}

.alert-map-link:hover {
    color: #f8f9fa;
}

.panic-alert-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.panic-alert-actions .btn {
    white-space: nowrap;
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(220, 53, 69, 0.7);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.animate-slide-down {
    animation: slide-down 0.3s ease-out;
}

.animate-fade-out {
    animation: fade-out 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .panic-alert {
        margin: 0.25rem;
        padding: 0.75rem 1rem;
    }

    .panic-alert-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .panic-alert-icon {
        font-size: 1.5rem;
    }

    .panic-alert-actions {
        width: 100%;
        justify-content: stretch;
    }

    .panic-alert-actions .btn {
        flex: 1;
    }
}

/* --- 4. DataTables BS4 parity  [DELETE IN 2.0] --------------------------- */
/*
 * The 1.12 framework bump swapped DataTables' bootstrap4 theme for bootstrap5.
 * The two differ in the space reserved for the sort arrows (30px vs 26px),
 * which changes computed column widths on all 17 list pages. Pinned to the
 * 4.3.1 value so the bump stays visually neutral; drop it in 2.0 when the
 * tables get their real design pass.
 */
table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc,
table.dataTable thead > tr > th.sorting_asc_disabled,
table.dataTable thead > tr > th.sorting_desc_disabled,
table.dataTable thead > tr > td.sorting,
table.dataTable thead > tr > td.sorting_asc,
table.dataTable thead > tr > td.sorting_desc,
table.dataTable thead > tr > td.sorting_asc_disabled,
table.dataTable thead > tr > td.sorting_desc_disabled {
  padding-right: 30px;
}
