Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

19.7 KB
Raw Blame
/* Imports and Tailwind configuration */
@import "tailwindcss";
@import "tw-animate-css";

/* Tailwind directives */
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));

/* Content sources */
@source not "../public";

/* Font-face declarations */
@font-face {
  font-family: "Alliance No. 2";
  src:
    url("./assets/fonts/AllianceNo2-Regular.woff2") format("woff2"),
    url("./assets/fonts/AllianceNo2-Regular.woff") format("woff"),
    url("./assets/fonts/AllianceNo2-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Runtime defaults */
:root {
  font-family: var(--font-sans);
  color-scheme: dark;
}

/* Compatibility styles */
/* Tailwind v4 defaults borders to currentcolor; this preserves the v3 border color behavior. */

/* Base/reset styles */
@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentcolor);
  }

  html {
    @apply overflow-hidden;
  }

  html,
  body,
  #root {
    background-color: var(--color-page);
    color: var(--color-foreground);
  }

  .font-alliance,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-alliance);
    font-synthesis: none;
  }

  input {
    color-scheme: inherit;
  }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active {
    background-clip: text;
    -webkit-text-fill-color: var(--color-foreground) !important;
    caret-color: var(--color-foreground);
  }

  /* NordPass autofill override */
  input[data-np-input-autofilled],
  input[data-np-input-autofilled]:hover,
  input[data-np-input-autofilled]:focus,
  input[data-np-input-autofilled]:active {
    background-color: transparent !important;
    transition: none !important;
  }
}

@theme {
  /* Semantic color tokens */
  /* Surface, content, structure, status, scope, and resource roles */
  --z-index-sticky: 10;
  --z-index-action: 40;
  --z-index-backdrop: 50;
  --z-index-modal: 50;
  --z-index-dropdown: 50;
  --z-index-popover: 50;
  --z-index-combobox: 60;
  --z-index-tooltip: 70;
  --z-index-toast: 999999999;

  --breakpoint-dashboard: 1400px;

  /* Fonts */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --font-alliance:
    "Alliance No. 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --text-2xs: 0.7rem;
  --text-2xs--line-height: 1rem;
  --max-width-8xl: 88rem; /* 1408px */

  /* Colors v2 */
  --color-page: oklch(17.26855% 0.0089336 264.3079);
  --color-background: oklch(21.47091% 0.0058295 285.8986);
  --color-foreground: oklch(94.00701% 0 0);
  --color-success: oklch(74.58674% 0.1812494 152.3266);
  --color-info: oklch(71.24953% 0.0783833 209.5506);
  --color-warning: oklch(83.57954% 0.1689691 91.76661);
  --color-danger: oklch(63.06821% 0.194009 29.44153);
  --color-org: oklch(73.25807% 0.1541697 240.3307);
  --color-sub-org: oklch(90.39549% 0.2223969 136.0466);
  --color-project: oklch(90.6745% 0.19075 113.8155);
  --color-product-sm: oklch(90.6745% 0.19075 113.8155);
  --color-product-pki: oklch(72.92586% 0.152812 58.22252);
  --color-product-kms: oklch(84.69324% 0.1560789 170.9594);
  --color-product-ss: oklch(63.24135% 0.2260294 308.0826);
  --color-product-pam: oklch(65.81738% 0.2336108 12.91672);
  --color-product-av: oklch(80.58943% 0.1876768 126.1996);
  --color-admin: oklch(81.01998% 0.0111224 286.1488);
  --color-neutral: oklch(75.06158% 0.0030629 264.5385);
  --color-border: oklch(29.36955% 0.007358 274.7154);
  --color-label: oklch(75.06158% 0.0030629 264.5385);
  --color-muted: oklch(54.87373% 0.0047733 271.3273);
  --color-popover: oklch(19.84221% 0.0037251 229.0053);
  --color-ring: oklch(30.47636% 0.0077146 264.4536);
  --color-card: oklch(20.77202% 0.005034 248.0706);
  --color-accent: oklch(59.50979% 0.0028503 228.8129);
  --color-container: oklch(22.51505% 0.004934 248.0473);
  --color-container-hover: oklch(24.64789% 0.004824 248.0237);

  /* Elevation */
  --shadow-floating: 0 8px 32px oklch(0% 0 0 / 0.6);
  --shadow-floating-light: 0 4px 12px oklch(0% 0 0 / 0.08);

  /* Sidebar */
  --color-sidebar: oklch(21.47091% 0.0058295 285.8986);
  --color-sidebar-foreground: oklch(94.00701% 0 0);
  --color-sidebar-border: oklch(29.36955% 0.007358 274.7154);
  --color-sidebar-accent: oklch(23.94746% 0.0058985 271.1652);
  --color-sidebar-accent-foreground: oklch(94.00701% 0 0);
  --color-sidebar-ring: oklch(30.47636% 0.0077146 264.4536);

  /* secret management product colors */
  --color-folder: oklch(63.56204% 0.0983323 87.63144);
  --color-secret: oklch(59.50979% 0.0028503 228.8129);
  --color-dynamic-secret: oklch(58.90721% 0.1077898 69.14635);
  --color-import: oklch(55.93131% 0.0665942 223.3242);
  --color-secret-rotation: oklch(48.64461% 0.0587664 260.2333);
  --color-override: oklch(46.97085% 0.0894498 308.4585);
  --color-override-foreground: oklch(70% 0.0894498 308.4585);
  --color-proxied-service: oklch(51.4929% 0.1474105 306.2291);
}

/* Distinct neutral tones preserve surface depth and control contrast. */
@theme {
  --color-border-bright: oklch(75.06158% 0.0030629 264.5385);
  --color-border-control: oklch(30.47636% 0.0077146 264.4536);
  --color-border-cool: oklch(37.3% 0.034 259.733);
  --color-border-cool-emphasis: oklch(70.7% 0.022 261.325);
  --color-border-cool-strong: oklch(44.6% 0.03 256.802);
  --color-border-cool-subtle: oklch(27.8% 0.033 256.848);
  --color-border-emphasis: oklch(54.87373% 0.0047733 271.3273);
  --color-border-faint: oklch(23.94746% 0.0058985 271.1652);
  --color-border-secondary: oklch(39.01861% 0.0036123 264.5209);
  --color-border-secondary-bright: oklch(71.76803% 0.0036931 247.8755);
  --color-border-secondary-strong: oklch(48.54248% 0.0083474 268.4732);
  --color-border-soft: oklch(25.2% 0.006 275);
  --color-border-strong: oklch(32.50117% 0.0092536 268.3806);
  --color-border-subtle: oklch(27.33264% 0.0074958 274.6834);
  --color-foreground-bright: oklch(97.01508% 0 0);
  --color-foreground-cool: oklch(92.8% 0.006 264.531);
  --color-foreground-default: oklch(93.12829% 0.0013386 286.3736);
  --color-foreground-emphasis: oklch(96.63914% 0.0010679 197.1403);
  --color-foreground-inverse: oklch(100% 0 0);
  --color-foreground-secondary: oklch(84.58055% 0.0027437 286.3408);
  --color-foreground-soft: oklch(82.63578% 0.0029897 264.54);
  --color-label-cool: oklch(87.2% 0.01 258.338);
  --color-label-secondary: oklch(71.76803% 0.0036931 247.8755);
  --color-muted-cool: oklch(70.7% 0.022 261.325);
  --color-muted-cool-secondary: oklch(55.1% 0.027 264.364);
  --color-muted-secondary: oklch(48.54248% 0.0083474 268.4732);
  --color-page-deep: oklch(15.82069% 0.0071892 258.3723);
  --color-scrollbar-thumb: oklch(59.98708% 0 0);
  --color-scrollbar-track-thumb: oklch(34.60868% 0.0068882 286.0343);
  --color-progress: oklch(93.10111% 0.1554478 111.4309);
  --color-surface-active: oklch(30.47636% 0.0077146 264.4536);
  --color-surface-base: oklch(21.47091% 0.0058295 285.8986);
  --color-surface-cool-active: oklch(44.6% 0.03 256.802);
  --color-surface-cool-selected: oklch(37.3% 0.034 259.733);
  --color-surface-hover: oklch(27.33264% 0.0074958 274.6834);
  --color-surface-inset: oklch(20.85966% 0.0127981 264.2461);
  --color-surface-raised: oklch(23.94746% 0.0058985 271.1652);
  --color-surface-recessed: oklch(22.06761% 0.0132454 258.37);
  --color-surface-selected: oklch(32.50117% 0.0092536 268.3806);
  --color-surface-sunken: oklch(19.03353% 0.0112223 260.6519);
}

/* Semantic typography tokens */
@theme {
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --text-2xs: 0.7rem;
  --text-2xs--line-height: 1rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-body-sm: 0.875rem;
  --text-body-sm--line-height: 1.25rem;
  --text-body-md: 1rem;
  --text-body-md--line-height: 1.5rem;
  --text-body-lg: 1.125rem;
  --text-body-lg--line-height: 1.75rem;
  --text-label: 0.75rem;
  --text-label--line-height: 1rem;
  --text-heading-sm: 1.125rem;
  --text-heading-sm--line-height: 1.5rem;
  --text-heading-md: 1.25rem;
  --text-heading-md--line-height: 1.75rem;
  --text-heading-lg: 1.5rem;
  --text-heading-lg--line-height: 2rem;
  --text-display: 2.25rem;
  --text-display--line-height: 2.5rem;
}

/* Semantic radius tokens */
@theme {
  --radius-control: var(--radius-md);
  --radius-card: var(--radius-lg);
  --radius-popover: var(--radius-md);
  --radius-dialog: var(--radius-lg);
}

/* Layout tokens */
@theme {
  --breakpoint-dashboard: 1400px;
  --max-width-8xl: 88rem;
}

/* Dark/light theme overrides */
html[data-theme="light"] {
  color-scheme: light;
  --color-page: var(--color-background);
  --color-border-bright: var(--color-border);
  --color-border-control: var(--color-border);
  --color-border-cool: var(--color-border);
  --color-border-cool-emphasis: var(--color-border);
  --color-border-cool-strong: var(--color-border);
  --color-border-cool-subtle: var(--color-border);
  --color-border-emphasis: var(--color-border);
  --color-border-faint: var(--color-border);
  --color-border-secondary: var(--color-border);
  --color-border-secondary-bright: var(--color-border);
  --color-border-secondary-strong: var(--color-border);
  --color-border-soft: oklch(0.925 0.001 286.4);
  --color-border-strong: var(--color-border);
  --color-border-subtle: var(--color-border);
  --color-foreground-bright: var(--color-foreground);
  --color-foreground-cool: var(--color-foreground);
  --color-foreground-default: var(--color-foreground);
  --color-foreground-emphasis: var(--color-foreground);
  --color-foreground-inverse: var(--color-foreground);
  --color-foreground-secondary: var(--color-foreground);
  --color-foreground-soft: var(--color-foreground);
  --color-label-cool: var(--color-label);
  --color-label-secondary: var(--color-label);
  --color-muted-cool: var(--color-muted);
  --color-muted-cool-secondary: var(--color-muted);
  --color-muted-secondary: var(--color-muted);
  --color-page-deep: var(--color-background);
  --color-scrollbar-thumb: var(--color-muted);
  --color-scrollbar-track-thumb: var(--color-border);
  --color-progress: var(--color-project);
  --color-surface-active: color-mix(in oklab, var(--color-foreground) 10%, transparent);
  --color-surface-base: var(--color-card);
  --color-surface-cool-active: var(--color-container-hover);
  --color-surface-cool-selected: var(--color-border);
  --color-surface-hover: var(--color-container-hover);
  --color-surface-inset: var(--color-card);
  --color-surface-raised: var(--color-container);
  --color-surface-recessed: var(--color-container);
  --color-surface-selected: color-mix(in oklab, var(--color-foreground) 10%, transparent);
  --color-surface-sunken: var(--color-popover);

  /* Semantic surfaces and text */
  --color-background: oklch(0.9702 0.0000 0);
  --color-foreground: oklch(0.2147 0.0058 285.9);
  --color-success: oklch(0.5273 0.1371 150.1);
  --color-info: oklch(0.5198 0.0936 223.1);
  --color-warning: oklch(0.5538 0.1207 66.4);
  --color-danger: oklch(0.5054 0.1905 27.5);
  --color-neutral: oklch(0.4420 0.0035 264.5);
  --color-border: oklch(0.8764 0.0014 286.4);
  --color-label: oklch(0.4420 0.0035 264.5);
  --color-muted: oklch(0.5487 0.0048 271.3);
  --color-popover: oklch(1.0000 0.0000 0);
  --color-ring: oklch(0.5487 0.0048 271.3);
  --color-card: oklch(1.0000 0.0000 0);
  --color-accent: oklch(0.4746 0.0034 264.5);
  --color-container: oklch(0.9761 0.0000 0);
  --color-container-hover: oklch(0.9521 0.0000 0);

  /* Scope and product accents tuned for light surfaces */
  --color-org: oklch(0.5364 0.2136 259.5);
  --color-sub-org: oklch(0.6036 0.1440 152.6);
  --color-project: oklch(0.6046 0.1440 123.9);
  --color-product-sm: oklch(0.6046 0.1440 123.9);
  --color-product-pki: oklch(0.5806 0.1400 54.0);
  --color-product-kms: oklch(0.5279 0.0970 172.3);
  --color-product-ss: oklch(0.4908 0.1979 307.4);
  --color-product-pam: oklch(0.5432 0.2015 13.8);
  --color-product-av: oklch(0.4000 0.0950 126.2);
  --color-admin: oklch(0.4420 0.0035 264.5);

  /* Sidebar */
  --color-sidebar: oklch(0.9702 0.0000 0);
  --color-sidebar-foreground: oklch(0.2147 0.0058 285.9);
  --color-sidebar-border: oklch(0.8764 0.0014 286.4);
  --color-sidebar-accent: oklch(0.9521 0.0000 0);
  --color-sidebar-accent-foreground: oklch(0.2147 0.0058 285.9);
  --color-sidebar-ring: oklch(0.5487 0.0048 271.3);

  /* Resource accents */
  --color-folder: oklch(0.5226 0.0930 88.0);
  --color-secret: oklch(0.4420 0.0035 264.5);
  --color-dynamic-secret: oklch(0.4969 0.0992 67.8);
  --color-import: oklch(0.4817 0.0660 224.6);
  --color-secret-rotation: oklch(0.4299 0.0621 260.7);
  --color-override: oklch(0.4138 0.0991 310.2);
  --color-override-foreground: var(--color-override);
  --color-proxied-service: oklch(0.4447 0.1461 309.7);
}

.product-color {
  --product-color-resolved: var(--product-color);
}

html[data-theme="light"] .product-color {
  --product-color-resolved: color-mix(in oklab, var(--product-color) 55%, var(--color-foreground));
}

html[data-theme-switching],
html[data-theme-switching] *,
html[data-theme-switching] *::before,
html[data-theme-switching] *::after,
html[data-theme-switching] *::backdrop {
  transition: none !important;
}

::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) {
  animation: none !important;
}

/* Platform overrides */
/* iOS Safari zooms the viewport when focusing an input whose font-size is below 16px.
   Bumping the type scale on detected iOS devices keeps form controls at/above that
   threshold to prevent the zoom while preserving their relationship to surrounding text. */
html[data-platform="ios"] {
  --text-xs: 0.875rem;
  --text-sm: 1rem;
  --text-base: 1.125rem;
}

/* Custom utilities */
@utility min-table-row {
  width: 1%;
  white-space: nowrap;
}

@utility w-inherit {
  width: inherit;
}

@utility h-inherit {
  height: inherit;
}

@utility text-highlight {
  @apply bg-project px-1.5 pt-1.5 pb-0.5 text-background;
}

@utility secret-table {
  width: 100%;
  background: var(--color-surface-raised);
  text-align: left;
  color: var(--color-label-secondary);

  /* padding except for comment column */
  & th {
    @apply px-4 py-2 font-medium;
  }

  & td {
    @apply px-1 py-1 pr-2 text-sm;
  }

  & th:not(:last-child) {
    @apply border-r;
    border-color: var(--color-border-control);
  }

  & td:not(:last-child) {
    @apply border-r;
    border-color: var(--color-border-control);
  }

  & tr {
    @apply border-b;
    border-color: var(--color-border-control);
  }
}

@utility breadcrumb {
  &::after {
    content: "";
    height: 60%;
    width: 100%;
    z-index: -1;
    display: block;
    position: absolute;
    background: var(--color-surface-raised);
  }

  &::before {
    content: "";
    height: 60%;
    width: 100%;
    z-index: -1;
    display: block;
    position: absolute;
    background: var(--color-surface-raised);
  }

  &:hover::before {
    background: var(--color-surface-active);
  }

  &:hover::after {
    background: var(--color-surface-active);
  }

  &::after {
    left: 4px;
    bottom: -2.5px;
    transform: skew(-30deg);
  }

  &::before {
    left: 4px;
    top: -2.5px;
    transform: skew(30deg);
  }
}

@utility thin-scrollbar {
  &::-webkit-scrollbar {
    width: 0.25rem;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: var(--color-scrollbar-thumb);
  }
  scrollbar-width: thin;
  scrollbar-color: var(--color-scrollbar-track-thumb) transparent;
}

/* Animation/keyframes */
@layer utilities {
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }
  .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Keyframes */
  /* Proportional bars grow from their left edge when they first paint. scaleX rather than width keeps
     the work on the compositor, which matters because a scope breakdown can hold dozens of bars. */
  @keyframes barGrow {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }

  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes popIn {
    from {
      opacity: 0;
      transform: translate(-50%, -48%) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  @keyframes bounce {
    0% {
      transform: translateY(-90%);
    }
    100% {
      transform: translateY(-100%);
    }
  }

  @keyframes wiggle {
    0%,
    100% {
      transform: rotate(-3deg);
    }
    50% {
      transform: rotate(3deg);
    }
  }

  @keyframes inputErrorShake {
    0%,
    100% {
      transform: translateX(0);
    }
    20% {
      transform: translateX(-3px);
    }
    40% {
      transform: translateX(3px);
    }
    60% {
      transform: translateX(-2px);
    }
    80% {
      transform: translateX(1px);
    }
  }

  @keyframes popup {
    0% {
      transform: scale(0.2);
      opacity: 0;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    40%,
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes type {
    0% {
      transform: translateX(0ch);
    }
    5%,
    10% {
      transform: translateX(1ch);
    }
    15%,
    20% {
      transform: translateX(2ch);
    }
    25%,
    30% {
      transform: translateX(3ch);
    }
    35%,
    40% {
      transform: translateX(4ch);
    }
    45%,
    50% {
      transform: translateX(5ch);
    }
    55%,
    60% {
      transform: translateX(6ch);
    }
    65%,
    70% {
      transform: translateX(7ch);
    }
    75%,
    80% {
      transform: translateX(8ch);
    }
    85%,
    90% {
      transform: translateX(9ch);
    }
    95%,
    100% {
      transform: translateX(11ch);
    }
  }

  /* Animation classes */
  .fadeIn {
    animation: fadeIn 100ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .animate-bar-grow {
    transform-origin: left;
    animation: barGrow 420ms ease-out both;
  }

  .popIn {
    animation: popIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .bounce {
    animation: bounce 1s ease-in-out infinite;
  }

  .wiggle {
    animation: wiggle 200ms ease-in-out;
  }

  .popup {
    animation: popup 300ms ease-in-out;
  }

  .spin {
    animation: spin 1500ms ease-in-out infinite;
  }

  .type {
    animation: type 2.7s ease-out 0.8s infinite alternate both;
  }

  .type-reverse {
    animation: type 1.8s ease-out 0s infinite alternate-reverse both;
  }

  [data-slot="input"][aria-invalid="true"],
  [data-slot="textarea"][aria-invalid="true"],
  [data-slot="verification-code-input"][aria-invalid="true"],
  [data-slot="input-group"]:has([data-slot="input-group-control"][aria-invalid="true"]) {
    animation: inputErrorShake 200ms cubic-bezier(0.77, 0, 0.175, 1);
  }

  @media (prefers-reduced-motion: reduce) {
    [data-slot="input"][aria-invalid="true"],
    [data-slot="textarea"][aria-invalid="true"],
    [data-slot="verification-code-input"][aria-invalid="true"],
    [data-slot="input-group"]:has([data-slot="input-group-control"][aria-invalid="true"]) {
      animation: none;
    }
  }
}

.tags-conic-bg {
  background: conic-gradient(
    oklch(65.3372% 0.1834811 23.67941),
    oklch(84.95838% 0.1463045 90.49279),
    oklch(70.28807% 0.126702 158.8943),
    oklch(71.21404% 0.1510241 249.8833),
    oklch(69.38235% 0.188136 13.3297)
  );
}

/* Compatibility styles */
#nprogress .bar {
  background: var(--color-progress);
}

[contentEditable="true"]:before {
  content: attr(placeholder);
  position: absolute;
  top: 0.5rem;
  @apply text-sm text-muted-cool-secondary opacity-50;
}

/* Hide the default number input spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}