@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --si-bg-0: #060b17;
  --si-bg-1: #0c1426;
  --si-bg-2: #121d34;
  --si-panel: #0f1a31;
  --si-panel-2: #162642;
  --si-border: #29416a;
  --si-text: #e6efff;
  --si-muted: #91a8cc;
  --si-accent: #14d8ff;
  --si-accent-2: #34f0b8;
  --si-danger: #ff6b8a;
  --si-warning: #e8a24a;
  --si-success: #34f0b8;
  --si-radius: 12px;
  --si-shadow: 0 18px 40px rgba(3, 7, 14, 0.45);
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--si-text);
  font-family: "Exo 2", "Open Sans", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo-element,
.nav-label,
.navbar-top-links {
  font-family: "Rajdhani", "Open Sans", sans-serif;
}

body.gray-bg {
  background:
    radial-gradient(1000px 520px at -10% -20%, rgba(20, 216, 255, 0.18), transparent 62%),
    radial-gradient(780px 420px at 110% 0%, rgba(52, 240, 184, 0.14), transparent 64%),
    linear-gradient(155deg, var(--si-bg-0) 0%, var(--si-bg-1) 55%, var(--si-bg-2) 100%);
}

body.gray-bg::before,
body.gray-bg::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(48px);
}

body.gray-bg::before {
  width: 320px;
  height: 320px;
  top: 10%;
  left: -120px;
  background: rgba(20, 216, 255, 0.18);
}

body.gray-bg::after {
  width: 280px;
  height: 280px;
  bottom: 8%;
  right: -90px;
  background: rgba(52, 240, 184, 0.16);
}

#wrapper,
#page-wrapper,
.ibox,
.modal,
.dropdown-menu {
  position: relative;
  z-index: 1;
}

a,
a:hover,
a:focus {
  color: var(--si-accent);
}

.text-muted,
small,
.help-block {
  color: var(--si-muted) !important;
}

hr,
.modal-header,
.modal-footer,
.ibox-title,
.border-bottom {
  border-color: var(--si-border) !important;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  background-color: rgba(8, 16, 32, 0.92);
  border: 1px solid var(--si-border);
  border-radius: 10px;
  color: var(--si-text);
}

.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: var(--si-accent);
  box-shadow: 0 0 0 3px rgba(20, 216, 255, 0.18);
}

.form-control::-webkit-input-placeholder {
  color: #7f98bf;
}

.form-control::-moz-placeholder {
  color: #7f98bf;
}

.form-control:-ms-input-placeholder {
  color: #7f98bf;
}

.btn {
  border-radius: 10px;
}

.btn-primary,
.btn-primary:focus {
  background: linear-gradient(110deg, var(--si-accent), var(--si-accent-2));
  border-color: transparent;
  color: #04111f;
  font-weight: 600;
  text-shadow: none;
}

.btn-primary:hover,
.btn-primary:active,
.open > .dropdown-toggle.btn-primary {
  background: linear-gradient(110deg, #39e0ff, #56ffd0);
  border-color: transparent;
  color: #04111f;
}

.btn-default,
.btn-white {
  background: rgba(12, 22, 41, 0.92);
  border-color: var(--si-border);
  color: var(--si-text);
}

.btn-default:hover,
.btn-white:hover {
  border-color: var(--si-accent);
  color: var(--si-accent);
}

.label,
.badge {
  border-radius: 8px;
}

.label-primary,
.badge-primary {
  background-color: #173f68;
}

.dropdown-menu,
.modal-content,
.ibox-content,
.panel,
.well {
  background-color: rgba(10, 19, 36, 0.96);
  border: 1px solid var(--si-border);
  box-shadow: var(--si-shadow);
  color: var(--si-text);
}

.ibox,
.modal-content {
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.ibox:hover,
.modal-content:hover {
  box-shadow: 0 20px 46px rgba(5, 10, 20, 0.55);
}

.table > thead > tr > th,
.table > tbody > tr > td {
  border-color: rgba(41, 65, 106, 0.7) !important;
}

.table-hover > tbody > tr:hover {
  background-color: rgba(20, 31, 55, 0.72);
}

* {
  scrollbar-color: #3d5d91 rgba(6, 12, 24, 0.65);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(6, 12, 24, 0.65);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2d4f81, #446b9f);
  border-radius: 12px;
}

/* ══════════════════════════════════════════════
   Touch UX — Mobile interaction enhancements
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Suppress blue flash on tap */
  a, button, input, select, textarea, label,
  .btn, .nav a, .list-group-item, .dropdown-toggle {
    -webkit-tap-highlight-color: transparent;
  }

  /* Disable double-tap zoom on interactive elements */
  a, button, input, select, textarea, label, .btn {
    touch-action: manipulation;
  }

  /* Prevent overscroll bounce on fixed containers */
  .sidebar-collapse,
  .nav-second-level,
  .modal-body,
  .dropdown-menu {
    overscroll-behavior: contain;
  }

  /* Smooth momentum scroll inside scrollable areas */
  .sidebar-collapse,
  .modal-body,
  .table-responsive,
  .ibox-content {
    -webkit-overflow-scrolling: touch;
  }
}
