/*
  Nebulose theme — re-skinned to match the ngeneahub (dynamo-hub) visual
  language: Circular Std typography, Pixit brand greens, rounded 8px
  surfaces. Replaces the Datta Able Bootstrap theme (style.css/dark.css).

  This file re-implements the small subset of Bootstrap 4 classes actually
  used by the templates (grid, buttons, forms, dropdowns, tabs, tables) so
  bootstrap.min.css is no longer loaded. bootstrap.min.js stays loaded for
  the dropdown/tab .show/.active toggling this CSS renders.
*/

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: "Circular Std-Light";
  src: url("../fonts/CircularStd-Light.otf") format("opentype");
  font-weight: 300;
}
@font-face {
  font-family: "Circular Std-Book";
  src: url("../fonts/CircularStd-Book.otf") format("opentype");
  font-weight: 400;
}
@font-face {
  font-family: "Circular Std-Medium";
  src: url("../fonts/CircularStd-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: "Circular Std-Bold";
  src: url("../fonts/CircularStd-Bold.otf") format("opentype");
  font-weight: 700;
}

/* ---------------------------------------------------------- design tokens */

:root {
  /* brand */
  --pixit-primary-light-green: #24B06F;
  --pixit-primary-light-green-darker: #1E935D;
  --pixit-primary-off-white: #F4F4F2;
  --pixit-primary-dark-green-1: #2E6470;
  --pixit-primary-dark-green-2: #244B51;

  /* grays */
  --gray-50: #F9FAFB;
  --gray-100: #F2F4F7;
  --gray-200: #E1DFDA;
  --gray-300: #DADAD3;
  --gray-400: #98A2B3;
  --gray-500: #667085;
  --gray-700: #344054;
  --gray-800: #1D2939;
  --base-gray-700: #393934;
  --base-gray-800: #393934;

  /* semantic */
  --color-error-100: #FEE4E2;
  --color-error-200: #FECDCA;
  --color-error-500: #F04438;
  --color-error-600: #D92D20;
  --color-error-700: #B42318;

  /* form inputs */
  --form-input-bg-color: #FAFAF9;
  --form-input-border-color: var(--gray-200);
  --form-input-label-color: var(--base-gray-700);

  /* type */
  --font-body: "Circular Std-Light", Helvetica, Arial, sans-serif;
  --font-medium: "Circular Std-Medium", Helvetica, Arial, sans-serif;
  --font-bold: "Circular Std-Bold", Helvetica, Arial, sans-serif;
  --font-size-xs: 10px;
  --font-size-s: 12px;
  --font-size-m: 14px;
  --font-size-l: 16px;
  --font-size-xl: 18px;
  --font-size-xxl: 20px;
  --font-size-xxxl: 24px;

  /* shape */
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-xs: 0px 1px 2px #1018280d;
  --shadow-sm: 0px 1px 3px #1018281a, 0px 1px 2px #1018280f;

  /* layout */
  --topbar-height: 67px;
  --left-bar-shrinked-width: 89px;
  --left-bar-expanded-width: 199px;
}

/* ------------------------------------------------------------------ base */

* {
  box-sizing: border-box;
}

/* several elements (e.g. the hidden pixstor_version input) rely on the
   [hidden] attribute for visibility; .form-control/.btn etc below set
   their own `display`, which would otherwise silently override it */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-m);
  color: var(--base-gray-700);
  background-color: var(--pixit-primary-off-white);
}

a {
  color: var(--pixit-primary-dark-green-1);
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 16px 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h3, h4, h5, h6 {
  font-family: var(--font-bold);
  color: var(--base-gray-700);
  margin: 0 0 8px 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-danger, .text-error { color: var(--color-error-600); }
.text-uppercase { text-transform: uppercase; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mr-auto { margin-right: auto; }
.ml-auto { margin-left: auto; }

/* ------------------------------------------------------------------ grid */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

.row > [class^="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
}

.col-sm-12, .col-md-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
.col-md-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }

@media (max-width: 900px) {
  .row > [class*="col-md-"] { flex: 0 0 100%; max-width: 100%; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--pixit-primary-light-green);
  background-color: var(--pixit-primary-light-green);
  color: #fff;
  font-family: var(--font-medium);
  font-size: var(--font-size-m);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background-color 0.15s ease-in;
}

/* templates sometimes combine .btn with .form-control (e.g. the Add/Del
   Space and Add/Del Share buttons) to get an inline, percentage-width
   button via inline style="width:49%" — .form-control's display:block
   would otherwise stack them instead of sitting them side by side */
.form-control.btn {
  display: inline-flex;
  background-color: var(--pixit-primary-light-green);
  border-color: var(--pixit-primary-light-green);
  color: #fff;
}

.btn:hover {
  background-color: var(--pixit-primary-light-green-darker);
  border-color: var(--pixit-primary-light-green-darker);
  color: #fff;
}

.btn:disabled, .btn[disabled] {
  background-color: var(--gray-300);
  border-color: var(--gray-300);
  cursor: not-allowed;
}

.btn.dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 4px;
}

/* ---------------------------------------------------------------- forms */

.form-group {
  margin-bottom: 16px;
}

label {
  font-family: var(--font-medium);
  font-size: var(--font-size-m);
  color: var(--form-input-label-color);
}

.form-control {
  display: block;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  background-color: var(--form-input-bg-color);
  border: 1px solid var(--form-input-border-color);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--font-size-s);
  color: var(--gray-700);
}

textarea.form-control {
  height: auto;
}

select.form-control[multiple] {
  height: auto;
}

.form-control:focus {
  outline: none;
  border-color: var(--pixit-primary-light-green);
}

.form-control:disabled {
  color: var(--gray-400);
  cursor: not-allowed;
}

.form-control.is-invalid {
  border-color: var(--color-error-600);
}

.invalid-feedback {
  display: block;
  margin-top: 6px;
  font-size: var(--font-size-s);
  color: var(--color-error-600);
}

/* custom checkboxes / radios: keep native control, just recolor + space it */
.custom-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding-left: 0;
  margin-bottom: 6px;
}

.custom-control-inline {
  display: inline-flex;
  margin-right: 16px;
}

.custom-control-input {
  width: 16px;
  height: 16px;
  accent-color: var(--pixit-primary-light-green);
  cursor: pointer;
}

.custom-control-label {
  font-family: var(--font-body);
  font-size: var(--font-size-m);
  color: var(--base-gray-700);
  cursor: pointer;
}

/* password-eye input group */
.input-group {
  display: flex;
  align-items: center;
  background-color: var(--form-input-bg-color);
  border: 1px solid var(--form-input-border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.input-group .form-control {
  border: none;
  background: transparent;
  flex: 1;
}

.input-group .form-control:focus {
  border: none;
}

.input-group .input-group-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  max-width: 36px;
  height: 40px;
  padding-right: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
}

/* ---------------------------------------------------------------- cards */

.card {
  background-color: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.card-body {
  padding: 24px;
}

/* ------------------------------------------------------------- dropdown */

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin-top: 4px;
  padding: 6px;
  background-color: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: var(--font-size-s);
  color: var(--base-gray-700);
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: var(--gray-100);
}

/* ------------------------------------------------------------------ tabs */

.nav-tabs {
  display: flex;
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 8px;
}

.nav-tabs .nav-link {
  display: block;
  padding: 10px 4px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: var(--font-medium);
  font-size: var(--font-size-s);
  color: var(--gray-500);
  cursor: pointer;
}

.nav-tabs .nav-link.active {
  color: var(--pixit-primary-dark-green-2);
  border-bottom-color: var(--pixit-primary-light-green);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ----------------------------------------------------------------- table */

.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--font-size-m);
}

.table thead th {
  font-family: var(--font-medium);
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}

.table-hover tbody tr:hover {
  background-color: var(--gray-100);
}

.table td .form-control {
  height: 36px;
}

/* ------------------------------------------------------------- tooltips */

.nebulose_tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--gray-400);
  margin-bottom: 8px;
}

.nebulose_tooltip .nebulose_tooltiptext {
  visibility: hidden;
  width: 280px;
  background-color: var(--pixit-primary-dark-green-2);
  color: #fff;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-s);
  position: absolute;
  z-index: 30;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.2s;
}

.nebulose_tooltip .nebulose_tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--pixit-primary-dark-green-2) transparent transparent transparent;
}

.nebulose_tooltip:hover .nebulose_tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ------------------------------------------------------------- modal */

.nebulose_modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(36, 75, 81, 0.6);
}

.nebulose_modal_content, .nebulose_modal_error_content {
  background-color: #fff;
  margin: 12% auto;
  padding: 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
}

.nebulose_modal_content { width: 30%; min-width: 320px; }
.nebulose_modal_error_content { width: 50%; min-width: 400px; }

.APIclose {
  color: var(--gray-400);
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.APIclose:hover, .APIclose:focus {
  color: var(--base-gray-700);
}

/* -------------------------------------------------------- auth / fullscreen
   Login, register, password-reset and error pages all reuse
   .auth-wrapper > .auth-content > .card, styled after ngeneahub's
   Login.sass centered dark-green card. */

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--pixit-primary-dark-green-2);
}

.auth-content {
  width: 300px;
  max-width: 90vw;
}

.auth-content .card {
  background-color: transparent;
  border: none;
  margin-bottom: 0;
}

.auth-content .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0;
}

.auth-content img {
  max-width: 220px;
}

.auth-content h3 { margin: 0; }

.auth-content h4, .auth-content h5 {
  color: #fff;
  font-family: var(--font-bold);
}

.auth-content .text-muted {
  color: #cfe3e0;
}

.auth-content form {
  width: 100%;
}

.auth-content .input-group {
  margin-bottom: 16px;
}

.auth-content .btn {
  width: 100%;
  margin-top: 4px;
}

.auth-content a {
  color: var(--pixit-primary-light-green);
}

.auth-content a.btn {
  color: #fff;
}

/* ------------------------------------------------------------ app shell */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.left-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left-bar-shrinked-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-right: 1px solid var(--gray-200);
  z-index: 10;
}

.left-bar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--topbar-height);
  background-color: var(--pixit-primary-dark-green-2);
  border-bottom: 1px solid var(--pixit-primary-dark-green-1);
}

.left-bar-logo img {
  max-width: 40px;
}

.left-bar-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  flex: 1;
}

.left-bar-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--pixit-primary-dark-green-1);
  font-size: 18px;
}

.left-bar-menu-item:hover {
  background-color: var(--gray-100);
}

.left-bar-menu-item.selected {
  background-color: var(--pixit-primary-dark-green-2);
  color: var(--pixit-primary-light-green);
}

.page-with-sidebar {
  margin-left: var(--left-bar-shrinked-width);
  width: calc(100% - var(--left-bar-shrinked-width));
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  padding: 0 32px;
  background-color: var(--pixit-primary-dark-green-2);
}

.top-bar-label {
  color: #fff;
  font-family: var(--font-bold);
  font-size: var(--font-size-xl);
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-controls .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
}

.top-bar-controls .dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.pro-head {
  padding: 8px 12px;
  font-family: var(--font-medium);
  font-size: var(--font-size-s);
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 6px;
}

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

.pro-body .dropdown-item, .pro-body form {
  width: 100%;
}

.page-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* legacy Datta Able content wrappers — no longer carry layout meaning,
   kept selectable so existing templates don't need every div stripped */
.pcoded-wrapper, .pcoded-content, .pcoded-inner-content, .main-body, .page-wrapper {
  display: contents;
}
