
/* ==========================================================
   ITRUMAK VAULT — GOOGLE PIXEL / MATERIAL YOU
========================================================== */

:root {
  --bg: #101114;
  --surface: #1a1b20;
  --surface-2: #202126;
  --surface-3: #282a30;

  --text: #f1f1f5;
  --text-2: #c6c6cd;
  --text-3: #8f9098;

  --primary: #a8c7fa;
  --primary-strong: #8ab4f8;
  --primary-container: #29456f;

  --green: #80d5a2;
  --red: #ffb4ab;
  --orange: #ffb86b;

  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.13);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow:
    0 8px 26px rgba(0,0,0,.22);
}


/* =========================
   RESET
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Google Sans",
    "Roboto",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

body {
  background:
    radial-gradient(
      circle at 10% -5%,
      rgba(138,180,248,.08),
      transparent 28%
    ),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transform: scale(.98);
}

.hidden {
  display: none !important;
}


/* =========================
   TOPBAR
========================= */

.topbar {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 14px;

  border-bottom: 1px solid var(--border);

  background:
    rgba(16,17,20,.86);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  position: sticky;
  top: 0;
  z-index: 100;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;

  flex: 1;
  min-width: 0;
}

.mini-logo,
.brand-icon,
.avatar {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  flex: 0 0 38px;

  border-radius: 14px;

  color: #0f1115;

  background:
    linear-gradient(
      145deg,
      #a8c7fa,
      #c7b7ff
    );

  font-weight: 800;
}

.top-brand strong {
  display: block;

  font-size: 15px;
  font-weight: 700;
}

.top-brand small {
  display: block;

  margin-top: 1px;

  color: var(--text-3);
  font-size: 10px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout {
  min-height: 34px;

  padding: 0 12px;

  border: 0;
  border-radius: 999px;

  color: var(--red);

  background:
    rgba(255,180,171,.09);
}

.mobile-menu {
  display: none;

  width: 38px;
  height: 38px;

  border: 0;
  border-radius: 999px;

  background: var(--surface-2);
  color: var(--text);

  font-size: 18px;
}


/* =========================
   WORKSPACE
========================= */

.workspace {
  display: grid;
  grid-template-columns: 230px minmax(0,1fr);

  min-height: calc(100vh - 60px);
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
  padding: 12px;

  border-right: 1px solid var(--border);

  background:
    rgba(20,21,25,.86);

  overflow-y: auto;
}

.new-folder {
  width: 100%;
  min-height: 42px;

  margin-bottom: 14px;

  padding: 0 14px;

  border: 0;
  border-radius: 999px;

  background: var(--surface-2);
  color: var(--text);

  text-align: left;
}

.nav-title {
  margin:
    14px
    10px
    7px;

  color: var(--text-3);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: .08em;

  text-transform: uppercase;
}

.tree {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.folder-line {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tree-item {
  min-height: 40px;

  display: flex;
  align-items: center;

  flex: 1;
  min-width: 0;

  gap: 8px;

  padding: 0 12px;

  border: 0;
  border-radius: 999px;

  color: var(--text-2);

  background: transparent;

  text-align: left;
}

.tree-item:hover {
  background: var(--surface-2);
}

.tree-item.active {
  background:
    var(--primary-container);

  color:
    var(--primary);
}

.folder-actions {
  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  flex: 0 0 32px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background: var(--surface-2);
  color: var(--text-3);
}

.special-section,
.admin-block {
  margin-top: 14px;
}


/* =========================
   CONTENT
========================= */

.content {
  min-width: 0;

  padding: 22px;

  background: transparent;
}

.breadcrumbs {
  margin-bottom: 9px;

  color: var(--text-3);

  font-size: 11px;
}

.content-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 14px;

  margin-bottom: 14px;
}

.content-header h2 {
  margin:
    0
    0
    4px;

  font-size: 25px;
  font-weight: 700;

  letter-spacing: -.015em;
}

.content-header p {
  margin: 0;

  color: var(--text-3);

  font-size: 13px;
}


/* =========================
   BUTTONS
========================= */

.primary,
#addEntryButton {
  min-height: 44px;

  padding: 0 18px;

  border: 0;
  border-radius: 999px;

  color: #10233f;

  background:
    var(--primary);

  font-weight: 700;
}

.secondary {
  min-height: 38px;

  padding: 0 14px;

  border: 0;
  border-radius: 999px;

  color: var(--primary);

  background:
    rgba(168,199,250,.09);
}

.danger-button {
  min-height: 38px;

  padding: 0 14px;

  border: 0;
  border-radius: 999px;

  color: var(--red);

  background:
    rgba(255,180,171,.09);
}


/* =========================
   SEARCH
========================= */

.search {
  width: 100%;
  max-width: 620px;

  height: 44px;

  margin-bottom: 14px;

  overflow: hidden;

  border: 1px solid var(--border-strong);
  border-radius: 999px;

  background:
    var(--surface-2);
}

.search > *:not(input) {
  display: none !important;
}

.search input {
  width: 100%;
  height: 42px;

  padding: 0 16px;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 13px;
}

.search input::placeholder {
  color: var(--text-3);
}


/* =========================
   LISTS
========================= */

.records,
.vpn-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(320px,1fr)
    );

  gap: 12px;
}


/* =========================
   CARD BASE
========================= */

.credential-card,
.record,
.vpn-card,
.user-row,
.permission-folder-row {
  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    var(--surface);

  box-shadow:
    var(--shadow);
}


/* =========================
   CREDENTIAL CARD
========================= */

.credential-card,
.record {
  padding: 12px;
}

.credential-header {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-bottom: 10px;
}

.service-icon {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: grid;
  place-items: center;

  border-radius: 14px;

  background:
    var(--primary-container);

  color:
    var(--primary);

  font-size: 18px;
}

.credential-heading {
  min-width: 0;
}

.credential-heading h3 {
  margin: 0;

  font-size: 14px;
  font-weight: 700;
}

.record-url {
  display: block;

  max-width: 100%;

  margin-top: 2px;

  overflow: hidden;

  color: var(--primary);

  font-size: 10px;

  text-decoration: none;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-fields {
  overflow: hidden;

  border-radius: 14px;

  background:
    var(--surface-2);
}

.credential-field {
  padding: 9px 10px;

  border-bottom:
    1px solid
    var(--border);
}

.credential-field:last-child {
  border-bottom: 0;
}

.credential-label,
.vpn-field-label {
  margin-bottom: 4px;

  color: var(--text-3);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: .06em;

  text-transform: uppercase;
}

.credential-value,
.vpn-field-value {
  display: flex;
  align-items: center;

  gap: 5px;

  min-width: 0;
}

.credential-value > span,
.vpn-value-text {
  flex: 1;
  min-width: 0;

  overflow: hidden;

  color: var(--text);

  font-size: 11px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-password-actions,
.vpn-password-actions {
  display: flex;

  gap: 4px;
}

.credential-mini-button,
.vpn-mini-button,
.vpn-copy {
  width: 28px;
  height: 28px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background:
    var(--surface-3);

  color:
    var(--text-2);
}

.credential-footer,
.vpn-card-footer {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 6px;

  margin-top: 8px;
}

.copy-all-entry,
.credential-edit,
.vpn-copy-all,
.vpn-edit {
  min-height: 34px;

  padding: 0 8px;

  border: 0;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 600;
}

.copy-all-entry,
.vpn-copy-all {
  color: var(--green);

  background:
    rgba(128,213,162,.09);
}

.credential-edit,
.vpn-edit {
  color: var(--primary);

  background:
    rgba(168,199,250,.09);
}


/* =========================
   VPN
========================= */

.vpn-card {
  padding: 12px;
}

.vpn-card-header {
  display: flex;
  align-items: center;

  margin-bottom: 10px;
}

.vpn-card-title {
  display: flex;
  align-items: center;

  gap: 9px;

  min-width: 0;
}

.vpn-icon {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: grid;
  place-items: center;

  border-radius: 14px;

  background:
    var(--primary-container);

  color:
    var(--primary);

  font-size: 18px;
}

.vpn-card-title h3 {
  margin: 0;

  font-size: 14px;
  font-weight: 700;
}

.vpn-hosting {
  margin-top: 2px;

  color: var(--text-3);

  font-size: 10px;
}

.vpn-fields {
  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  overflow: hidden;

  border-radius: 14px;

  background:
    var(--surface-2);
}

.vpn-data-field {
  min-width: 0;

  padding: 9px 8px;

  border-right:
    1px solid
    var(--border);
}

.vpn-data-field:nth-child(3) {
  border-right: 0;
}

.vpn-password-field {
  grid-column: 1 / -1;

  border-top:
    1px solid
    var(--border);

  border-right: 0;
}

.vpn-hidden-meta,
.vpn-notes {
  display: none;
}


/* =========================
   USERS
========================= */

.users-list {
  display: flex;
  flex-direction: column;

  gap: 8px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 10px 12px;
}

.user-row-main {
  display: flex;
  align-items: center;

  gap: 8px;
}

.user-meta {
  margin-top: 2px;

  color: var(--text-3);

  font-size: 10px;
}

.permissions-editor {
  display: flex;
  flex-direction: column;

  gap: 7px;
}

.permission-folder-row {
  display: grid;

  grid-template-columns:
    1fr 170px;

  align-items: center;

  gap: 8px;

  padding: 8px 10px;
}


/* =========================
   FORMS
========================= */

label {
  display: block;

  margin: 9px 0;

  color: var(--text-2);

  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;

  padding: 10px 11px;

  border:
    1px solid
    var(--border-strong);

  border-radius:
    14px;

  background:
    var(--surface-2);

  color:
    var(--text);
}

input:focus,
textarea:focus,
select:focus {
  border-color:
    var(--primary-strong);

  outline: 0;

  box-shadow:
    0 0 0 3px
    rgba(138,180,248,.10);
}

textarea {
  resize: vertical;
}

.password-field {
  display: flex;

  gap: 5px;
}

.password-field input {
  flex: 1;
}

.eye {
  width: 42px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background:
    var(--surface-3);

  color:
    var(--text);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
}

.switch-row input[type="checkbox"] {
  width: auto;
}


/* =========================
   MODALS
========================= */

.modal {
  position: fixed;
  inset: 0;

  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 12px;

  background:
    rgba(0,0,0,.58);
}

.modal-card {
  width:
    min(640px,100%);

  max-height:
    calc(100vh - 24px);

  overflow-y: auto;

  padding: 14px;

  border:
    1px solid
    var(--border-strong);

  border-radius:
    var(--radius-xl);

  background:
    var(--surface);

  box-shadow:
    0 24px 70px
    rgba(0,0,0,.40);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 8px;

  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;

  font-size: 18px;
}

.modal-header p {
  margin:
    3px
    0
    0;

  color: var(--text-3);

  font-size: 10px;
}

.modal-header button {
  width: 34px;
  height: 34px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background:
    var(--surface-2);

  color:
    var(--text);
}

.form-actions {
  display: flex;
  align-items: center;

  gap: 6px;

  margin-top: 12px;
}

.form-spacer {
  flex: 1;
}


/* =========================
   LOGIN
========================= */

.login-page {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 16px;
}

.login-card {
  width:
    min(390px,100%);

  padding: 18px;

  border:
    1px solid
    var(--border-strong);

  border-radius:
    var(--radius-xl);

  background:
    var(--surface);

  box-shadow:
    var(--shadow);
}


/* =========================
   CONTEXT MENU
========================= */

.context-menu {
  position: fixed;

  z-index: 2000;

  min-width: 170px;

  padding: 5px;

  border:
    1px solid
    var(--border-strong);

  border-radius: 14px;

  background:
    var(--surface-2);

  box-shadow:
    var(--shadow);
}

.context-menu button {
  width: 100%;

  padding: 8px 10px;

  border: 0;
  border-radius: 10px;

  background: transparent;

  color: var(--text);

  text-align: left;
}

.context-menu button:hover {
  background:
    var(--surface-3);
}


/* =========================
   EMPTY
========================= */

.empty-state {
  padding: 18px;

  border-radius:
    var(--radius-lg);

  background:
    var(--surface);

  color:
    var(--text-3);

  text-align: center;
}


/* =========================
   MOBILE
========================= */

@media (max-width:760px) {

  .topbar {
    min-height: 52px;

    padding:
      6px
      8px;
  }

  .mobile-menu {
    display: grid;
    place-items: center;

    flex: 0 0 36px;

    width: 36px;
    height: 36px;
  }

  .mini-logo,
  .brand-icon {
    width: 32px;
    height: 32px;

    flex-basis: 32px;

    border-radius: 12px;
  }

  .top-brand strong {
    font-size: 13px;
  }

  .top-brand small {
    display: none;
  }

  .workspace {
    display: block;

    min-height:
      calc(100vh - 52px);
  }

  .sidebar {
    position: fixed;

    top: 52px;
    left: -84vw;
    bottom: 0;

    z-index: 900;

    width: 78vw;
    max-width: 285px;

    padding: 10px;

    transition:
      left .18s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .content {
    padding:
      10px;
  }

  .breadcrumbs {
    margin-bottom: 6px;

    font-size: 9px;
  }

  .content-header {
    display: block;

    margin-bottom: 9px;
  }

  .content-header h2 {
    font-size: 20px;
  }

  .content-header p {
    font-size: 10px;
  }

  #addEntryButton {
    width: 100%;

    min-height: 40px;

    margin-top: 7px;
  }

  .search {
    max-width: none;

    height: 40px;

    margin-bottom: 8px;
  }

  .search input {
    height: 38px;

    font-size: 11px;
  }

  .records,
  .vpn-grid {
    grid-template-columns: 1fr;

    gap: 7px;
  }

  .credential-card,
  .vpn-card {
    padding: 8px;

    border-radius: 16px;
  }

  .credential-header,
  .vpn-card-header {
    margin-bottom: 6px;
  }

  .service-icon,
  .vpn-icon {
    width: 32px;
    height: 32px;

    flex-basis: 32px;

    border-radius: 12px;
  }

  .credential-heading h3,
  .vpn-card-title h3 {
    font-size: 12px;
  }

  .record-url,
  .vpn-hosting {
    font-size: 9px;
  }

  .credential-field,
  .vpn-data-field {
    padding: 6px 7px;
  }

  .credential-label,
  .vpn-field-label {
    font-size: 7px;
  }

  .credential-value > span,
  .vpn-value-text {
    font-size: 10px;
  }

  .credential-mini-button,
  .vpn-mini-button,
  .vpn-copy {
    width: 24px;
    height: 24px;
  }

  .copy-all-entry,
  .credential-edit,
  .vpn-copy-all,
  .vpn-edit {
    min-height: 29px;

    font-size: 9px;
  }

  .vpn-fields {
    grid-template-columns:
      1fr 1fr;
  }

  .vpn-login {
    grid-column: 1 / -1;

    border-top:
      1px solid
      var(--border);
  }

  .vpn-password-field {
    grid-column: 1 / -1;
  }

  .modal {
    padding: 6px;
  }

  .modal-card {
    width: 100%;

    max-height:
      calc(100dvh - 12px);

    padding: 11px;

    border-radius: 18px;
  }

  .permission-folder-row {
    grid-template-columns: 1fr;
  }

  .user-info {
    display: none;
  }

  .logout {
    padding:
      0 9px;

    font-size: 10px;
  }

}


/* =========================
   SMALL PHONE
========================= */

@media (max-width:380px) {

  .content {
    padding: 7px;
  }

  .vpn-fields {
    grid-template-columns: 1fr;
  }

  .vpn-data-field {
    border-right: 0;

    border-bottom:
      1px solid
      var(--border);
  }

  .vpn-password-field {
    border-bottom: 0;
  }

}



/* ==========================================================
   ITRUMAK VAULT — CLEAN iOS DARK
   FINAL OVERRIDE
========================================================== */

:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;

  --text: #f2f2f7;
  --text-2: #d1d1d6;
  --text-3: #8e8e93;

  --primary: #0a84ff;
  --primary-strong: #409cff;
  --primary-container: rgba(10,132,255,.16);

  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;

  --border: rgba(84,84,88,.52);
  --border-strong: rgba(99,99,102,.72);

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --shadow: none;


  /* COPY */

  --ios-copy:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='8' width='11' height='11' rx='2.2' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M16 8V6.3A2.3 2.3 0 0 0 13.7 4H6.3A2.3 2.3 0 0 0 4 6.3v7.4A2.3 2.3 0 0 0 6.3 16H8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");


  /* EYE */

  --ios-eye:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.8 12s3.3-5.6 9.2-5.6 9.2 5.6 9.2 5.6-3.3 5.6-9.2 5.6S2.8 12 2.8 12Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.7' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");


  /* EDIT */

  --ios-edit:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 16.2 4.2 20l3.8-.8L18.3 8.9 15.1 5.7Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='m13.8 7 3.2 3.2' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");


  /* FOLDER */

  --ios-folder:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2.5 2.5 0 0 1 2.5-2.5h4.1l2.1 2.1h6.8A2.5 2.5 0 0 1 21 9.1v7.4a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 16.5Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");


  /* USERS */

  --ios-users:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='8' r='3' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M3.5 19c.4-3.3 2.2-5 5.5-5s5.1 1.7 5.5 5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M15.5 6.2a2.7 2.7 0 0 1 0 5.2M16.1 14.2c2.6.3 4 1.8 4.4 4.2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");


  /* SHIELD */

  --ios-shield:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 19 5.7v5.1c0 4.5-2.7 8.1-7 10.2-4.3-2.1-7-5.7-7-10.2V5.7Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
}


/* ==========================================================
   GLOBAL
========================================================== */

html,
body {
  background: #000 !important;
}

body {
  background: #000 !important;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "SF Pro Display",
    "Helvetica Neue",
    Arial,
    sans-serif !important;
}


/* ==========================================================
   TOPBAR
========================================================== */

.topbar {
  border-bottom:
    1px solid
    rgba(84,84,88,.55) !important;

  background:
    rgba(0,0,0,.88) !important;

  backdrop-filter:
    blur(22px)
    saturate(150%);

  -webkit-backdrop-filter:
    blur(22px)
    saturate(150%);
}


.mini-logo,
.brand-icon,
.avatar {
  border-radius:
    11px !important;

  color:
    white !important;

  background:
    #0a84ff !important;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar {
  border-right:
    1px solid
    rgba(84,84,88,.48) !important;

  background:
    #0d0d0f !important;
}


.tree-item {
  border-radius:
    10px !important;
}


.tree-item.active {
  color:
    #fff !important;

  background:
    rgba(10,132,255,.20) !important;
}


.new-folder {
  border-radius:
    10px !important;

  background:
    #1c1c1e !important;
}


/* ==========================================================
   CONTENT
========================================================== */

.content {
  background:
    #000 !important;
}


/* ==========================================================
   MAIN ACTION
========================================================== */

.primary,
#addEntryButton {
  border-radius:
    11px !important;

  color:
    #fff !important;

  background:
    #0a84ff !important;
}


/* ==========================================================
   SEARCH
========================================================== */

.search {
  border:
    1px solid
    rgba(84,84,88,.58) !important;

  border-radius:
    11px !important;

  background:
    #1c1c1e !important;
}


/* ==========================================================
   CARDS
========================================================== */

.credential-card,
.record,
.vpn-card,
.user-row,
.permission-folder-row {
  border:
    1px solid
    rgba(84,84,88,.52) !important;

  border-radius:
    14px !important;

  background:
    #1c1c1e !important;

  box-shadow:
    none !important;
}


/* ==========================================================
   CARD HEADER ICONS
========================================================== */

.service-icon,
.vpn-icon {
  border-radius:
    10px !important;

  color:
    #0a84ff !important;

  background:
    rgba(10,132,255,.13) !important;
}


/* ==========================================================
   FIELD GROUPS
========================================================== */

.credential-fields,
.vpn-fields {
  border:
    1px solid
    rgba(84,84,88,.43) !important;

  border-radius:
    10px !important;

  background:
    #242426 !important;
}


.credential-field,
.vpn-data-field {
  background:
    transparent !important;
}


.credential-field {
  border-bottom:
    1px solid
    rgba(84,84,88,.42) !important;
}


.credential-field:last-child {
  border-bottom:
    0 !important;
}


.vpn-data-field {
  border-right:
    1px solid
    rgba(84,84,88,.42) !important;
}


.vpn-password-field {
  border-top:
    1px solid
    rgba(84,84,88,.42) !important;
}


/* ==========================================================
   TEXT
========================================================== */

.credential-label,
.vpn-field-label {
  color:
    #8e8e93 !important;
}


.credential-value > span,
.vpn-value-text {
  color:
    #f2f2f7 !important;
}


/* ==========================================================
   ICON BUTTON BASE
========================================================== */

.credential-mini-button,
.vpn-mini-button,
.vpn-copy {
  position: relative;

  display:
    grid !important;

  place-items:
    center !important;

  border:
    1px solid
    rgba(84,84,88,.55) !important;

  border-radius:
    8px !important;

  background:
    #2c2c2e !important;

  color:
    #d1d1d6 !important;

  font-size:
    0 !important;
}


/* копирование */

.copy-login-entry::before,
.credential-mini-button.copy::before,
.copy-role::before,
.copy-address::before,
.copy-login::before,
.copy-vpn-password::before,
.copy-aname::before {

  content: "";

  width: 15px;
  height: 15px;

  display:
    block;

  background-color:
    currentColor;

  -webkit-mask:
    var(--ios-copy)
    center / contain
    no-repeat;

  mask:
    var(--ios-copy)
    center / contain
    no-repeat;
}


/* посмотреть */

.credential-mini-button.reveal::before,
.reveal-vpn-password::before {

  content: "";

  width: 16px;
  height: 16px;

  display:
    block;

  background-color:
    currentColor;

  -webkit-mask:
    var(--ios-eye)
    center / contain
    no-repeat;

  mask:
    var(--ios-eye)
    center / contain
    no-repeat;
}


/* ==========================================================
   COPY ALL
========================================================== */

.copy-all-entry,
.vpn-copy-all {
  display:
    flex !important;

  align-items:
    center;

  justify-content:
    center;

  gap:
    6px;

  border:
    1px solid
    rgba(48,209,88,.36) !important;

  border-radius:
    9px !important;

  color:
    #30d158 !important;

  background:
    rgba(48,209,88,.07) !important;
}


.copy-all-entry::before,
.vpn-copy-all::before {

  content: "";

  width:
    15px;

  height:
    15px;

  flex:
    0 0
    15px;

  background-color:
    currentColor;

  -webkit-mask:
    var(--ios-copy)
    center / contain
    no-repeat;

  mask:
    var(--ios-copy)
    center / contain
    no-repeat;
}


/* ==========================================================
   EDIT
========================================================== */

.credential-edit,
.vpn-edit {
  display:
    flex !important;

  align-items:
    center;

  justify-content:
    center;

  gap:
    6px;

  border:
    1px solid
    rgba(10,132,255,.38) !important;

  border-radius:
    9px !important;

  color:
    #0a84ff !important;

  background:
    rgba(10,132,255,.07) !important;
}


.credential-edit::before,
.vpn-edit::before {

  content: "";

  width:
    15px;

  height:
    15px;

  flex:
    0 0
    15px;

  background-color:
    currentColor;

  -webkit-mask:
    var(--ios-edit)
    center / contain
    no-repeat;

  mask:
    var(--ios-edit)
    center / contain
    no-repeat;
}


/* ==========================================================
   BUTTON PRESS
========================================================== */

.credential-mini-button:active,
.vpn-mini-button:active,
.vpn-copy:active,
.copy-all-entry:active,
.vpn-copy-all:active,
.credential-edit:active,
.vpn-edit:active {

  transform:
    scale(.94);

  opacity:
    .72;
}


/* ==========================================================
   FORMS
========================================================== */

input,
textarea,
select {
  border:
    1px solid
    rgba(84,84,88,.62) !important;

  border-radius:
    10px !important;

  background:
    #2c2c2e !important;

  color:
    #f2f2f7 !important;
}


input:focus,
textarea:focus,
select:focus {
  border-color:
    #0a84ff !important;

  box-shadow:
    0 0 0 3px
    rgba(10,132,255,.12) !important;
}


/* ==========================================================
   MODALS
========================================================== */

.modal-card {
  border:
    1px solid
    rgba(84,84,88,.62) !important;

  border-radius:
    18px !important;

  background:
    #1c1c1e !important;

  box-shadow:
    0 28px 80px
    rgba(0,0,0,.55) !important;
}


/* ==========================================================
   iOS SWITCH
========================================================== */

.switch-row input[type="checkbox"] {
  appearance:
    none !important;

  -webkit-appearance:
    none !important;

  position:
    relative;

  width:
    44px !important;

  min-width:
    44px !important;

  height:
    26px !important;

  padding:
    0 !important;

  border:
    0 !important;

  border-radius:
    999px !important;

  background:
    #39393d !important;

  cursor:
    pointer;
}


.switch-row
input[type="checkbox"]::after {

  content: "";

  position:
    absolute;

  top:
    2px;

  left:
    2px;

  width:
    22px;

  height:
    22px;

  border-radius:
    50%;

  background:
    #fff;

  box-shadow:
    0 1px 5px
    rgba(0,0,0,.4);

  transition:
    transform .18s ease;
}


.switch-row
input[type="checkbox"]:checked {

  background:
    #30d158 !important;
}


.switch-row
input[type="checkbox"]:checked::after {

  transform:
    translateX(18px);
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width:760px) {

  .content {
    padding:
      9px !important;
  }


  .sidebar {
    background:
      #111113 !important;
  }


  .credential-card,
  .vpn-card {
    border-radius:
      12px !important;
  }


  .credential-fields,
  .vpn-fields {
    border-radius:
      9px !important;
  }


  .credential-mini-button,
  .vpn-mini-button,
  .vpn-copy {

    width:
      25px !important;

    height:
      25px !important;

    border-radius:
      7px !important;
  }


  .credential-mini-button::before,
  .vpn-mini-button::before,
  .vpn-copy::before {

    width:
      14px !important;

    height:
      14px !important;
  }


  .copy-all-entry,
  .vpn-copy-all,
  .credential-edit,
  .vpn-edit {

    min-height:
      30px !important;

    border-radius:
      8px !important;
  }

}



/* ==========================================================
   CARD LOGOS — iOS STYLE
========================================================== */

:root {

  --vault-key-icon:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='12' r='4' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M12 12h9M17 12v3M20 12v2' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");

  --vault-shield-icon:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 19 5.7v5.1c0 4.5-2.7 8.1-7 10.2-4.3-2.1-7-5.7-7-10.2V5.7Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");

}


/*
 * Обычные карточки
 */

.credential-card .service-icon {

  position: relative;

  width: 38px !important;
  height: 38px !important;

  flex: 0 0 38px !important;

  display: grid !important;

  place-items: center !important;

  overflow: hidden;

  border:
    1px solid
    rgba(10,132,255,.30) !important;

  border-radius:
    10px !important;

  background:
    linear-gradient(
      145deg,
      rgba(10,132,255,.24),
      rgba(94,92,230,.16)
    ) !important;

  color:
    #64a8ff !important;
}


/*
 * Если внутри уже есть старая иконка,
 * скрываем её и рисуем одну стабильную.
 */

.credential-card
.service-icon > * {

  display: none !important;
}


.credential-card
.service-icon::before {

  content: "";

  width: 21px;
  height: 21px;

  display: block;

  background:
    currentColor;

  -webkit-mask:
    var(--vault-key-icon)
    center / contain
    no-repeat;

  mask:
    var(--vault-key-icon)
    center / contain
    no-repeat;
}


/*
 * VPN
 */

.vpn-card .vpn-icon {

  position: relative;

  width: 38px !important;
  height: 38px !important;

  flex: 0 0 38px !important;

  display: grid !important;

  place-items: center !important;

  overflow: hidden;

  border:
    1px solid
    rgba(48,209,88,.28) !important;

  border-radius:
    10px !important;

  background:
    linear-gradient(
      145deg,
      rgba(48,209,88,.20),
      rgba(10,132,255,.17)
    ) !important;

  color:
    #49d98c !important;
}


.vpn-card
.vpn-icon > * {

  display: none !important;
}


.vpn-card
.vpn-icon::before {

  content: "";

  width: 21px;
  height: 21px;

  display: block;

  background:
    currentColor;

  -webkit-mask:
    var(--vault-shield-icon)
    center / contain
    no-repeat;

  mask:
    var(--vault-shield-icon)
    center / contain
    no-repeat;
}


/* ==========================================================
   HEADER ALIGNMENT
========================================================== */

.credential-header,
.vpn-card-header {

  display: flex !important;

  align-items: center !important;

  min-width: 0 !important;
}


.credential-heading,
.vpn-card-heading,
.vpn-card-title > div:last-child {

  min-width: 0 !important;

  flex: 1 1 auto !important;
}


/* ==========================================================
   SIDEBAR OVERLAY
========================================================== */

.sidebar-overlay {

  display: none;

  position: fixed;

  inset:
    52px
    0
    0
    0;

  z-index: 850;

  background:
    rgba(0,0,0,.46);

  opacity: 0;

  pointer-events: none;

  transition:
    opacity .18s ease;

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);
}


.sidebar-overlay.visible {

  opacity: 1;

  pointer-events: auto;
}


/*
 * Sidebar должен быть выше overlay.
 */

.sidebar {

  z-index: 900 !important;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width:760px) {

  .sidebar-overlay {

    display: block;
  }


  /*
   * Когда меню открыто,
   * контент под ним не прокручивается.
   */

  body.sidebar-is-open {

    overflow: hidden;
  }


  .credential-card .service-icon,
  .vpn-card .vpn-icon {

    width: 32px !important;
    height: 32px !important;

    flex-basis: 32px !important;

    border-radius:
      9px !important;
  }


  .credential-card
  .service-icon::before,

  .vpn-card
  .vpn-icon::before {

    width:
      18px;

    height:
      18px;
  }

}


/* desktop — overlay никогда не мешает */

@media (min-width:761px) {

  .sidebar-overlay {

    display: none !important;
  }

}



/* ==========================================================
   COLLAPSIBLE FOLDERS
========================================================== */

.folder-line {

  position:
    relative;

  display:
    flex;

  align-items:
    center;

  min-width:
    0;
}


/* ----------------------------------------------------------
   СТРЕЛКА
---------------------------------------------------------- */

.folder-collapse-toggle {

  position:
    relative;

  width:
    26px;

  height:
    32px;

  display:
    grid;

  place-items:
    center;

  flex:
    0 0
    26px;

  margin:
    0 1px 0 0;

  padding:
    0;

  border:
    0;

  border-radius:
    7px;

  color:
    #8e8e93;

  background:
    transparent;

  cursor:
    pointer;

  transition:
    background .15s ease;
}


.folder-collapse-toggle:hover {

  background:
    rgba(255,255,255,.06);
}


/*
 * Chevron в духе iOS.
 */

.folder-collapse-toggle::before {

  content: "";

  width:
    7px;

  height:
    7px;

  border-right:
    1.7px solid
    currentColor;

  border-bottom:
    1.7px solid
    currentColor;

  /*
   * Развёрнуто:
   * стрелка смотрит вниз.
   */

  transform:
    rotate(45deg)
    translate(-1px,-1px);

  transition:
    transform .16s ease;
}


/*
 * Свёрнуто:
 * стрелка смотрит вправо.
 */

.folder-collapse-toggle.collapsed::before {

  transform:
    rotate(-45deg)
    translate(-1px,1px);
}


/* ----------------------------------------------------------
   CHILDREN
---------------------------------------------------------- */

.folder-children,
.tree-children,
.children,
[data-folder-children] {

  overflow:
    hidden;
}


/*
 * Свёрнутое дерево полностью скрываем.
 * Не используем max-height, поэтому
 * работает с любым количеством подпапок.
 */

.folder-children-collapsed {

  display:
    none !important;
}


/* ----------------------------------------------------------
   ВЛОЖЕННЫЕ ПАПКИ
---------------------------------------------------------- */

.folder-children,
.tree-children,
[data-folder-children] {

  margin-left:
    13px;

  padding-left:
    5px;

  border-left:
    1px solid
    rgba(84,84,88,.32);
}


/* активная папка */

.folder-line:has(
  > .tree-item.active
)
> .folder-collapse-toggle {

  color:
    #0a84ff;
}


/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width:760px) {

  .folder-collapse-toggle {

    width:
      24px;

    height:
      30px;

    flex-basis:
      24px;

    border-radius:
      6px;
  }


  .folder-collapse-toggle::before {

    width:
      6px;

    height:
      6px;
  }


  .folder-children,
  .tree-children,
  [data-folder-children] {

    margin-left:
      10px;

    padding-left:
      4px;
  }

}

