@font-face {
  font-family: "IBM Plex Sans Arabic Wazin";
  src: url("./IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic Wazin";
  src: url("./IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic Wazin";
  src: url("./IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --green-950: #102b25;
  --green-900: #173a32;
  --green-800: #205044;
  --green-700: #2e695a;
  --gold: #aa8544;
  --gold-soft: #f2ead9;
  --ink: #1d2b27;
  --muted: #78817e;
  --line: #e5e3dc;
  --paper: #ffffff;
  --canvas: #f7f6f2;
  --cream: #fbfaf7;
  --danger: #a95145;
  --shadow: 0 10px 35px rgba(27, 47, 41, 0.06);
  --mail-navy-950: #061226;
  --mail-navy-900: #0a1a33;
  --mail-navy-800: #10294d;
  --mail-navy-700: #173761;
  --mail-gold: #d5ad5a;
  --mail-gold-dark: #b98b2e;
  --mail-gold-soft: #fff7e4;
  font-family: "IBM Plex Sans Arabic Wazin", Tahoma, Arial, sans-serif;
}

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

[hidden],
.hidden {
  display: none !important;
}

html {
  direction: rtl;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button,
input,
textarea {
  outline: none;
}

button:focus-visible,
input:focus,
textarea:focus {
  border-color: var(--green-700) !important;
  box-shadow: 0 0 0 3px rgba(46, 105, 90, 0.12);
}

svg {
  display: block;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 52%) 1fr;
  background: #fff;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 16% 10%, rgba(213, 173, 90, 0.18), transparent 28%),
    linear-gradient(145deg, #061226, #10294d);
}

.visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
}

.visual-watermark {
  position: absolute;
  left: -5%;
  bottom: -12%;
  width: 50%;
  opacity: 0.025;
  filter: grayscale(1) brightness(4);
}

.mail-scene {
  position: absolute;
  inset: 2% 2.5% 19%;
  z-index: 1;
}

.network-frame {
  position: absolute;
  inset: 2% 1% 1%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 48%, rgba(213, 173, 90, 0.09), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 30px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(4px);
}

.network-frame::before,
.network-frame::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(213, 173, 90, 0.4);
  border-style: solid;
}

.network-frame::before {
  top: 16px;
  right: 16px;
  border-width: 1px 1px 0 0;
}

.network-frame::after {
  bottom: 16px;
  left: 16px;
  border-width: 0 0 1px 1px;
}

.network-orbit {
  position: absolute;
  top: 48%;
  left: 50%;
  border: 1px dashed rgba(213, 173, 90, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-wide {
  width: min(43vw, 610px);
  height: min(34vw, 480px);
}

.orbit-tight {
  width: min(27vw, 390px);
  height: min(22vw, 315px);
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.075);
}

.flow-line {
  position: absolute;
  z-index: 1;
  height: 1px;
  overflow: visible;
  background: linear-gradient(90deg, rgba(213, 173, 90, 0.04), rgba(213, 173, 90, 0.72), rgba(213, 173, 90, 0.04));
  transform-origin: center;
}

.flow-line::before,
.flow-line::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d5ad5a;
  box-shadow: 0 0 12px rgba(213, 173, 90, 0.7);
}

.flow-line::before {
  right: 0;
}

.flow-line::after {
  left: 0;
  opacity: 0.45;
}

.flow-line > i {
  position: absolute;
  top: -4px;
  left: 38%;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(213, 173, 90, 0.8);
  border-radius: 2px;
  background: #10294d;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(213, 173, 90, 0.35);
  animation: mail-packet 5.4s ease-in-out infinite;
}

.flow-hr > i,
.flow-management > i {
  animation-delay: -2.2s;
}

.flow-finance > i,
.flow-outgoing > i {
  animation-delay: -3.7s;
}

.flow-legal {
  top: 29%;
  right: 19%;
  width: 28%;
  transform: rotate(21deg);
}

.flow-hr {
  top: 29%;
  left: 18%;
  width: 30%;
  transform: rotate(-22deg);
}

.flow-finance {
  left: 17%;
  bottom: 28%;
  width: 31%;
  transform: rotate(22deg);
}

.flow-management {
  right: 17%;
  bottom: 27%;
  width: 31%;
  transform: rotate(-22deg);
}

.flow-incoming {
  top: 48%;
  right: 4%;
  width: 39%;
  opacity: 0.52;
}

.flow-outgoing {
  top: 51%;
  left: 4%;
  width: 39%;
  opacity: 0.52;
}

.department-node {
  position: absolute;
  z-index: 3;
  width: clamp(128px, 10vw, 154px);
  min-height: 60px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  background: rgba(8, 25, 50, 0.86);
  box-shadow: 0 17px 38px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(12px);
}

.department-node > span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(213, 173, 90, 0.3);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(213, 173, 90, 0.08);
  color: #d5ad5a;
}

.department-node > span svg {
  width: 15px;
  height: 15px;
}

.department-node small,
.department-node strong {
  display: block;
  white-space: nowrap;
}

.department-node small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 7px;
}

.department-node strong {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 600;
}

.node-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d5ad5a;
  box-shadow: 0 0 10px rgba(213, 173, 90, 0.7);
}

.department-node > b {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d5ad5a;
  color: #061226;
  font-size: 7px;
}

.department-legal {
  top: 7%;
  right: 5%;
  animation: node-float 6s ease-in-out infinite;
}

.department-hr {
  top: 7%;
  left: 5%;
  animation: node-float 6.8s ease-in-out -2.4s infinite;
}

.department-finance {
  left: 4%;
  bottom: 7%;
  animation: node-float 7.2s ease-in-out -3.1s infinite;
}

.department-management {
  right: 4%;
  bottom: 7%;
  animation: node-float 6.5s ease-in-out -1.3s infinite;
}

.central-mail-hub {
  position: absolute;
  z-index: 4;
  top: 49%;
  left: 50%;
  width: clamp(230px, 20vw, 300px);
  height: clamp(185px, 16vw, 240px);
  transform: translate(-50%, -50%);
}

.hub-halo {
  position: absolute;
  inset: 8% 3% 0;
  border: 1px solid rgba(213, 173, 90, 0.19);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 173, 90, 0.12), transparent 68%);
  box-shadow: 0 0 60px rgba(213, 173, 90, 0.08);
}

.message-stack {
  position: absolute;
  right: 18%;
  left: 18%;
  height: 46%;
  padding: 17px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px 10px 5px 5px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(10px);
}

.stack-back {
  top: 1%;
  transform: rotate(-7deg) translateX(-9%);
  opacity: 0.52;
}

.stack-middle {
  top: 5%;
  transform: rotate(5deg) translateX(8%);
  opacity: 0.72;
}

.message-stack span {
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(213, 173, 90, 0.5);
  border-radius: 6px;
}

.message-stack i {
  display: block;
  width: 68%;
  height: 3px;
  margin-top: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
}

.message-stack i:last-child {
  width: 47%;
}

.hub-envelope {
  position: absolute;
  z-index: 2;
  right: 5%;
  left: 5%;
  top: 25%;
  height: 56%;
  overflow: hidden;
  border: 1px solid rgba(213, 173, 90, 0.48);
  border-radius: 14px;
  background: linear-gradient(145deg, #10294d, #07172d);
  box-shadow: 0 27px 45px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.07);
}

.hub-envelope-top {
  position: absolute;
  top: -81%;
  right: 8%;
  left: 8%;
  height: 151%;
  border: 1px solid rgba(213, 173, 90, 0.28);
  border-radius: 16px;
  background: rgba(213, 173, 90, 0.06);
  transform: rotate(45deg);
}

.hub-envelope-left,
.hub-envelope-right {
  position: absolute;
  bottom: -65%;
  width: 72%;
  height: 125%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #091b35;
}

.hub-envelope-left {
  left: -37%;
  transform: rotate(34deg);
}

.hub-envelope-right {
  right: -37%;
  transform: rotate(-34deg);
}

.hub-seal {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(213, 173, 90, 0.72);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #081932;
  color: #d5ad5a;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(213, 173, 90, 0.07);
}

.hub-seal svg {
  width: 19px;
  height: 19px;
}

.hub-caption {
  position: absolute;
  z-index: 5;
  right: 13%;
  bottom: -4%;
  left: 13%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  background: rgba(6, 18, 38, 0.92);
  text-align: center;
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.25);
}

.hub-caption small,
.hub-caption strong,
.hub-caption span {
  display: block;
}

.hub-caption small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 6px;
}

.hub-caption strong {
  margin-top: 2px;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
}

.hub-caption span {
  margin-top: 4px;
  color: #d5ad5a;
  font-size: 6px;
}

.hub-caption span i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 3px;
  border-radius: 50%;
  background: #d5ad5a;
  box-shadow: 0 0 8px rgba(213, 173, 90, 0.7);
}

.transit-card {
  position: absolute;
  z-index: 5;
  min-width: 138px;
  min-height: 52px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 7px;
  background: rgba(10, 29, 56, 0.88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.transit-card > span:first-child {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(213, 173, 90, 0.27);
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(213, 173, 90, 0.08);
  color: #d5ad5a;
}

.transit-card svg {
  width: 13px;
  height: 13px;
}

.transit-card small,
.transit-card strong {
  display: block;
  white-space: nowrap;
}

.transit-card small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 6px;
}

.transit-card strong {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 8px;
  font-weight: 600;
}

.transit-card > b {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d5ad5a;
  color: #061226;
  font-size: 7px;
}

.delivery-check {
  color: #d5ad5a;
  font-size: 13px;
  font-style: normal;
}

.transit-inbox {
  top: 40%;
  right: 1%;
  transform: rotate(-2deg);
}

.transit-attachment {
  top: 46%;
  left: 0;
  transform: rotate(2deg);
}

.transit-sent {
  right: 28%;
  bottom: 1%;
  transform: rotate(-1deg);
}

.network-pulse {
  position: absolute;
  z-index: 2;
  width: 8px;
  height: 8px;
  border: 1px solid #d5ad5a;
  border-radius: 50%;
  background: #10294d;
  box-shadow: 0 0 0 6px rgba(213, 173, 90, 0.05), 0 0 15px rgba(213, 173, 90, 0.52);
}

.pulse-one {
  top: 21%;
  left: 39%;
}

.pulse-two {
  right: 31%;
  bottom: 21%;
}

.pulse-three {
  top: 54%;
  left: 20%;
}

@keyframes mail-packet {
  0%,
  100% {
    left: 8%;
    opacity: 0.35;
  }
  50% {
    left: 82%;
    opacity: 1;
  }
}

@keyframes node-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-line > i,
  .department-node {
    animation: none;
  }
}

.visual-copy {
  position: absolute;
  right: 7%;
  left: 7%;
  bottom: 6%;
  z-index: 2;
}

.visual-kicker {
  color: #d5ad5a;
  font-size: 11px;
  font-weight: 700;
}

.visual-copy h1 {
  margin: 8px 0 6px;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.4;
  font-weight: 600;
}

.visual-copy p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1.8;
}

.login-panel {
  min-height: 100vh;
  padding: 42px;
  display: grid;
  place-items: center;
  background: #fff;
}

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

.login-brand {
  height: 112px;
  display: flex;
  align-items: center;
}

.login-brand img {
  width: 210px;
  height: 112px;
  object-fit: contain;
  object-position: right center;
}

.login-heading {
  padding: 8px 0 25px;
}

.login-product-name {
  display: block;
  margin-bottom: 8px;
  color: #0a1a33;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
}

.login-heading h2 {
  margin: 0 0 7px;
  color: #061226;
  font-size: 27px;
  font-weight: 600;
}

.login-heading p {
  margin: 0;
  color: #697589;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 7px;
  color: #45534f;
  font-size: 12px;
  font-weight: 600;
}

.field-control {
  position: relative;
  display: block;
}

.field-control > span {
  position: absolute;
  top: 50%;
  right: 13px;
  z-index: 1;
  color: #7d8a86;
  transform: translateY(-50%);
  pointer-events: none;
}

.field-control input {
  width: 100%;
  height: 46px;
  border: 1px solid #dcdfdc;
  border-radius: 10px;
  padding: 0 43px 0 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  transition: 0.18s ease;
}

.field-control input[dir="ltr"] {
  text-align: left;
}

.login-screen input:focus,
.login-screen button:focus-visible {
  border-color: #b98b2e !important;
  box-shadow: 0 0 0 4px rgba(185, 139, 46, 0.12);
}

.login-button,
.send-button {
  border: 0;
  color: #fff;
  font-weight: 600;
  transition: 0.18s ease;
}

.login-button {
  min-height: 48px;
  margin-top: 3px;
  padding: 0 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  background: linear-gradient(135deg, #10294d, #173761);
  box-shadow: 0 8px 20px rgba(16, 41, 77, 0.2);
}

.login-button:hover {
  background: linear-gradient(135deg, #0a1a33, #10294d);
}

.login-error {
  margin: 0;
  border: 1px solid #efd5d1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff7f6;
  color: var(--danger);
  font-size: 11px;
}

.login-security {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 19px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f8fa;
  color: #697589;
}

.login-security > span {
  flex: 0 0 auto;
  color: #b98b2e;
  margin-top: 2px;
}

.login-security p {
  margin: 0;
  font-size: 10px;
  line-height: 1.8;
}

.login-system-footer {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #eceff3;
  text-align: center;
}

.login-system-footer strong,
.login-system-footer span {
  display: block;
}

.login-system-footer strong {
  color: #697589;
  direction: ltr;
  font-size: 9px;
  font-weight: 600;
}

.login-system-footer span {
  margin-top: 6px;
  color: #929baa;
  font-size: 8px;
  line-height: 1.6;
}

.remember-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #697589;
  font-size: 10px;
  font-weight: 400;
  cursor: pointer;
}

.remember-email input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #10294d;
}

/* Application shell */
.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: 252px;
  display: flex;
  flex-direction: column;
  background: var(--green-950);
  color: #fff;
  transition: transform 0.24s ease;
}

.sidebar-brand {
  min-height: 94px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand img {
  width: 90px;
  height: 58px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.93;
}

.sidebar-brand div {
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
  white-space: nowrap;
}

.sidebar-brand strong {
  font-size: 13px;
  font-weight: 600;
}

.sidebar-brand small {
  margin-top: 3px;
  color: #92a7a1;
  font-size: 9px;
}

.sidebar-primary {
  flex: 1;
  padding: 20px 13px;
  overflow-y: auto;
}

.compose-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(215, 184, 117, 0.42);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #d1b06f;
  color: #19342e;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.compose-button:hover {
  background: #dabd82;
}

.nav-label {
  padding: 25px 12px 8px;
  color: #688079;
  font-size: 9px;
  font-weight: 600;
}

.folders {
  display: grid;
  gap: 3px;
}

.folder-item {
  position: relative;
  width: 100%;
  min-height: 43px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: #aebdb8;
  text-align: right;
  font-size: 12px;
  transition: 0.16s ease;
}

.folder-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.folder-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.folder-item.active::before {
  content: "";
  position: absolute;
  right: -13px;
  top: 8px;
  width: 3px;
  height: 27px;
  border-radius: 3px 0 0 3px;
  background: #cfaa62;
}

.folder-icon {
  color: #8da29c;
}

.folder-item.active .folder-icon {
  color: #d8b870;
}

.folder-item b {
  min-width: 23px;
  margin-right: auto;
  padding: 2px 6px;
  border-radius: 10px;
  background: #2b554b;
  color: #d9e3df;
  text-align: center;
  font-size: 9px;
  font-weight: 500;
}

.sidebar-bottom {
  padding: 14px 13px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-note {
  display: flex;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-note > span {
  color: #d1b06f;
  flex: 0 0 auto;
}

.sidebar-note strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.sidebar-note p {
  margin: 4px 0 0;
  color: #82978f;
  font-size: 8px;
  line-height: 1.7;
}

.system-label {
  display: block;
  margin-top: 11px;
  color: #637b74;
  text-align: center;
  font-size: 8px;
}

.app-main {
  min-height: 100vh;
  margin-right: 252px;
}

.topbar {
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-start {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #8b918f;
  font-size: 10px;
}

.topbar-title strong {
  padding-right: 8px;
  border-right: 1px solid #dbdedb;
  color: #45534f;
  font-size: 11px;
  font-weight: 600;
}

.search {
  position: relative;
  width: min(430px, 36vw);
}

.search > span {
  position: absolute;
  right: 12px;
  top: 50%;
  color: #89918e;
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 39px 0 58px;
  border: 1px solid #e2e3df;
  border-radius: 6px;
  background: #fafaf8;
  color: var(--ink);
  font-size: 10px;
}

.search kbd {
  position: absolute;
  left: 9px;
  top: 50%;
  padding: 2px 5px;
  border: 1px solid #dedfdb;
  border-radius: 3px;
  background: #fff;
  color: #8b918f;
  font: 9px Arial, sans-serif;
  transform: translateY(-50%);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5f716b;
  font-size: 9px;
  white-space: nowrap;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e2e3df;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #65716e;
}

.icon-button:hover {
  border-color: #cbd2ce;
  background: #fafbf9;
  color: var(--green-800);
}

.icon-button.danger:hover {
  border-color: #ead4d0;
  background: #fff7f6;
  color: var(--danger);
}

.profile-button {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 4px;
}

.profile-button > span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #d1b06f;
  color: #19342e;
  font-size: 10px;
  font-weight: 700;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 10px;
}

.profile-copy small {
  margin-top: 2px;
  color: #87908d;
  font-size: 8px;
  direction: ltr;
  text-align: right;
}

.logout-button {
  height: 35px;
  padding: 0 10px;
  border: 1px solid #e2e3df;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #65716e;
  font-size: 9px;
}

.logout-button:hover {
  color: var(--danger);
  border-color: #ead4d0;
}

.mobile-only {
  display: none;
}

/* Mail workspace */
.workspace {
  min-height: calc(100vh - 68px);
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(390px, 0.88fr) minmax(480px, 1.12fr);
  gap: 16px;
  background: var(--canvas);
}

.mail-panel,
.reader-panel {
  min-width: 0;
  min-height: calc(100vh - 112px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 2px 12px rgba(25, 41, 36, 0.025);
}

.panel-heading {
  min-height: 86px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #eeeee9;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
}

.heading-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.heading-title-row h1 {
  margin: 0;
  color: var(--green-950);
  font-size: 22px;
  line-height: 1.3;
}

.message-total {
  padding: 3px 8px;
  border-radius: 11px;
  background: var(--gold-soft);
  color: #8b6a31;
  font-size: 8px;
  font-weight: 600;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6e7975;
  font-size: 9px;
  cursor: pointer;
}

.filter-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-track {
  width: 32px;
  height: 18px;
  padding: 2px;
  border-radius: 10px;
  background: #cdd3d0;
  transition: 0.18s ease;
}

.filter-track i {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: 0.18s ease;
}

.filter-toggle input:checked + .filter-track {
  background: var(--green-700);
}

.filter-toggle input:checked + .filter-track i {
  transform: translateX(-14px);
}

.list-toolbar,
.reader-toolbar {
  min-height: 53px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #eeeee9;
  background: #fbfbf9;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: #e5e5df;
}

.toolbar-spacer,
.composer-footer-spacer {
  flex: 1;
}

.page-label {
  color: #929996;
  font-size: 8px;
}

.message-list {
  min-height: 260px;
}

.message-card {
  position: relative;
  min-height: 94px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 18px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #efefeb;
  background: #fff;
  cursor: pointer;
  transition: 0.14s ease;
}

.message-card:hover {
  background: #fafaf7;
}

.message-card.selected {
  background: #f3f7f5;
  box-shadow: inset -3px 0 var(--green-700);
}

.message-card.unread {
  background: #fdfcf8;
}

.message-card.unread::before {
  content: "";
  position: absolute;
  right: 0;
  top: 17px;
  bottom: 17px;
  width: 2px;
  background: var(--gold);
}

.message-check {
  width: 14px;
  height: 14px;
  accent-color: var(--green-700);
}

.message-avatar,
.sender-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #edf3f0;
  color: var(--green-700);
  font-weight: 700;
}

.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 11px;
}

.message-copy {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sender {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #3d4d48;
  font-size: 10px;
  font-weight: 600;
}

.message-card.unread .sender,
.message-card.unread .subject {
  color: var(--green-950);
  font-weight: 700;
}

.message-time {
  margin-right: auto;
  color: #9ba19f;
  font-size: 8px;
  white-space: nowrap;
}

.subject {
  margin: 5px 0 3px;
  overflow: hidden;
  color: #4c5b56;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview {
  margin: 0;
  overflow: hidden;
  color: #8a938f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9da4a1;
}

.star-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: #b1b6b4;
}

.star-button:hover,
.star-button.active {
  color: var(--gold);
}

.loading-state,
.empty-list {
  min-height: 300px;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #89928f;
}

.loading-state p,
.empty-list p {
  margin: 9px 0 0;
  font-size: 10px;
}

.empty-list svg {
  color: var(--gold);
}

.empty-list h3 {
  margin: 13px 0 0;
  color: #4c5c57;
  font-size: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d9dedb;
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.login-spinner {
  width: 17px;
  height: 17px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reader */
.reader-panel {
  position: relative;
}

.reader-empty {
  min-height: calc(100vh - 114px);
  padding: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.reader-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid #e8e4da;
  background: #fbf8f1;
  color: var(--gold);
}

.reader-empty-icon svg {
  width: 25px;
  height: 25px;
}

.empty-kicker {
  margin-top: 17px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 600;
}

.reader-empty h2 {
  margin: 7px 0;
  color: var(--green-950);
  font-size: 17px;
}

.reader-empty p {
  max-width: 370px;
  margin: 0;
  color: #87908d;
  font-size: 10px;
  line-height: 1.8;
}

.reader-content {
  min-height: 100%;
}

.reader-back {
  display: none;
}

.reader-body {
  padding: 30px 36px 42px;
}

.reader-document-mark {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 11px;
  background: var(--gold-soft);
  color: #8b6a31;
  font-size: 8px;
  font-weight: 600;
}

.reader-subject {
  margin: 13px 0 19px;
  color: var(--green-950);
  font-size: 22px;
  line-height: 1.55;
}

.sender-row {
  min-height: 58px;
  padding: 11px 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #eeeee9;
}

.sender-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 11px;
}

.sender-details {
  min-width: 0;
}

.sender-details strong,
.sender-details small {
  display: block;
}

.sender-details strong {
  color: #40504b;
  font-size: 10px;
}

.sender-details small {
  margin-top: 3px;
  color: #8b938f;
  font-size: 8px;
  direction: ltr;
  text-align: right;
}

.reader-date {
  margin-right: auto;
  color: #929996;
  font-size: 8px;
}

.mail-body {
  min-height: 210px;
  padding: 26px 0;
  color: #3f4e49;
  font-size: 12px;
  line-height: 2.05;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachments {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid #eeeee9;
}

.attachments h3 {
  color: #53615d;
  font-size: 10px;
}

.attachment {
  max-width: 310px;
  padding: 10px;
  border: 1px solid #e3e6e2;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fafbf9;
  color: var(--green-700);
}

.attachment strong,
.attachment small {
  display: block;
}

.attachment strong {
  color: #40504b;
  font-size: 9px;
}

.attachment small {
  margin-top: 2px;
  color: #929996;
  font-size: 7px;
}

.reader-actions {
  margin-top: 23px;
}

.secondary-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d9dedb;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #fff;
  color: #354b45;
  font-size: 10px;
  font-weight: 600;
}

.secondary-button:hover {
  background: #f8faf8;
  border-color: #bfc9c5;
}

/* Composer */
.composer {
  position: fixed;
  left: 24px;
  bottom: 0;
  z-index: 100;
  width: min(620px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #d8ddd9;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #fff;
  box-shadow: 0 18px 55px rgba(16, 43, 37, 0.2);
}

.composer.minimized form {
  display: none;
}

.composer-header {
  min-height: 64px;
  padding: 0 15px 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--green-950);
  color: #fff;
}

.composer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-emblem {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #d1b06f;
}

.composer-title small,
.composer-title h2 {
  display: block;
}

.composer-title small {
  color: #94a8a2;
  font-size: 8px;
}

.composer-title h2 {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
}

.composer-window-actions {
  display: flex;
  gap: 5px;
}

.composer-window-actions .icon-button {
  width: 31px;
  height: 31px;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #c1cfca;
}

.compose-addresses {
  padding: 8px 18px 0;
}

.compose-field {
  min-height: 47px;
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  border-bottom: 1px solid #ecece7;
  color: #66736f;
  font-size: 10px;
}

.compose-field input {
  width: 100%;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  box-shadow: none !important;
}

#composeBody {
  width: 100%;
  min-height: 250px;
  padding: 22px;
  border: 0;
  resize: vertical;
  color: #35443f;
  font-size: 12px;
  line-height: 1.9;
}

.compose-disclaimer {
  min-height: 40px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #eeeee9;
  background: #fbfbf9;
  color: #7d8783;
  font-size: 8px;
}

.compose-disclaimer > span:first-child {
  color: var(--green-700);
}

.composer-footer {
  min-height: 64px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e9e9e4;
}

.send-button {
  min-height: 38px;
  padding: 0 17px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-800);
  font-size: 10px;
}

.send-button:hover {
  background: var(--green-900);
}

/* Feedback */
.toast-region {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 150;
  display: grid;
  gap: 8px;
}

.composer:not(.hidden) ~ .toast-region {
  bottom: 82px;
}

.toast {
  min-width: 260px;
  max-width: 420px;
  padding: 12px 15px;
  border-radius: 7px;
  background: #193c33;
  color: #fff;
  box-shadow: 0 12px 30px rgba(14, 38, 31, 0.25);
  font-size: 10px;
}

.toast.error {
  background: #80473f;
}

.mobile-overlay {
  display: none;
}

/* Responsive */
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    padding: 16px;
  }

  .topbar {
    padding-inline: 20px;
  }

  .connection-badge,
  .profile-copy {
    display: none;
  }
}

@media (max-width: 920px) {
  .login-screen {
    grid-template-columns: minmax(420px, 50%) 1fr;
  }

  .login-panel {
    padding: 32px;
  }

  .mail-scene {
    inset: 5% 3% 25%;
  }

  .department-node {
    width: 118px;
    min-height: 52px;
    padding: 8px;
    grid-template-columns: 28px 1fr auto;
    gap: 6px;
  }

  .department-node > span {
    width: 28px;
    height: 28px;
  }

  .central-mail-hub {
    width: 220px;
    height: 180px;
  }

  .transit-card {
    min-width: 116px;
    padding: 7px;
  }

  .transit-inbox {
    right: -1%;
  }

  .transit-attachment {
    left: -1%;
  }

  .transit-sent {
    right: 24%;
  }

  .sidebar {
    transform: translateX(100%);
    box-shadow: -18px 0 48px rgba(16, 43, 37, 0.2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .app-main {
    margin-right: 0;
  }

  .mobile-only {
    display: inline-grid;
  }

  .mobile-overlay.show {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(16, 43, 37, 0.34);
  }

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

  .reader-panel {
    position: fixed;
    inset: 68px 0 0;
    z-index: 35;
    display: none;
    min-height: auto;
    border: 0;
    border-radius: 0;
  }

  .reader-panel.mobile-open {
    display: block;
    overflow-y: auto;
  }

  .reader-back {
    display: inline-grid;
  }

  .mail-panel {
    min-height: calc(100vh - 100px);
  }

  .topbar-title {
    display: none;
  }

  .search {
    width: min(420px, 54vw);
  }
}

@media (max-width: 640px) {
  .login-screen {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    grid-template-columns: none;
    background: #fff;
  }

  .login-visual {
    width: 100%;
    min-width: 0;
    min-height: 230px;
  }

  .visual-grid {
    background-size: 42px 42px;
  }

  .mail-scene {
    inset: 12px 12px 64px;
  }

  .network-frame {
    inset: 0;
    border-radius: 13px;
  }

  .network-orbit,
  .flow-incoming,
  .flow-outgoing,
  .transit-card,
  .network-pulse {
    display: none;
  }

  .central-mail-hub {
    top: 54%;
    width: 135px;
    height: 108px;
  }

  .message-stack {
    padding: 8px 10px;
    border-radius: 6px;
  }

  .message-stack span {
    width: 12px;
    height: 12px;
    border-radius: 3px;
  }

  .message-stack i {
    height: 2px;
    margin-top: 4px;
  }

  .hub-envelope {
    border-radius: 7px;
  }

  .hub-seal {
    width: 25px;
    height: 25px;
    box-shadow: 0 0 0 4px rgba(213, 173, 90, 0.07);
  }

  .hub-seal svg {
    width: 11px;
    height: 11px;
  }

  .hub-caption {
    right: 8%;
    left: 8%;
    bottom: -7%;
    padding: 5px 7px;
    border-radius: 5px;
  }

  .hub-caption small,
  .hub-caption span {
    display: none;
  }

  .hub-caption strong {
    margin: 0;
    font-size: 6px;
  }

  .department-node {
    width: 86px;
    min-height: 38px;
    padding: 5px;
    grid-template-columns: 22px 1fr auto;
    gap: 5px;
    border-radius: 7px;
  }

  .department-node > span {
    width: 22px;
    height: 22px;
    border-radius: 5px;
  }

  .department-node > span svg {
    width: 10px;
    height: 10px;
  }

  .department-node small {
    font-size: 4px;
  }

  .department-node strong {
    margin-top: 1px;
    font-size: 5px;
  }

  .department-node > b {
    width: 12px;
    height: 12px;
    font-size: 4px;
  }

  .node-status {
    width: 4px;
    height: 4px;
  }

  .department-legal,
  .department-hr {
    top: 4px;
  }

  .department-legal {
    right: 2px;
  }

  .department-hr {
    left: 2px;
  }

  .department-finance,
  .department-management {
    bottom: 2px;
  }

  .department-finance {
    left: 2px;
  }

  .department-management {
    right: 2px;
  }

  .flow-line {
    opacity: 0.5;
  }

  .flow-line > i {
    width: 6px;
    height: 6px;
    top: -3px;
  }

  .visual-copy {
    right: 20px;
    left: 20px;
    bottom: 22px;
  }

  .visual-kicker {
    font-size: 8px;
  }

  .visual-copy h1 {
    margin: 4px 0 2px;
    font-size: 18px;
  }

  .visual-copy p {
    font-size: 8px;
  }

  .login-panel {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 28px 22px 34px;
  }

  .login-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 auto;
  }

  .login-form,
  .login-field,
  .field-control {
    min-width: 0;
    max-width: 100%;
  }

  .login-brand {
    height: 85px;
  }

  .login-brand img {
    width: 170px;
    height: 85px;
  }

  .login-product-name {
    font-size: 22px;
  }

  .login-heading h2 {
    font-size: 24px;
  }

  .topbar {
    height: 62px;
    padding: 0 12px;
    gap: 8px;
  }

  .search {
    flex: 1;
    width: auto;
  }

  .search kbd,
  .connection-badge,
  .logout-button span:last-child {
    display: none;
  }

  .search input {
    padding-left: 10px;
  }

  .profile-button {
    display: none;
  }

  .logout-button {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .workspace {
    min-height: calc(100vh - 62px);
    padding: 9px;
  }

  .mail-panel {
    min-height: calc(100vh - 80px);
    border-radius: 7px;
  }

  .panel-heading {
    min-height: 78px;
    padding: 14px;
  }

  .heading-title-row h1 {
    font-size: 19px;
  }

  .filter-toggle > span:last-child,
  .page-label {
    display: none;
  }

  .message-card {
    min-height: 88px;
    padding: 12px 11px;
    grid-template-columns: 16px 34px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .message-avatar {
    width: 34px;
    height: 34px;
  }

  .reader-panel {
    inset: 62px 0 0;
  }

  .reader-body {
    padding: 22px 18px 36px;
  }

  .reader-subject {
    font-size: 18px;
  }

  .reader-date {
    display: none;
  }

  .composer {
    left: 0;
    width: 100%;
    max-height: calc(100vh - 18px);
    overflow-y: auto;
    border-radius: 10px 10px 0 0;
  }

  #composeBody {
    min-height: 210px;
  }

  .toast-region {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

.app-shell .profile-button > span:first-child,
.profile-photo-preview {
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.app-shell .profile-button > span:first-child.has-photo b {
  visibility: hidden;
}

.profile-photo-field {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #e1e5ec;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8f9fb;
}

.profile-photo-preview {
  width: 76px;
  height: 76px;
  border: 2px solid #e2d2ad;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background-color: #fff8ea;
  color: #9a7739;
}

.profile-photo-preview.has-photo > span {
  visibility: hidden;
}

.profile-photo-field strong {
  color: #10294d;
  font-size: 12px;
}

.profile-photo-field p {
  margin: 4px 0 9px;
  color: #8490a1;
  font-size: 9px;
}

.photo-upload-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d8bd86;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #8a682d;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.photo-upload-button input {
  display: none;
}

.locked-field {
  color: #697589 !important;
  background: #eef1f5 !important;
  cursor: not-allowed;
}

.signature-contact-grid label > small {
  color: #929cab;
  font-size: 8px;
  font-weight: 400;
}

/* Wazin Mail internal workspace */
.app-shell {
  --mail-navy-950: #061226;
  --mail-navy-900: #0a1a33;
  --mail-navy-800: #10294d;
  --mail-navy-700: #173761;
  --mail-gold: #d5ad5a;
  --mail-gold-dark: #b98b2e;
  --mail-gold-soft: #fff7e4;
  --mail-canvas: #f4f6f9;
  --mail-line: #dfe4ec;
  --mail-muted: #718096;
  background: var(--mail-canvas);
  color: #142033;
}

.app-shell .sidebar {
  width: 270px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0, rgba(213, 173, 90, 0.13), transparent 28%),
    linear-gradient(180deg, #061226 0%, #0a1a33 55%, #08172c 100%);
  box-shadow: -10px 0 34px rgba(6, 18, 38, 0.12);
}

.app-shell .sidebar::after {
  content: "";
  position: absolute;
  left: -72px;
  bottom: 34px;
  width: 245px;
  height: 245px;
  border: 1px solid rgba(213, 173, 90, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.018), 0 0 0 84px rgba(213, 173, 90, 0.018);
  pointer-events: none;
}

.app-shell .sidebar-brand {
  position: relative;
  z-index: 1;
  min-height: 88px;
  padding: 17px 18px;
  gap: 13px;
  border-bottom-color: rgba(255, 255, 255, 0.085);
}

.app-shell .sidebar-brand img {
  width: 42px;
  height: 51px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

.app-shell .sidebar-brand div {
  padding-right: 13px;
  border-right-color: rgba(213, 173, 90, 0.32);
}

.app-shell .sidebar-brand strong {
  font-size: 15px;
  color: #fff;
}

.app-shell .sidebar-brand small {
  color: rgba(213, 173, 90, 0.82);
  direction: ltr;
  text-align: right;
  letter-spacing: 0.5px;
}

.app-shell .sidebar-primary {
  position: relative;
  z-index: 1;
  padding: 18px 14px;
}

.app-shell .compose-button {
  min-height: 58px;
  padding: 8px 12px;
  justify-content: flex-start;
  border: 1px solid rgba(213, 173, 90, 0.5);
  border-radius: 11px;
  gap: 11px;
  background: linear-gradient(135deg, #d5ad5a, #b98b2e);
  color: #061226;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.app-shell .compose-button:hover {
  background: linear-gradient(135deg, #dfbd78, #c5963b);
  transform: translateY(-1px);
}

.compose-button-icon {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(6, 18, 38, 0.16);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.app-shell .compose-button > span:last-child {
  min-width: 0;
  display: block;
  text-align: right;
}

.app-shell .compose-button strong,
.app-shell .compose-button small {
  display: block;
}

.app-shell .compose-button strong {
  font-size: 11px;
}

.app-shell .compose-button small {
  margin-top: 2px;
  font-size: 7px;
  opacity: 0.72;
  font-weight: 500;
}

.app-shell .nav-label {
  padding: 24px 11px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6f89a7;
  font-size: 8px;
  letter-spacing: 0.2px;
}

.app-shell .nav-label i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent);
}

.app-shell .folders {
  gap: 5px;
}

.app-shell .folder-item {
  min-height: 54px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  gap: 10px;
  color: #91a7c1;
}

.app-shell .folder-item:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(-2px);
}

.app-shell .folder-item.active {
  color: #fff;
  border-color: rgba(213, 173, 90, 0.19);
  background: linear-gradient(90deg, rgba(213, 173, 90, 0.13), rgba(255, 255, 255, 0.055));
  box-shadow: inset -3px 0 var(--mail-gold);
}

.app-shell .folder-item.active::before {
  display: none;
}

.app-shell .folder-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #7891ae;
  background: rgba(255, 255, 255, 0.025);
}

.app-shell .folder-icon svg {
  width: 16px;
  height: 16px;
}

.app-shell .folder-item.active .folder-icon {
  color: var(--mail-gold);
  border-color: rgba(213, 173, 90, 0.26);
  background: rgba(213, 173, 90, 0.09);
}

.folder-copy {
  min-width: 0;
  flex: 1;
}

.folder-copy strong,
.folder-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-copy strong {
  font-size: 10px;
  font-weight: 600;
}

.folder-copy small {
  margin-top: 2px;
  color: #607b9a;
  font-size: 7px;
}

.app-shell .folder-item:hover .folder-copy small,
.app-shell .folder-item.active .folder-copy small {
  color: #8ea5bf;
}

.app-shell .folder-item b {
  min-width: 22px;
  min-height: 19px;
  margin-right: 0;
  padding: 2px 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: #9fb1c7;
}

.app-shell .folder-item.active b {
  background: var(--mail-gold);
  color: var(--mail-navy-950);
}

.app-shell .sidebar-bottom {
  position: relative;
  z-index: 1;
  padding: 13px 14px 15px;
  border-top-color: rgba(255, 255, 255, 0.075);
}

.app-shell .sidebar-note {
  border-color: rgba(213, 173, 90, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.app-shell .sidebar-note > span {
  color: var(--mail-gold);
}

.app-shell .sidebar-note p,
.app-shell .system-label {
  color: #66809d;
}

.app-shell .system-label {
  direction: ltr;
  letter-spacing: 0.25px;
}

.app-shell .app-main {
  margin-right: 270px;
}

.app-shell .topbar {
  height: 78px;
  padding: 0 25px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--mail-line);
  box-shadow: 0 4px 18px rgba(6, 18, 38, 0.035);
}

.app-shell .topbar-start {
  gap: 12px;
}

.topbar-logo {
  width: 82px;
  height: 49px;
  object-fit: contain;
}

.topbar-separator {
  width: 1px;
  height: 32px;
  background: #e0e5ed;
}

.app-shell .topbar-title {
  display: block;
  color: var(--mail-muted);
}

.app-shell .topbar-title strong,
.app-shell .topbar-title span {
  display: block;
}

.app-shell .topbar-title strong {
  padding: 0;
  border: 0;
  color: var(--mail-navy-950);
  font-size: 13px;
  font-weight: 700;
}

.app-shell .topbar-title span {
  margin-top: 3px;
  color: #8a96a8;
  font-size: 8px;
}

.app-shell .search {
  width: min(470px, 35vw);
}

.app-shell .search input {
  height: 42px;
  border-color: #dfe4ec;
  border-radius: 10px;
  background: #f7f8fb;
  color: var(--mail-navy-950);
  font-size: 10px;
}

.app-shell .search input:focus {
  border-color: var(--mail-gold-dark) !important;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(185, 139, 46, 0.1);
}

.app-shell .search > span {
  color: #8390a2;
}

.app-shell .connection-badge {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #dfe4ec;
  border-radius: 17px;
  background: #f8f9fb;
  color: #58677a;
  font-size: 8px;
}

.app-shell .connection-badge i {
  background: var(--mail-gold-dark);
  box-shadow: 0 0 0 4px rgba(185, 139, 46, 0.09);
}

.app-shell .icon-button {
  border-color: #dfe4ec;
  border-radius: 9px;
  color: #627086;
}

.app-shell .icon-button:hover {
  border-color: rgba(185, 139, 46, 0.5);
  background: var(--mail-gold-soft);
  color: var(--mail-gold-dark);
}

.app-shell .refresh-button {
  width: 39px;
  height: 39px;
}

.app-shell .profile-button {
  min-height: 45px;
  padding: 4px 9px 4px 12px;
  border: 1px solid #e1e5ec;
  border-radius: 11px;
  background: #fff;
}

.app-shell .profile-button > span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mail-gold), var(--mail-gold-dark));
  color: var(--mail-navy-950);
}

.app-shell .profile-copy strong {
  color: var(--mail-navy-950);
}

.app-shell .profile-copy small {
  color: #8390a2;
}

.app-shell .logout-button {
  height: 39px;
  border-color: #dfe4ec;
  border-radius: 9px;
  color: #69778a;
}

.app-shell .workspace {
  min-height: calc(100vh - 78px);
  padding: 18px;
  grid-template-columns: minmax(390px, 0.84fr) minmax(500px, 1.16fr);
  gap: 14px;
  background:
    radial-gradient(circle at 8% 100%, rgba(213, 173, 90, 0.05), transparent 24%),
    var(--mail-canvas);
}

.app-shell .mail-panel,
.app-shell .reader-panel {
  min-height: calc(100vh - 114px);
  border-color: var(--mail-line);
  border-radius: 13px;
  box-shadow: 0 8px 30px rgba(6, 18, 38, 0.045);
}

.app-shell .panel-heading {
  min-height: 88px;
  padding: 17px 19px;
  border-bottom-color: #e8ebf0;
  background: linear-gradient(180deg, #fff, #fbfcfd);
}

.app-shell .eyebrow {
  color: var(--mail-gold-dark);
  letter-spacing: 0.3px;
}

.app-shell .heading-title-row h1 {
  color: var(--mail-navy-950);
  font-size: 23px;
}

.app-shell .message-total {
  border: 1px solid #eadbb8;
  background: var(--mail-gold-soft);
  color: #8a682d;
}

.app-shell .filter-toggle {
  color: #718095;
}

.app-shell .filter-track {
  background: #d7dce5;
}

.app-shell .filter-toggle input:checked + .filter-track {
  background: var(--mail-navy-800);
}

.app-shell .list-toolbar,
.app-shell .reader-toolbar {
  min-height: 52px;
  border-bottom-color: #e8ebf0;
  background: #f8f9fb;
}

.app-shell .message-list {
  height: calc(100vh - 254px);
  min-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd2dd transparent;
}

.app-shell .message-card {
  min-height: 98px;
  padding: 13px 14px;
  grid-template-columns: 17px 42px minmax(0, 1fr) auto;
  gap: 11px;
  border-bottom-color: #ebedf2;
  background: #fff;
}

.app-shell .message-card:hover {
  z-index: 1;
  background: #f9fafc;
  box-shadow: inset -3px 0 rgba(213, 173, 90, 0.45);
}

.app-shell .message-card.selected {
  background: linear-gradient(90deg, #fffaf0, #f8f9fb);
  box-shadow: inset -3px 0 var(--mail-gold);
}

.app-shell .message-card.unread {
  background: #fffdf8;
}

.app-shell .message-card.unread::before {
  display: none;
}

.app-shell .message-check {
  accent-color: var(--mail-navy-800);
}

.app-shell .message-avatar,
.app-shell .sender-avatar {
  background: linear-gradient(145deg, #edf1f6, #f8f9fb);
  color: var(--mail-navy-800);
  border: 1px solid #dce2ea;
}

.app-shell .message-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.app-shell .message-meta {
  gap: 7px;
}

.read-state {
  width: 6px;
  height: 6px;
  border: 1px solid #aeb7c4;
  border-radius: 50%;
  flex: 0 0 auto;
}

.message-card.unread .read-state {
  border-color: var(--mail-gold-dark);
  background: var(--mail-gold);
  box-shadow: 0 0 0 3px rgba(213, 173, 90, 0.1);
}

.app-shell .sender {
  color: #37465a;
  font-size: 10px;
}

.app-shell .message-card.unread .sender,
.app-shell .message-card.unread .subject {
  color: var(--mail-navy-950);
}

.app-shell .message-time {
  color: #8b96a7;
}

.app-shell .subject {
  margin-block: 5px 4px;
  color: #344359;
  font-size: 11px;
}

.app-shell .preview {
  color: #7c8899;
  line-height: 1.5;
}

.app-shell .message-icons {
  flex-direction: column;
  color: #9aa5b4;
}

.attachment-indicator {
  width: 27px;
  height: 27px;
  border: 1px solid #e0e4eb;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #f8f9fb;
}

.app-shell .star-button {
  width: 27px;
  height: 27px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
}

.app-shell .star-button:hover {
  background: var(--mail-gold-soft);
}

.app-shell .spinner {
  border-color: #d8dee8;
  border-top-color: var(--mail-gold-dark);
}

.app-shell .empty-list h3 {
  color: var(--mail-navy-900);
}

.app-shell .reader-panel {
  background:
    linear-gradient(rgba(16, 41, 77, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 41, 77, 0.018) 1px, transparent 1px),
    #fff;
  background-size: 44px 44px;
}

.app-shell .reader-empty {
  min-height: calc(100vh - 116px);
  padding: 34px;
}

.reader-illustration {
  position: relative;
  width: 250px;
  height: 190px;
  margin-bottom: 12px;
}

.reader-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(185, 139, 46, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-a {
  width: 225px;
  height: 145px;
}

.orbit-b {
  width: 155px;
  height: 100px;
  border-color: rgba(16, 41, 77, 0.1);
}

.reader-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid #d9dfe8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 15px 35px rgba(6, 18, 38, 0.08);
}

.letter-back {
  width: 120px;
  height: 77px;
  transform: translate(-45%, -62%) rotate(7deg);
  opacity: 0.55;
}

.letter-front {
  width: 136px;
  height: 88px;
  display: grid;
  place-items: center;
  color: var(--mail-gold-dark);
  transform: translate(-55%, -42%) rotate(-3deg);
}

.letter-front::before,
.letter-front::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: #e7eaf0;
  transform-origin: center;
}

.letter-front::before {
  top: 42%;
  transform: rotate(27deg);
}

.letter-front::after {
  top: 42%;
  transform: rotate(-27deg);
}

.letter-front i {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid #eadbb8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mail-gold-soft);
}

.reader-route {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 139, 46, 0.62), transparent);
}

.route-a {
  top: 32%;
  right: 2%;
  width: 80px;
  transform: rotate(-17deg);
}

.route-b {
  left: 1%;
  bottom: 27%;
  width: 86px;
  transform: rotate(19deg);
}

.reader-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--mail-gold-dark);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(213, 173, 90, 0.07);
}

.reader-node-a {
  top: 28%;
  right: 7%;
}

.reader-node-b {
  left: 8%;
  bottom: 23%;
}

.app-shell .empty-kicker {
  color: var(--mail-gold-dark);
}

.app-shell .reader-empty h2 {
  color: var(--mail-navy-950);
  font-size: 19px;
}

.app-shell .reader-empty p {
  color: #7b8798;
}

.app-shell .reader-content {
  min-height: 100%;
  background: rgba(255, 255, 255, 0.9);
}

.app-shell .reader-body {
  padding: 27px 31px 38px;
}

.reader-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid #e7eaf0;
}

.app-shell .reader-document-mark {
  gap: 5px;
  border: 1px solid #eadbb8;
  background: var(--mail-gold-soft);
  color: #8a682d;
}

.app-shell .reader-subject {
  margin: 11px 0 0;
  color: var(--mail-navy-950);
  font-size: 22px;
}

.message-parties {
  padding: 14px;
  border: 1px solid #e2e6ed;
  border-radius: 11px;
  margin-top: 17px;
  background: #fafbfc;
}

.app-shell .sender-row {
  min-height: 50px;
  padding: 0 0 11px;
  border-bottom-color: #e5e8ee;
}

.app-shell .sender-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.party-label {
  display: block;
  margin-bottom: 2px;
  color: #929cab;
  font-size: 7px;
}

.app-shell .sender-details strong {
  color: var(--mail-navy-900);
}

.app-shell .reader-date {
  color: #7f8b9c;
}

.recipient-row {
  padding: 10px 51px 0 0;
}

.recipient-row strong {
  display: block;
  overflow: hidden;
  color: #536176;
  direction: ltr;
  text-align: right;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-document {
  margin-top: 17px;
  border: 1px solid #e2e6ed;
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 7px 20px rgba(6, 18, 38, 0.025);
}

.app-shell .mail-body {
  min-height: 230px;
  padding: 25px 27px;
  color: #344257;
  font-size: 11px;
}

.app-shell .attachments {
  margin-top: 17px;
  padding-top: 0;
  border: 1px solid #e2e6ed;
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
}

.attachments-heading {
  min-height: 45px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7eaf0;
  background: #fafbfc;
}

.attachments-heading h3 {
  margin: 0;
  color: var(--mail-navy-900);
}

.attachments-heading span {
  color: #8994a4;
  font-size: 7px;
}

.attachment-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-shell .attachment {
  max-width: none;
  border-color: #e1e5ec;
  background: #f9fafc;
  color: var(--mail-gold-dark);
}

.app-shell .reader-actions {
  margin-top: 16px;
}

.app-shell .secondary-button {
  border-color: #d8dee7;
  border-radius: 8px;
  color: var(--mail-navy-800);
}

.app-shell .secondary-button:hover {
  border-color: rgba(185, 139, 46, 0.45);
  background: var(--mail-gold-soft);
}

.composer {
  left: 22px;
  width: min(680px, calc(100vw - 44px));
  border-color: #cfd6e1;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 24px 70px rgba(6, 18, 38, 0.27);
}

.composer-header {
  min-height: 68px;
  padding-inline: 16px 12px;
  background:
    radial-gradient(circle at 10% 0, rgba(213, 173, 90, 0.15), transparent 30%),
    linear-gradient(135deg, #061226, #10294d);
}

.composer-emblem {
  width: 37px;
  height: 37px;
  border-color: rgba(213, 173, 90, 0.18);
  background: rgba(213, 173, 90, 0.09);
  color: #d5ad5a;
}

.composer-title small {
  color: rgba(213, 173, 90, 0.8);
}

.composer-title h2 {
  font-size: 13px;
}

.compose-context {
  min-height: 50px;
  padding: 8px 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #e6e9ef;
  background: #f8f9fb;
  color: var(--mail-gold-dark);
}

.compose-context strong,
.compose-context small {
  display: block;
}

.compose-context strong {
  color: var(--mail-navy-900);
  font-size: 9px;
}

.compose-context small {
  margin-top: 2px;
  color: #8994a4;
  font-size: 7px;
}

.compose-addresses {
  padding: 6px 18px 0;
}

.compose-field {
  min-height: 46px;
  grid-template-columns: 72px 1fr auto;
  border-bottom-color: #e7eaf0;
  color: #657287;
}

.compose-field input {
  color: var(--mail-navy-900);
}

.compose-field-disabled {
  opacity: 0.66;
}

.compose-field-disabled small {
  padding: 3px 7px;
  border-radius: 9px;
  background: #edf0f4;
  color: #7f8998;
  font-size: 6px;
}

.compose-editor {
  margin: 12px 18px 0;
  overflow: hidden;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
}

.editor-toolbar {
  min-height: 39px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #e7eaf0;
  background: #f8f9fb;
}

.editor-toolbar button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #7d899a;
  font-size: 9px;
}

.editor-toolbar > span {
  width: 1px;
  height: 18px;
  background: #dde2e9;
}

#composeBody {
  min-height: 205px;
  padding: 18px 20px;
  color: #344257;
}

.signature-preview {
  min-height: 58px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px dashed #dce1e8;
  background: #fcfcfd;
}

.signature-mark {
  width: 31px;
  height: 31px;
  border: 1px solid #eadbb8;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--mail-gold-soft);
  color: var(--mail-gold-dark);
  font-weight: 700;
}

.signature-preview strong,
.signature-preview small {
  display: block;
}

.signature-preview strong {
  color: var(--mail-navy-900);
  font-size: 8px;
}

.signature-preview small {
  margin-top: 3px;
  color: #909aaa;
  font-size: 7px;
}

.compose-attachments-disabled {
  min-height: 50px;
  margin: 10px 18px 0;
  padding: 8px 11px;
  border: 1px dashed #d8dee7;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fafbfc;
  color: #8a95a5;
}

.compose-attachments-disabled > span:first-child {
  color: var(--mail-gold-dark);
}

.compose-attachments-disabled div {
  flex: 1;
}

.compose-attachments-disabled strong,
.compose-attachments-disabled small {
  display: block;
}

.compose-attachments-disabled strong {
  color: #536176;
  font-size: 8px;
}

.compose-attachments-disabled small {
  margin-top: 2px;
  font-size: 7px;
}

.feature-badge {
  padding: 3px 7px;
  border-radius: 9px;
  background: #edf0f4;
  color: #737f90;
  font-size: 6px;
}

.compose-disclaimer {
  margin-top: 10px;
  border-top-color: #e7eaf0;
  background: #f8f9fb;
  color: #7c8798;
}

.compose-disclaimer > span:first-child {
  color: var(--mail-gold-dark);
}

.send-button {
  border-radius: 8px;
  background: linear-gradient(135deg, #10294d, #173761);
  box-shadow: 0 7px 18px rgba(16, 41, 77, 0.18);
}

.send-button:hover {
  background: linear-gradient(135deg, #0a1a33, #10294d);
}

@media (max-width: 1180px) {
  .app-shell .sidebar {
    width: 248px;
  }

  .app-shell .app-main {
    margin-right: 248px;
  }

  .folder-copy small {
    display: none;
  }

  .app-shell .folder-item {
    min-height: 47px;
  }

  .app-shell .workspace {
    grid-template-columns: minmax(350px, 0.82fr) minmax(430px, 1.18fr);
  }
}

@media (max-width: 920px) {
  .app-shell .sidebar {
    width: 270px;
  }

  .app-shell .app-main {
    margin-right: 0;
  }

  .app-shell .topbar-logo,
  .topbar-separator {
    display: none;
  }

  .app-shell .topbar-title {
    display: block;
  }

  .app-shell .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell .message-list {
    height: calc(100vh - 244px);
  }
}

@media (max-width: 640px) {
  .app-shell .topbar {
    height: 64px;
    padding-inline: 10px;
  }

  .app-shell .topbar-title,
  .app-shell .connection-badge {
    display: none;
  }

  .app-shell .workspace {
    min-height: calc(100vh - 64px);
    padding: 8px;
  }

  .app-shell .panel-heading {
    min-height: 76px;
  }

  .app-shell .message-card {
    grid-template-columns: 15px 36px minmax(0, 1fr) auto;
    min-height: 90px;
    padding-inline: 10px;
  }

  .app-shell .message-avatar {
    width: 36px;
    height: 36px;
  }

  .app-shell .reader-panel {
    inset: 64px 0 0;
  }

  .reader-illustration {
    width: 210px;
    transform: scale(0.88);
  }

  .app-shell .reader-body {
    padding: 20px 15px 30px;
  }

  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .composer {
    left: 0;
    width: 100%;
  }

  .compose-addresses,
  .compose-editor,
  .compose-attachments-disabled {
    margin-inline: 12px;
    padding-inline: 0;
  }

  .compose-addresses {
    margin: 0;
    padding-inline: 12px;
  }

.compose-field {
    grid-template-columns: 52px 1fr auto;
  }
}

/* Calendar-inspired light internal navigation */
.app-shell .sidebar {
  color: #162238;
  background:
    radial-gradient(circle at 0 100%, rgba(213, 173, 90, 0.08), transparent 30%),
    linear-gradient(180deg, #fffdf8, #f7f2e8);
  border-left: 1px solid #e8ddc7;
  box-shadow: -7px 0 28px rgba(74, 54, 22, 0.045);
}

.app-shell .sidebar::after {
  border-color: rgba(185, 139, 46, 0.06);
  box-shadow: 0 0 0 42px rgba(185, 139, 46, 0.018), 0 0 0 84px rgba(185, 139, 46, 0.012);
}

.app-shell .sidebar-brand {
  border-bottom-color: #e5ded1;
}

.app-shell .sidebar-brand img {
  filter: none;
  opacity: 1;
}

.app-shell .sidebar-brand div {
  border-right-color: #dfd2b8;
}

.app-shell .sidebar-brand strong {
  color: #0a1a33;
}

.app-shell .sidebar-brand small {
  color: #9a7739;
}

.app-shell .nav-label {
  color: #9b8a70;
}

.app-shell .nav-label i {
  background: linear-gradient(90deg, #e5d9c2, transparent);
}

.app-shell .folder-item {
  color: #667085;
}

.app-shell .folder-item:hover {
  color: #10294d;
  border-color: #e8dfce;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 5px 15px rgba(74, 54, 22, 0.035);
}

.app-shell .folder-item.active {
  color: #0a1a33;
  border-color: #e7d5b3;
  background: linear-gradient(90deg, #fff7e4, rgba(255, 255, 255, 0.8));
  box-shadow: inset -3px 0 #d5ad5a, 0 5px 15px rgba(74, 54, 22, 0.035);
}

.app-shell .folder-icon {
  color: #7a8799;
  border-color: #e2e4e8;
  background: rgba(255, 255, 255, 0.62);
}

.app-shell .folder-item.active .folder-icon {
  color: #a87d31;
  border-color: #e6d1aa;
  background: #fffaf0;
}

.folder-copy small {
  color: #9a9fa8;
}

.app-shell .folder-item:hover .folder-copy small,
.app-shell .folder-item.active .folder-copy small {
  color: #8a8172;
}

.app-shell .folder-item b {
  background: #eceef2;
  color: #697589;
}

.app-shell .folder-item.active b {
  background: #d5ad5a;
  color: #061226;
}

.app-shell .sidebar-bottom {
  border-top-color: #e5ded1;
}

.app-shell .sidebar-note {
  border-color: #e7d9bd;
  background: rgba(255, 255, 255, 0.62);
}

.app-shell .sidebar-note strong {
  color: #24334a;
}

.app-shell .sidebar-note p,
.app-shell .system-label {
  color: #8b8172;
}

.app-shell .workspace {
  background:
    radial-gradient(circle at 8% 100%, rgba(213, 173, 90, 0.045), transparent 24%),
    #f7f7f5;
}

/* Functional Wazin signature */
.signature-preview {
  position: relative;
  min-height: 136px;
  padding: 15px 16px 12px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: start;
  gap: 13px;
  border-top: 2px solid #b98b2e;
  background: #fff;
  direction: rtl;
}

.signature-preview img {
  width: 45px;
  height: 55px;
  object-fit: contain;
}

.signature-identity {
  min-width: 0;
}

.signature-identity strong,
.signature-identity small,
.signature-identity b,
.signature-identity span,
.signature-identity a {
  display: block;
}

.signature-identity strong {
  color: #0a1a33;
  font-size: 11px;
}

.signature-identity small {
  margin-top: 2px;
  color: #697589;
  font-size: 8px;
}

.signature-identity b {
  margin-top: 6px;
  color: #10294d;
  font-size: 8px;
}

.signature-identity span,
.signature-identity a {
  margin-top: 4px;
  color: #687487;
  direction: ltr;
  text-align: right;
  font-size: 7px;
  text-decoration: none;
}

.signature-identity a {
  color: #9b7431;
}

.signature-preview p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e7eaf0;
  color: #8b94a2;
  font-size: 6px;
  line-height: 1.75;
}

.signature-controls {
  min-height: 53px;
  margin: 10px 18px 0;
  padding: 8px 10px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafbfc;
}

.signature-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #10294d;
  font-size: 8px;
  font-weight: 600;
}

.signature-button:hover,
.signature-button.active {
  border-color: #d8bd86;
  background: #fff7e4;
  color: #8a682d;
}

.signature-button svg {
  width: 14px;
  height: 14px;
}

.signature-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #687487;
  font-size: 7px;
  cursor: pointer;
}

.signature-controls input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #10294d;
}

@media (max-width: 640px) {
  .signature-preview {
    padding: 12px;
    grid-template-columns: 42px 1fr;
  }

  .signature-preview img {
    width: 38px;
    height: 47px;
  }

  .signature-controls {
    margin-inline: 12px;
    align-items: stretch;
    flex-direction: column;
  }
}

/* Final internal interface refinements */
.app-shell {
  font-size: 15px;
}

.app-shell .sidebar-brand {
  min-height: 104px;
  padding: 14px 20px;
  justify-content: center;
}

.app-shell .sidebar-brand img {
  width: 152px;
  height: 72px;
  object-fit: contain;
  object-position: center;
}

.app-shell .compose-button {
  border-color: #d8c08d;
  background: linear-gradient(135deg, #d8bd82, #c8a65e);
  color: #10294d;
  box-shadow: 0 9px 22px rgba(83, 62, 24, 0.12);
}

.app-shell .compose-button:hover {
  border-color: #c7a65f;
  background: linear-gradient(135deg, #dfc994, #ceb06d);
  box-shadow: 0 11px 24px rgba(83, 62, 24, 0.16);
}

.app-shell .compose-button strong {
  color: #0a1a33;
  font-size: 13px;
  font-weight: 700;
}

.app-shell .compose-button small {
  color: #31415a;
  font-size: 9px;
  opacity: 0.9;
}

.app-shell .compose-button-icon {
  border-color: rgba(16, 41, 77, 0.22);
  background: rgba(255, 255, 255, 0.3);
  color: #10294d;
}

.app-shell .compose-button-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.app-shell .nav-label {
  font-size: 10px;
}

.app-shell .folder-copy strong {
  font-size: 12px;
}

.app-shell .folder-copy small {
  font-size: 8.5px;
}

.app-shell .sender {
  font-size: 12px;
}

.app-shell .subject {
  font-size: 13px;
}

.app-shell .preview {
  font-size: 10.5px;
  line-height: 1.55;
}

.app-shell .message-time {
  font-size: 9px;
}

@media (max-width: 1180px) {
  .app-shell .folder-copy strong {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .app-shell .sidebar-brand {
    min-height: 94px;
  }

  .app-shell .sidebar-brand img {
    width: 136px;
    height: 64px;
  }

  .app-shell .subject {
    font-size: 12px;
  }
}

/* Product identity and full workspace composer */
.app-shell .sidebar-brand {
  min-height: 94px;
  padding: 13px 20px;
  justify-content: flex-start;
  gap: 13px;
}

.app-shell .sidebar-brand img {
  width: 43px;
  height: 54px;
  object-fit: contain;
}

.app-shell .sidebar-brand div {
  padding-right: 13px;
  border-right: 1px solid #dfd2b8;
}

.app-shell .sidebar-brand strong,
.app-shell .sidebar-brand small {
  display: block;
}

.app-shell .sidebar-brand strong {
  color: #0a1a33;
  font-size: 17px;
  font-weight: 700;
}

.app-shell .sidebar-brand small {
  margin-top: 4px;
  color: #9a7739;
  font-size: 10px;
  letter-spacing: 0;
}

.app-shell .topbar {
  height: 84px;
  padding-inline: 28px;
  gap: 24px;
  border-bottom: 1px solid #e4e8ef;
  box-shadow: 0 6px 24px rgba(6, 18, 38, 0.055);
}

.app-shell .topbar-start {
  min-width: 220px;
}

.app-shell .topbar-logo {
  width: 88px;
  height: 54px;
}

.app-shell .topbar-title strong {
  font-size: 16px;
}

.app-shell .topbar-title span {
  margin-top: 4px;
  font-size: 10px;
}

.app-shell .search {
  width: min(560px, 38vw);
}

.app-shell .search input {
  height: 48px;
  padding-inline: 46px 62px;
  border-color: #d9dfe8;
  background: #fbfcfe;
  font-size: 12px;
  box-shadow: inset 0 1px 2px rgba(6, 18, 38, 0.025);
}

.app-shell .profile-button {
  min-height: 50px;
  padding-inline: 8px 13px;
}

.app-shell .profile-button > span:first-child {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.app-shell .profile-copy strong {
  font-size: 11px;
}

.app-shell .profile-copy small {
  font-size: 9px;
}

.app-shell .connection-badge {
  min-height: 36px;
  font-size: 9px;
}

.app-shell .workspace {
  min-height: calc(100vh - 84px);
}

.app-shell .folder-copy strong {
  font-size: 13px;
}

.app-shell .folder-copy small {
  font-size: 9px;
}

.app-shell .sender {
  font-size: 12.5px;
}

.app-shell .subject {
  font-size: 14px;
}

.app-shell .preview {
  font-size: 11px;
}

.app-shell .sender-details strong {
  font-size: 12px;
}

.app-shell .sender-details small,
.app-shell .recipient-row strong,
.app-shell .reader-date {
  font-size: 10px;
}

.app-shell .mail-body {
  font-size: 14px;
  line-height: 2;
}

.composer {
  position: fixed;
  z-index: 45;
  inset: 84px 270px 0 0;
  width: auto;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f6f7f9;
  box-shadow: none;
}

.composer-header {
  min-height: 76px;
  padding: 0 26px;
  border-bottom: 1px solid #dfe4ec;
  background:
    radial-gradient(circle at 10% 0, rgba(213, 173, 90, 0.11), transparent 30%),
    linear-gradient(135deg, #0a1a33, #173761);
}

.composer-title h2 {
  font-size: 18px;
}

.composer-title small {
  font-size: 9px;
}

.composer-window-actions {
  gap: 8px;
}

.compose-tool-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.compose-tool-button:hover {
  border-color: rgba(213, 173, 90, 0.45);
  background: rgba(213, 173, 90, 0.12);
}

.compose-tool-button svg {
  width: 15px;
  height: 15px;
}

.compose-tool-button.disabled-tool {
  color: rgba(255, 255, 255, 0.48);
  cursor: not-allowed;
}

.composer > form {
  height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 18px clamp(18px, 3vw, 46px) 28px;
}

.compose-context,
.compose-addresses,
.compose-editor,
.compose-preview,
.signature-controls,
.compose-attachments-disabled,
.compose-disclaimer,
.composer-footer {
  width: min(100%, 1080px);
  margin-inline: auto;
}

.compose-context {
  min-height: 58px;
  border: 1px solid #e1e5ec;
  border-radius: 12px 12px 0 0;
}

.compose-context strong {
  font-size: 11px;
}

.compose-context small {
  font-size: 9px;
}

.compose-addresses {
  padding: 8px 22px 0;
  border: 1px solid #e1e5ec;
  border-top: 0;
  background: #fff;
}

.compose-field {
  min-height: 52px;
  grid-template-columns: 82px 1fr auto;
  font-size: 12px;
}

.compose-field input {
  font-size: 13px;
}

.compose-editor {
  margin-top: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(6, 18, 38, 0.045);
}

#composeBody {
  min-height: 310px;
  padding: 24px 26px;
  font-size: 14px;
  line-height: 1.9;
}

.compose-preview {
  margin-top: 16px;
  padding: 28px 34px;
  border: 1px solid #dfe4eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(6, 18, 38, 0.045);
}

.compose-preview > header {
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e9ef;
}

.compose-preview > header span,
.compose-preview > header strong {
  display: block;
}

.compose-preview > header span {
  color: #9a7739;
  font-size: 10px;
}

.compose-preview > header strong {
  margin-top: 6px;
  color: #0a1a33;
  font-size: 22px;
}

.compose-preview dl {
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.compose-preview dl div {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
}

.compose-preview dt {
  color: #8994a4;
  font-size: 10px;
}

.compose-preview dd {
  margin: 0;
  color: #344257;
  font-size: 11px;
}

.compose-preview-body {
  min-height: 240px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eef0f3;
  color: #2f3f54;
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
}

.compose-preview-signature {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 2px solid #b98b2e;
  display: flex;
  gap: 14px;
}

.compose-preview-signature img {
  width: 46px;
  height: 56px;
  object-fit: contain;
}

.compose-preview-signature strong,
.compose-preview-signature span,
.compose-preview-signature b,
.compose-preview-signature small,
.compose-preview-signature a {
  display: block;
  margin-top: 3px;
}

.compose-preview-signature strong {
  margin-top: 0;
  color: #0a1a33;
  font-size: 13px;
}

.compose-preview-signature span,
.compose-preview-signature small {
  color: #687487;
  font-size: 9px;
}

.compose-preview-signature b {
  color: #10294d;
  font-size: 10px;
}

.compose-preview-signature a {
  color: #9a7739;
  font-size: 9px;
  text-decoration: none;
}

.signature-controls,
.compose-attachments-disabled {
  min-height: 62px;
  margin-top: 12px;
}

.signature-button,
.signature-controls label,
.compose-attachments-disabled strong {
  font-size: 10px;
}

.compose-attachments-disabled small {
  font-size: 9px;
}

.composer-footer {
  position: sticky;
  bottom: -28px;
  z-index: 2;
  margin-top: 14px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(246, 247, 249, 0), #f6f7f9 28%);
}

@media (max-width: 1180px) {
  .app-shell .topbar {
    padding-inline: 18px;
    gap: 14px;
  }

  .app-shell .topbar-start {
    min-width: auto;
  }

  .app-shell .search {
    width: min(420px, 34vw);
  }

  .composer {
    right: 248px;
  }
}

@media (max-width: 920px) {
  .composer {
    inset: 64px 0 0;
  }

  .composer-header {
    padding-inline: 14px;
  }

  .compose-tool-button > span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .composer-window-actions .disabled-tool {
    display: none;
  }

  .composer > form {
    height: calc(100vh - 132px);
    padding: 10px 10px 20px;
  }

  .compose-addresses {
    margin: 0 auto;
    padding-inline: 12px;
  }

  .compose-field {
    grid-template-columns: 58px 1fr;
  }

  .compose-preview {
    padding: 20px 16px;
  }
}

@media print {
  body.printing-compose > :not(.composer) {
    display: none !important;
  }

  body.printing-compose .composer {
    position: static;
    display: block !important;
    overflow: visible;
    background: #fff;
  }

  body.printing-compose .composer-header,
  body.printing-compose .compose-context,
  body.printing-compose .compose-addresses,
  body.printing-compose .compose-editor,
  body.printing-compose .signature-controls,
  body.printing-compose .compose-attachments-disabled,
  body.printing-compose .compose-disclaimer,
  body.printing-compose .composer-footer {
    display: none !important;
  }

  body.printing-compose .composer > form,
  body.printing-compose .compose-preview {
    height: auto;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }
}

/* Corrected header identity */
.app-shell .sidebar-brand {
  min-height: 94px;
  padding: 12px 20px;
  justify-content: center;
}

.app-shell .sidebar-brand img {
  width: 150px;
  height: 70px;
  object-fit: contain;
}

.app-shell .topbar-start {
  min-width: 44px;
}

.product-lockup {
  min-width: 172px;
  padding-right: 14px;
  border-right: 1px solid #e0e5ed;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-lockup img {
  width: 32px;
  height: 40px;
  object-fit: contain;
}

.product-lockup strong,
.product-lockup small {
  display: block;
}

.product-lockup strong {
  color: #0a1a33;
  font-size: 14px;
}

.product-lockup small {
  margin-top: 2px;
  color: #8a96a8;
  font-size: 9px;
}

.signature-settings-button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #dfe4ec;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: #526176;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.signature-settings-button:hover {
  border-color: #d8bd86;
  background: #fff8ea;
  color: #8a682d;
}

/* Reusable corporate signature */
.corporate-signature-card {
  overflow: hidden;
  border: 1px solid #d9dee7;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  background: #fff;
  color: #17233a;
  text-align: start;
}

.corporate-signature-mark {
  min-height: 154px;
  border-inline-end: 4px solid #b98b2e;
  display: grid;
  place-items: center;
  background: #10294d;
}

.corporate-signature-mark img {
  width: 52px;
  height: 64px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.corporate-signature-details {
  padding: 18px 21px;
}

.corporate-signature-details strong,
.corporate-signature-details span,
.corporate-signature-details b,
.corporate-signature-details small {
  display: block;
}

.corporate-signature-details strong {
  color: #0a1a33;
  font-size: 18px;
  line-height: 1.4;
}

.corporate-signature-details span {
  margin-top: 3px;
  color: #a1762d;
  font-size: 12px;
  font-weight: 700;
}

.corporate-signature-details b {
  margin-top: 10px;
  color: #10294d;
  font-size: 11px;
  line-height: 1.55;
}

.corporate-signature-details small {
  margin-top: 3px;
  color: #697589;
  font-size: 10px;
}

.corporate-signature-contact {
  margin-top: 10px;
  color: #596579;
  font-size: 10px;
  text-align: start;
}

.corporate-signature-contact a {
  color: #10294d;
  text-decoration: none;
}

.corporate-signature-contact i {
  width: 1px;
  height: 10px;
  margin: 0 8px;
  display: inline-block;
  background: #d5ad5a;
}

.corporate-signature-contact em {
  margin-top: 6px;
  display: block;
  color: #697589;
  font-style: normal;
}

.corporate-signature-card > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid #e5e9ef;
  background: #f7f8fa;
  color: #7c8798;
  font-size: 8px;
  line-height: 1.7;
}

.signature-preview {
  padding: 16px;
  display: block;
  border-top: 0;
  background: #f7f8fa;
}

.signature-preview .corporate-signature-card {
  max-width: 680px;
}

.compose-preview-signature {
  padding-top: 0;
  border-top: 0;
  display: block;
}

.compose-preview-signature .corporate-signature-card {
  max-width: 680px;
}

.compose-signature-language {
  padding-inline-start: 10px;
  border-inline-start: 1px solid #e0e5ec;
}

.compose-signature-language select {
  min-height: 32px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  background: #fff;
  color: #10294d;
  font: inherit;
  font-size: 9px;
}

/* Signature settings workspace */
.signature-settings {
  position: fixed;
  z-index: 48;
  inset: 84px 270px 0 0;
  overflow-y: auto;
  background: #f5f6f8;
}

.settings-header {
  min-height: 112px;
  padding: 20px clamp(20px, 3vw, 44px);
  border-bottom: 1px solid #dfe4ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    radial-gradient(circle at 8% 0, rgba(213, 173, 90, 0.12), transparent 30%),
    #fff;
}

.settings-header span {
  color: #a1762d;
  font-size: 10px;
  font-weight: 700;
}

.settings-header h2 {
  margin: 5px 0 3px;
  color: #0a1a33;
  font-size: 24px;
}

.settings-header p {
  margin: 0;
  color: #748094;
  font-size: 11px;
}

.signature-settings > form {
  padding: 22px clamp(18px, 3vw, 44px) 32px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(400px, 0.9fr);
  gap: 18px;
}

.settings-fields,
.settings-signature-preview {
  border: 1px solid #dfe4eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(6, 18, 38, 0.045);
}

.settings-fields {
  padding: 20px;
}

.settings-tabs {
  margin-bottom: 18px;
  display: flex;
  gap: 7px;
}

.settings-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #f8f9fb;
  color: #657287;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.settings-tabs button.active {
  border-color: #d8bd86;
  background: #fff7e4;
  color: #8a682d;
  font-weight: 700;
}

.signature-language-panel,
.signature-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.signature-language-panel label,
.signature-contact-grid label,
.signature-preferences > label {
  display: grid;
  gap: 7px;
  color: #536176;
  font-size: 10px;
  font-weight: 600;
}

.signature-language-panel .wide-field {
  grid-column: 1 / -1;
}

.signature-language-panel input,
.signature-language-panel textarea,
.signature-contact-grid input,
.signature-preferences select {
  width: 100%;
  border: 1px solid #dce1e8;
  border-radius: 9px;
  background: #fbfcfd;
  color: #17233a;
  font: inherit;
  font-size: 12px;
}

.signature-language-panel input,
.signature-contact-grid input,
.signature-preferences select {
  height: 43px;
  padding: 0 12px;
}

.signature-language-panel textarea {
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.7;
}

.signature-contact-grid {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8ebf0;
}

.signature-preferences {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  display: flex;
  align-items: end;
  gap: 20px;
  background: #f8f9fb;
}

.signature-preferences > label:first-child {
  width: 180px;
}

.settings-checkbox {
  min-height: 43px;
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}

.settings-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #10294d;
}

.settings-signature-preview {
  padding: 22px;
  align-self: start;
}

.preview-label {
  margin-bottom: 14px;
  display: block;
  color: #9a7739;
  font-size: 10px;
  font-weight: 700;
}

.settings-footer {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dfe4eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.settings-footer > span {
  margin-inline-start: auto;
  color: #8490a1;
  font-size: 9px;
}

@media (max-width: 1180px) {
  .signature-settings {
    right: 248px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .product-lockup {
    min-width: auto;
  }
}

@media (max-width: 920px) {
  .signature-settings {
    inset: 64px 0 0;
  }

  .signature-settings-button span:last-child,
  .product-lockup div {
    display: none;
  }

  .product-lockup {
    min-width: auto;
    padding-right: 8px;
  }
}

@media (max-width: 640px) {
  .signature-language-panel,
  .signature-contact-grid {
    grid-template-columns: 1fr;
  }

  .signature-language-panel .wide-field {
    grid-column: auto;
  }

  .signature-preferences,
  .settings-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .signature-preferences > label:first-child {
    width: auto;
  }

  .settings-footer > span {
    margin: 0;
  }

  .corporate-signature-card {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .corporate-signature-mark {
    min-height: 138px;
  }

  .corporate-signature-mark img {
    width: 42px;
    height: 52px;
  }

  .corporate-signature-details {
    padding: 14px;
  }
}
