/*
 * The Typekit service used to deliver this font or fonts for use on websites
 * is provided by Adobe and is subject to these Terms of Use
 * http://www.adobe.com/products/eulas/tou_typekit. For font license
 * information, see the list below.
 *
 * soleil:
 *   - http://typekit.com/eulas/00000000000000003b9aef83
 *   - http://typekit.com/eulas/00000000000000003b9aef84
 *   - http://typekit.com/eulas/00000000000000003b9aef7e
 *   - http://typekit.com/eulas/00000000000000003b9aef81
 *   - http://typekit.com/eulas/00000000000000003b9aef82
 *   - http://typekit.com/eulas/00000000000000003b9aef85
 *   - http://typekit.com/eulas/00000000000000003b9aef80
 *   - http://typekit.com/eulas/00000000000000003b9aef7f
 *
 * © 2009-2026 Adobe Systems Incorporated. All Rights Reserved.
 */
/*{"last_published":"2020-04-02 12:25:19 UTC"}*/

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/1f781f/00000000000000003b9aef83/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),
    url("https://use.typekit.net/af/1f781f/00000000000000003b9aef83/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),
    url("https://use.typekit.net/af/1f781f/00000000000000003b9aef83/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/04efed/00000000000000003b9aef84/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("woff2"),
    url("https://use.typekit.net/af/04efed/00000000000000003b9aef84/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("woff"),
    url("https://use.typekit.net/af/04efed/00000000000000003b9aef84/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 800;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/2e4bb3/00000000000000003b9aef7e/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),
    url("https://use.typekit.net/af/2e4bb3/00000000000000003b9aef7e/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),
    url("https://use.typekit.net/af/2e4bb3/00000000000000003b9aef7e/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/273d01/00000000000000003b9aef81/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff2"),
    url("https://use.typekit.net/af/273d01/00000000000000003b9aef81/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff"),
    url("https://use.typekit.net/af/273d01/00000000000000003b9aef81/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 600;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/b3dc26/00000000000000003b9aef82/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff2"),
    url("https://use.typekit.net/af/b3dc26/00000000000000003b9aef82/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff"),
    url("https://use.typekit.net/af/b3dc26/00000000000000003b9aef82/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 700;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/348702/00000000000000003b9aef85/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("woff2"),
    url("https://use.typekit.net/af/348702/00000000000000003b9aef85/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("woff"),
    url("https://use.typekit.net/af/348702/00000000000000003b9aef85/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 800;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/06618f/00000000000000003b9aef80/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff2"),
    url("https://use.typekit.net/af/06618f/00000000000000003b9aef80/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff"),
    url("https://use.typekit.net/af/06618f/00000000000000003b9aef80/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 600;
  font-stretch: normal;
}

@font-face {
  font-family: "soleil";
  src: url("https://use.typekit.net/af/3b8a7f/00000000000000003b9aef7f/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),
    url("https://use.typekit.net/af/3b8a7f/00000000000000003b9aef7f/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),
    url("https://use.typekit.net/af/3b8a7f/00000000000000003b9aef7f/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 400;
  font-stretch: normal;
}

.tk-soleil {
  font-family: "soleil", sans-serif;
}

/*
 * The Typekit service used to deliver this font or fonts for use on websites
 * is provided by Adobe and is subject to these Terms of Use
 * http://www.adobe.com/products/eulas/tou_typekit. For font license
 * information, see the list below.
 *
 * proxima-nova:
 *   - http://typekit.com/eulas/00000000000000003b9b3068
 *   - http://typekit.com/eulas/00000000000000003b9b3069
 *   - http://typekit.com/eulas/00000000000000003b9b306a
 *   - http://typekit.com/eulas/00000000000000003b9b306b
 *   - http://typekit.com/eulas/00000000000000003b9b3066
 *   - http://typekit.com/eulas/00000000000000003b9b3067
 *   - http://typekit.com/eulas/00000000000000003b9b3062
 *   - http://typekit.com/eulas/00000000000000003b9b3063
 *
 * © 2009-2026 Adobe Systems Incorporated. All Rights Reserved.
 */
/*{"last_published":"2020-04-02 10:13:12 UTC"}*/

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/949f99/00000000000000003b9b3068/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),
    url("https://use.typekit.net/af/949f99/00000000000000003b9b3068/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),
    url("https://use.typekit.net/af/949f99/00000000000000003b9b3068/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/4c4052/00000000000000003b9b3069/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff2"),
    url("https://use.typekit.net/af/4c4052/00000000000000003b9b3069/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("woff"),
    url("https://use.typekit.net/af/4c4052/00000000000000003b9b3069/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i7&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 700;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/d82519/00000000000000003b9b306a/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("woff2"),
    url("https://use.typekit.net/af/d82519/00000000000000003b9b306a/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("woff"),
    url("https://use.typekit.net/af/d82519/00000000000000003b9b306a/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n8&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 800;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/3e6df8/00000000000000003b9b306b/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("woff2"),
    url("https://use.typekit.net/af/3e6df8/00000000000000003b9b306b/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("woff"),
    url("https://use.typekit.net/af/3e6df8/00000000000000003b9b306b/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i8&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 800;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/576d53/00000000000000003b9b3066/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff2"),
    url("https://use.typekit.net/af/576d53/00000000000000003b9b3066/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff"),
    url("https://use.typekit.net/af/576d53/00000000000000003b9b3066/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 600;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/f7d492/00000000000000003b9b3067/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff2"),
    url("https://use.typekit.net/af/f7d492/00000000000000003b9b3067/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff"),
    url("https://use.typekit.net/af/f7d492/00000000000000003b9b3067/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 600;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/705e94/00000000000000003b9b3062/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),
    url("https://use.typekit.net/af/705e94/00000000000000003b9b3062/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),
    url("https://use.typekit.net/af/705e94/00000000000000003b9b3062/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
  font-display: auto;
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
}

@font-face {
  font-family: "proxima-nova";
  src: url("https://use.typekit.net/af/5c70f2/00000000000000003b9b3063/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),
    url("https://use.typekit.net/af/5c70f2/00000000000000003b9b3063/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),
    url("https://use.typekit.net/af/5c70f2/00000000000000003b9b3063/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
  font-display: auto;
  font-style: italic;
  font-weight: 400;
  font-stretch: normal;
}

.tk-proxima-nova {
  font-family: "proxima-nova", sans-serif;
}

:root {
  /* Brand tokens (matched to evodev.uk Payhip theme: whitePrimary) */
  --bg: #ffffff;
  --card: #ffffff;
  --surface: #f6f8fc;

  --accent: #3484ff;
  --accent-hover: #1f57af;

  --text: #4d4d4d;
  --text-strong: #1f3550;
  --muted: #6b7280;

  --border: #dddddd;
  --border-soft: #eeeeee;
  --shadow: rgba(0, 0, 0, 0.08);
  --focus: rgba(52, 132, 255, 0.35);

  --success: #55bc75;
  --warning: #ffb828;
  --danger: #fc576b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "soleil", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.embedded {
  background: transparent;
  min-height: auto;
  height: 100%;
  overflow: hidden;
}

html.embedded-mode {
  height: 100%;
}

body.embedded .site-header,
body.embedded .site-footer {
  display: none;
}

body.embedded .site-main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  height: 100%;
}

body.embedded .shell-page {
  gap: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body.embedded .card {
  margin-bottom: 0;
}

body.embedded .ticket-header-shell,
body.embedded .staff-ticket-toolbar,
body.embedded .ticket-back-link,
body.embedded .conversation-title {
  display: none !important;
}

body.embedded .shell-page {
  padding: 10px;
}

body.embedded .conversation-card {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

body.embedded .thread {
  border: 0;
  background: transparent;
  padding: 2px 0 4px;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

body.embedded .message {
  max-width: 84%;
  border-radius: 18px;
  border-color: #d8e5f7;
  box-shadow: 0 8px 18px rgba(20, 38, 66, 0.08);
  padding: 10px 12px;
}

body.embedded .message-user {
  margin-right: auto;
  background: #ffffff;
}

body.embedded .message-staff {
  margin-left: auto;
  background: linear-gradient(180deg, #3d7cda 0%, #2f6fd0 100%);
  border-color: #2f6fd0;
}

body.embedded .message .message-avatar,
body.embedded .message .role-pill {
  display: none;
}

body.embedded .message .author-name {
  font-size: 11px;
  color: #6f84a2;
  font-weight: 700;
}

body.embedded .message .message-meta {
  margin-bottom: 4px;
}

body.embedded .message .message-time {
  font-size: 11px;
  color: #7d91ad;
  font-weight: 600;
}

body.embedded .message-user .message-meta {
  justify-content: flex-start;
}

body.embedded .message-staff .message-meta {
  justify-content: flex-end;
}

body.embedded .message-staff .author-name,
body.embedded .message-staff .message-time,
body.embedded .message-staff .message-body,
body.embedded .message-staff .attachments a {
  color: #ffffff;
}

body.embedded .reply-card {
  border-radius: 14px;
  padding: 8px 10px;
  flex: 0 0 auto;
  border-color: #d8e5f7;
  box-shadow: 0 8px 14px rgba(20, 38, 66, 0.08);
  background: #fafdff;
}

body.embedded .reply-title {
  display: none;
}

body.embedded .reply-form textarea {
  min-height: 88px;
  max-height: 126px;
  border-radius: 14px;
  border-color: #c9daf3;
  background: #ffffff;
}

.attachment-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attachment-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #b9cff0;
  background: #f4f8ff;
  color: #2f6fd0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.attachment-icon-btn:hover {
  background: #eaf2ff;
  border-color: #8fb2e6;
  color: #245fbb;
}

.attachment-icon-btn svg {
  width: 18px;
  height: 18px;
}

.attachment-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-file-name {
  font-size: 0.92rem;
  color: #5f7391;
}

body.embedded .reply-submit {
  min-height: 38px;
  padding: 8px 24px;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.72;
  transform: scale(0.96);
  transition: opacity 120ms ease, transform 120ms ease;
}

body.embedded .reply-form.has-draft .reply-submit {
  opacity: 1;
  transform: scale(1);
}

/* Prevent auth-gated UI flash before /api/me resolves.
   ui.js sets html.auth-ready once it has applied the correct visibility. */
html:not(.auth-ready) [data-auth]:not([data-auth="guest"]) {
  display: none;
}

select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25;
}

select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-strong);
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--focus);
}

select:disabled,
input[type="text"]:disabled,
input[type="number"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Cleaner dropdowns for inline selects (status/assign) */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%231F3550%22%20d%3D%22M7%2010l5%205l5-5z%22/%3E%3C/svg%3E");
}

select:disabled {
  background-image: none;
}

h1,
h2,
h3,
h4 {
  font-family: "soleil", sans-serif;
  font-weight: 700;
  font-style: normal;
  text-transform: none;
  line-height: 1.4em;
  letter-spacing: 0;
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.6rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6vw;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand a {
  font-family: "proxima-nova", "soleil", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-strong);
}

.site-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.site-nav a:not(.btn) {
  font-family: "soleil", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--accent);
}

.site-nav a:not(.btn):hover {
  color: var(--accent-hover);
}

.site-main {
  padding: 32px 6vw 48px;
  flex: 1 0 auto;
}

.shell-page {
  background:
    radial-gradient(900px 330px at 8% 0%, rgba(57, 123, 225, 0.1), transparent 67%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 320px);
}

.page-admin .site-main {
  padding-top: 18px;
  padding-bottom: 24px;
}

.site-footer {
  padding: 20px 6vw 32px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn {
  background: #2f6fd0;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid #2f6fd0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease,
    transform 140ms ease, box-shadow 140ms ease;
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn:hover {
  background: #ffffff;
  color: #2f6fd0;
  border-color: #2f6fd0;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem var(--focus);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.25);
  pointer-events: none;
  transform: none;
}

.btn.secondary {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.secondary:hover {
  background: #ffffff;
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.success {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.btn.success:hover {
  background: #ffffff;
  border-color: var(--success);
  color: var(--success);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.btn.danger:hover {
  background: #ffffff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn.warning {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--text-strong);
}

.btn.warning:hover {
  background: #ffffff;
  border-color: var(--warning);
  color: var(--warning);
}

.btn.secondary.success {
  background: #ffffff;
  border-color: var(--success);
  color: var(--success);
}

.btn.secondary.success:hover {
  background: #ffffff;
  border-color: var(--success);
  color: var(--success);
}

.btn.secondary.danger {
  background: #ffffff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn.secondary.danger:hover {
  background: #ffffff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn.secondary.warning {
  background: #ffffff;
  border-color: var(--warning);
  color: var(--text-strong);
}

.btn.secondary.warning:hover {
  background: #ffffff;
  border-color: var(--warning);
  color: var(--warning);
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f7592;
}

.hero-text h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow);
}

.home-page {
  background:
    radial-gradient(900px 320px at 5% 0%, rgba(57, 123, 225, 0.12), transparent 68%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 300px);
  padding-top: 26px;
  padding-bottom: 28px;
}

.hero-brand {
  position: relative;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid #dce7f8;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 18px 40px rgba(16, 44, 95, 0.1);
  color: var(--text-strong);
  overflow: hidden;
}

.hero-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #2a63c2 0%, #4c8eff 100%);
}

.hero-brand::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -44px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(76, 142, 255, 0.2), rgba(76, 142, 255, 0));
}

.hero-brand .hero-kicker {
  color: #3b5f95;
}

.hero-brand .hero-text {
  position: relative;
  z-index: 1;
}

.hero-brand .hero-text h1 {
  color: #1f3550;
}

.hero-brand .hero-text p {
  color: #4e6281;
}

.hero-brand .btn {
  background: #2a63c2;
  color: #ffffff;
  border-color: #2a63c2;
}

.hero-brand .btn:hover {
  background: #ffffff;
  color: #2a63c2;
  border-color: #2a63c2;
}

.hero-brand .hero-card {
  position: relative;
  z-index: 1;
  border: 1px solid #d7e5fb;
  background: #f2f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-brand .hero-card h3,
.hero-brand .hero-card li {
  color: #29466d;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px var(--shadow);
}

.card.compact {
  padding: 16px;
  margin-bottom: 16px;
}

.card-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-admin .page-header {
  margin-bottom: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
}

.table.compact th,
.table.compact td {
  padding: 8px 6px;
}

.admin-nav {
  margin-bottom: 16px;
}

.admin-puzzle {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  /* Make cards in the same grid row share the same height. */
  align-items: stretch;
}

.admin-puzzle > .card {
  margin: 0;
}

.page-admin .admin-puzzle > .card {
  display: flex;
  flex-direction: column;
}

.admin-metrics {
  grid-column: span 4;
}

.admin-panels-card {
  grid-column: span 8;
}

.admin-staff-card {
  grid-column: span 4;
}

@media (max-width: 1100px) {
  .admin-metrics {
    grid-column: span 6;
  }
  .admin-panels-card {
    grid-column: span 12;
  }
  .admin-staff-card {
    grid-column: span 12;
  }
}

@media (max-width: 740px) {
  .admin-puzzle {
    grid-template-columns: 1fr;
  }
  .admin-metrics,
  .admin-panels-card,
  .admin-staff-card {
    grid-column: auto;
  }
}

/* For shorter laptop viewports, squeeze spacing a bit more. */
@media (max-height: 820px) {
  .page-admin .site-main {
    padding-top: 14px;
    padding-bottom: 18px;
  }
  .page-admin .page-header {
    margin-bottom: 10px;
  }
  .card.compact {
    padding: 14px;
    margin-bottom: 14px;
  }
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent-hover);
  background: rgba(52, 132, 255, 0.08);
}

.pill.warning {
  background: var(--warning);
  border-color: var(--warning);
  color: var(--text-strong);
  font-weight: 800;
}

.pill.status-open {
  background: rgba(85, 188, 117, 0.14);
  border-color: rgba(85, 188, 117, 0.36);
  color: #1f7d3d;
}

.pill.status-awaiting {
  background: rgba(52, 132, 255, 0.14);
  border-color: rgba(52, 132, 255, 0.32);
  color: #1f57af;
}

.pill.status-closed {
  background: rgba(107, 114, 128, 0.15);
  border-color: rgba(107, 114, 128, 0.34);
  color: #475569;
}

.tickets-page {
  background:
    radial-gradient(900px 340px at 12% 0%, rgba(57, 123, 225, 0.12), transparent 66%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 320px);
}

.header-shell {
  border: 1px solid #d9e4f6;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 14px 30px rgba(17, 42, 89, 0.07);
}

.page-header.header-shell h1 {
  margin-bottom: 8px;
}

.page-header.header-shell p {
  margin: 0;
  color: #607590;
}

.tickets-header {
  margin-bottom: 16px;
}

.tickets-header h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  color: var(--text-strong);
}

.tickets-header p {
  margin: 0;
  font-size: 1.12rem;
  color: #607590;
}

.ticket-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.embed-chat-hub h2 {
  margin: 0 0 6px;
  color: #1f3550;
  font-size: 1.2rem;
}

.embed-chat-hub p {
  margin: 0;
  color: #607590;
}

.embed-chat-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.embedded .tickets-header {
  display: none;
}

body.embedded .tickets-page {
  background: transparent;
  display: grid;
  gap: 10px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #dce7f8;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 18px rgba(20, 38, 66, 0.06);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(77, 121, 191, 0.85), rgba(126, 163, 221, 0.85));
}

.summary-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.summary-value {
  display: block;
  font-size: 1.6rem;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.ticket-table-card {
  background: #ffffff;
  border-color: #dce7f8;
  box-shadow: 0 14px 28px rgba(20, 38, 66, 0.08);
}

body.embedded .embed-chat-hub {
  border-radius: 0 0 20px 20px;
  border: 0;
  border-bottom: 1px solid #d7e4f8;
  box-shadow: none;
  background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%);
  padding: 16px;
}

body.embedded .embed-chat-hub h2 {
  margin-bottom: 4px;
  font-size: 1.3rem;
}

body.embedded .embed-chat-hub p {
  font-size: 0.98rem;
  color: #5f7391;
}

body.embedded .embed-chat-actions {
  margin-top: 12px;
}

body.embedded .embed-chat-actions .btn {
  min-width: 124px;
}

body.embedded .ticket-summary {
  display: none !important;
}

body.embedded .ticket-table-card {
  margin: 0 10px 10px;
  padding: 10px;
  border-radius: 16px;
  border-color: #d9e5f8;
  box-shadow: 0 10px 24px rgba(20, 44, 88, 0.12);
  background: #ffffff;
}

body.embedded .ticket-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

body.embedded .ticket-table thead {
  display: none;
}

body.embedded .ticket-table tr {
  display: block;
  border: 1px solid #d8e5f7;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
}

body.embedded .ticket-table tr.ticket-row-empty {
  border-style: dashed;
  background: #f8fbff;
}

body.embedded .ticket-table tr.ticket-row-empty td {
  justify-content: flex-start;
  font-size: 0.95rem;
  color: #5e7190;
}

body.embedded .ticket-table td {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  padding: 4px 0;
}

body.embedded .ticket-table td::before {
  content: attr(data-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f82a0;
  font-weight: 700;
  flex: 0 0 auto;
}

body.embedded .ticket-table .ticket-id-cell {
  padding-top: 0;
}

body.embedded .ticket-table .ticket-id-cell::before {
  display: none;
}

body.embedded .ticket-id-link {
  font-size: 1rem;
  font-weight: 800;
}

body.embedded .ticket-table .ticket-view-btn {
  min-height: 34px;
  padding: 6px 14px;
}

body.embedded .embed-history-list {
  display: grid;
  gap: 8px;
}

body.embedded .embed-thread {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #d8e5f7;
  border-radius: 14px;
  padding: 10px 12px;
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 8px 14px rgba(18, 41, 84, 0.06);
}

body.embedded .embed-thread:hover {
  border-color: #b7cdef;
  background: #f9fbff;
}

body.embedded .embed-thread-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3f7de1, #2f6fd0);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

body.embedded .embed-thread-body {
  min-width: 0;
}

body.embedded .embed-thread-top,
body.embedded .embed-thread-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.embedded .embed-thread-title {
  color: #1f3550;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.embedded .embed-thread-time {
  color: #7286a4;
  font-size: 0.78rem;
  white-space: nowrap;
}

body.embedded .embed-thread-bottom {
  margin-top: 4px;
}

body.embedded .embed-thread-id {
  color: #5f7596;
  font-size: 0.8rem;
  font-weight: 700;
}

body.embedded .embed-history-empty {
  border: 1px dashed #bfd1ec;
  border-radius: 12px;
  padding: 14px;
  color: #647a98;
  font-size: 0.95rem;
  background: #f8fbff;
}

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

.ticket-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 800;
  padding-top: 4px;
  padding-bottom: 12px;
}

.ticket-table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.ticket-table tbody tr {
  transition: background-color 150ms ease;
}

.ticket-table tbody tr:hover {
  background: rgba(52, 132, 255, 0.07);
}

.ticket-id-cell {
  width: 170px;
}

.ticket-id-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  color: #2a466a;
}

.ticket-subject-cell {
  color: #2f3f52;
  font-weight: 600;
}

.ticket-updated-cell {
  color: #475569;
}

.ticket-view-btn {
  min-width: 78px;
  justify-content: center;
}

.ticket-header-shell {
  margin-bottom: 16px;
}

.ticket-header-shell .meta.ticket-meta-chip {
  padding: 8px 12px;
  border: 1px solid #d6e1f4;
  border-radius: 999px;
  background: #f4f8ff;
  color: #4a6283;
  font-weight: 700;
}

.ticket-row-empty td {
  text-align: center;
  color: #64748b;
  padding: 22px 10px;
  font-style: italic;
}

.unread-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(252, 87, 107, 0.18);
  margin-right: 8px;
  vertical-align: middle;
}

.form {
  display: grid;
  gap: 12px;
}

.form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--text-strong);
}

.label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.form label .muted {
  font-weight: 400;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  /* inherits global control styling */
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--focus);
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(77, 77, 77, 0.7);
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  position: relative;
}

.switch input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch .switch-track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(77, 77, 77, 0.18);
  position: relative;
  flex: 0 0 auto;
  transition: background 140ms ease, border-color 140ms ease;
}

.switch .switch-track::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: left 140ms ease;
}

.switch input[type="checkbox"]:checked + .switch-track {
  background: rgba(52, 132, 255, 0.85);
  border-color: rgba(52, 132, 255, 0.95);
}

.switch input[type="checkbox"]:checked + .switch-track::after {
  left: 23px;
}

.switch:focus-within {
  border-color: rgba(52, 132, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(52, 132, 255, 0.12);
}

.switch.switch-compact {
  padding: 0;
  border: none;
  background: transparent;
  justify-content: center;
}

.switch.switch-compact:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(52, 132, 255, 0.12);
}

.status-grid-header,
.status-grid-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.2fr)
    minmax(160px, 1fr)
    110px
    110px
    90px
    120px;
  gap: 10px;
  align-items: center;
}

.status-grid-header {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.status-grid-row {
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .status-grid-header {
    display: none;
  }
  .status-grid-row {
    grid-template-columns: 1fr;
  }
  .status-grid-row .switch.switch-compact {
    justify-content: flex-start;
  }
}

.role-form {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.role-form.role-form-new {
  grid-template-columns: 1fr 220px;
}

.role-list-header {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.role-form.role-form-new + .role-list-header {
  margin-top: 14px;
}

.role-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-arrows {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.btn.tiny {
  font-size: 12px;
  line-height: 1;
  padding: 0;
  width: 38px;
  height: 18px;
  border-radius: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.role-main input[type="text"] {
  width: 280px;
  max-width: 100%;
}

.role-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  align-items: center;
}

.role-color-row {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.role-actions .btn {
  white-space: nowrap;
  width: 100%;
}

.color-block {
  display: grid;
  gap: 6px;
  align-content: start;
}

.color-block-title {
  font-weight: 800;
  color: var(--text-strong);
  font-size: 13px;
}

.color-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.color-tools input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 0;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
}

.color-tools [data-color-hex] {
  width: 96px;
}

.rgb-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rgb-row input[type="number"] {
  width: 58px;
  padding: 10px 10px;
}

.is-invalid {
  border-color: rgba(252, 87, 107, 0.9) !important;
  box-shadow: 0 0 0 0.2rem rgba(252, 87, 107, 0.18) !important;
}

@media (max-width: 860px) {
  .role-form {
    grid-template-columns: 1fr;
  }
  .role-list-header {
    display: none;
  }
  .role-main {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .role-actions {
    grid-template-columns: 1fr 1fr;
  }

  .ticket-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tickets-header h1 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .hero-brand {
    padding: 22px;
  }
}

.inline {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-right: 12px;
  margin-bottom: 8px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.inline-form .role-pill,
.inline-form .pill {
  justify-self: start;
}

.ticket-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ticket-controls-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.ticket-controls-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-ticket-toolbar {
  border-color: #d9e6fb;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  padding: 10px 16px;
}

.staff-ticket-toolbar .ticket-controls .btn.secondary.small {
  color: #355073;
  border-color: #bfd3f1;
  background: #f7fbff;
}

.staff-ticket-toolbar .ticket-controls .btn.secondary.small:hover {
  background: #edf4ff;
}

.ticket-back-link {
  font-size: 11px;
  font-weight: 600;
  color: #8d9eb7;
  text-decoration: none;
  padding: 0;
  border-bottom: 1px solid transparent;
  opacity: 0.62;
}

.ticket-back-link:hover {
  color: #6f86a7;
  border-bottom-color: rgba(111, 134, 167, 0.35);
  opacity: 1;
}

.ticket-controls-side {
  padding-left: 0;
  border-left: 0;
  line-height: 1;
}

@media (max-width: 860px) {
  .ticket-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-controls-main,
  .ticket-controls-side {
    width: 100%;
  }

  .ticket-controls-side {
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
  }
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters select {
  min-width: 220px;
}

.permissions-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.subheading {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.list-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.list-header-row > span {
  min-width: 120px;
}

/* Admin Staff list alignment */
.staff-list-header {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(120px, 1fr) minmax(280px, 1.4fr);
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.staff-list-header > div:last-child {
  justify-self: end;
  width: 200px;
  text-align: center;
}

.staff-list-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(120px, 1fr) minmax(280px, 1.4fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.panel-list-header {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(240px, 2.4fr) 120px 160px 160px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.panel-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(240px, 2.4fr) 120px 160px 160px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.panel-list-row input[type="text"],
.panel-list-row input[type="number"] {
  margin: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.staff-list-row .row-actions {
  justify-content: flex-end;
}

.row-actions .stack-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.staff-list-row .row-actions .stack-actions {
  width: 200px;
}

.row-actions .stack-actions .btn {
  width: 100%;
  justify-content: center;
}

.divider {
  height: 1px;
  width: 100%;
  background: var(--border-soft);
}

@media (max-width: 860px) {
  .staff-list-header {
    display: none;
  }
  .staff-list-row {
    grid-template-columns: 1fr;
  }
  .panel-list-header {
    display: none;
  }
  .panel-list-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .list-header-row {
    display: none;
  }
}

.hint-icon {
  --hint-bg: #ffffff;
  --hint-border: var(--border);
  --hint-text: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--hint-border);
  background: var(--hint-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  position: relative;
  user-select: none;
}

.hint-icon::before {
  content: "i";
}

.hint-icon:hover,
.hint-icon:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.hint-icon:hover::after,
.hint-icon:focus-visible::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, 70vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--hint-text);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  z-index: 50;
  white-space: normal;
  text-align: left;
  font-size: 13px;
}

.hint-icon:hover::before,
.hint-icon:focus-visible::before {
  /* keep the icon visible above tooltip */
  position: relative;
  z-index: 51;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.perm-option {
  text-align: left;
}

.perm-option.role-colored {
  border-color: var(--role-bg);
  color: var(--role-bg);
  background: transparent;
}

.perm-option.role-colored.is-active {
  background: var(--role-bg);
  border-color: var(--role-bg);
  color: var(--role-text);
}

.thread {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
}

.conversation-card {
  border-color: #d5e3f7;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.conversation-title {
  margin: 0 0 12px;
  color: #2a4468;
}

.message {
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #c8daf6;
  box-shadow: 0 10px 24px rgba(20, 38, 66, 0.08);
}

.conversation-card .thread {
  gap: 10px;
}

.conversation-card .message {
  max-width: min(760px, 78%);
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(20, 38, 66, 0.08);
}

.conversation-card .message-user {
  margin-right: auto;
  background: #ffffff;
  border-color: #d8e4f7;
}

.conversation-card .message-staff {
  margin-left: auto;
  background: linear-gradient(180deg, #3d7cda 0%, #2f6fd0 100%);
  border-color: #2f6fd0;
}

.conversation-card .message-staff .author-name,
.conversation-card .message-staff .message-time,
.conversation-card .message-staff .message-body,
.conversation-card .message-staff .read-receipt {
  color: #ffffff;
}

.conversation-card .message-staff .read-receipt {
  opacity: 0.84;
}

.conversation-card .message-staff .role-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.conversation-card .message-staff .attachments a {
  color: #e8f1ff;
}

.conversation-card .message .message-avatar {
  width: 26px;
  height: 26px;
}

.conversation-card .message .role-pill {
  display: none;
}

@media (max-width: 860px) {
  .conversation-card .message {
    max-width: 100%;
  }
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.message-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #ffffff;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.author-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-strong);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  /* Avoid stretching when used inside grid layouts (e.g. admin staff list). */
  justify-self: start;
  width: fit-content;
}

.role-pill-button {
  appearance: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.role-pill-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(52, 132, 255, 0.12);
}

.role-admin {
  background: rgba(52, 132, 255, 0.12);
  color: var(--accent);
  border-color: rgba(52, 132, 255, 0.35);
}

.role-staff {
  background: rgba(85, 188, 117, 0.14);
  color: var(--success);
  border-color: rgba(85, 188, 117, 0.4);
}

.role-user {
  background: rgba(159, 178, 195, 0.15);
  color: var(--muted);
  border-color: var(--border);
}

.message-time {
  font-size: 12px;
  color: #6a7c95;
  font-weight: 600;
}

.message-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text);
}

.read-receipt {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.reply-card {
  border-color: #dce7f8;
  background: #fbfdff;
  box-shadow: none;
  padding: 18px 20px;
}

.reply-title {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2c4468;
}

.reply-form textarea {
  min-height: 90px;
  resize: vertical;
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
}

.reply-submit {
  min-width: 130px;
  justify-content: center;
  background: #3e75cf;
  border-color: #3e75cf;
}

.reply-submit:hover {
  background: #3264b6;
  border-color: #3264b6;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tile {
  padding: 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  font-weight: 600;
}

.staff-page {
  background:
    radial-gradient(900px 330px at 8% 0%, rgba(57, 123, 225, 0.1), transparent 67%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 320px);
}

.admin-page {
  background:
    radial-gradient(900px 330px at 8% 0%, rgba(57, 123, 225, 0.1), transparent 67%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 320px);
}

.admin-header-shell {
  margin-bottom: 16px;
}

.admin-header-shell h1 {
  margin-bottom: 8px;
}

.admin-header-shell p {
  margin: 0;
  color: #607590;
  font-size: 1.08rem;
}

.admin-actions-grid {
  border-color: #d9e4f6;
  background: transparent;
  box-shadow: none;
  margin-bottom: 18px;
  padding: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-actions-grid .tile {
  border: 1px solid #d5e2f7;
  background: #ffffff;
  color: #2b4568;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(20, 38, 66, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-actions-grid .tile:hover {
  transform: translateY(-2px);
  border-color: #6f9de4;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: 0 18px 30px rgba(20, 38, 66, 0.12);
}

.admin-actions-grid .tile:hover .tile-arrow {
  transform: translateX(4px);
  border-color: #6f9de4;
}

.staff-hero {
  margin-bottom: 14px;
}

.staff-hero-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.staff-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-title {
  margin: 0 0 10px;
  color: var(--text-strong);
}

.welcome-sub {
  margin: 0;
  color: #607590;
  font-size: 1.08rem;
}

.staff-actions-grid {
  margin-bottom: 18px;
  padding: 14px;
  border-color: #d9e4f6;
  background: transparent;
  box-shadow: none;
}

.staff-actions-grid .tile {
  border: 1px solid #d5e2f7;
  background: #ffffff;
  color: #2b4568;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(20, 38, 66, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.staff-actions-grid .tile:hover {
  transform: translateY(-2px);
  border-color: #6f9de4;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  box-shadow: 0 18px 30px rgba(20, 38, 66, 0.12);
}

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tile-title {
  font-size: 1.36rem;
  font-weight: 800;
  line-height: 1.2;
}

.tile-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #c2d8f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #356dc8;
  transition: transform 140ms ease, border-color 140ms ease;
}

.staff-actions-grid .tile:hover .tile-arrow {
  transform: translateX(4px);
  border-color: #6f9de4;
}

.tile-sub {
  font-size: 0.96rem;
  color: #607590;
  font-weight: 600;
}

.staff-month-header {
  margin-top: 4px;
  margin-bottom: 14px;
  padding-top: 8px;
  border-top: 1px solid #e8eef9;
}

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

.staff-month-title h3 {
  margin: 0;
}

.staff-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.staff-stats-grid .card {
  border-color: #d9e4f6;
  box-shadow: 0 12px 24px rgba(16, 44, 95, 0.07);
}

.staff-card-title {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2c4468;
}

.staff-earnings-row {
  margin-top: 10px;
}

.staff-earnings-primary {
  margin-top: 0;
  margin-bottom: 8px;
}

.staff-pay-rate {
  font-weight: 800;
  font-size: 17px;
  color: #4b5f7d;
}

.staff-earnings-total {
  font-weight: 900;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #20457a;
}

@media (max-width: 980px) {
  .staff-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .tile-title {
    font-size: 1.2rem;
  }
}

.meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast a {
  color: var(--accent);
  font-weight: 700;
}

.highlight {
  background: rgba(52, 132, 255, 0.08);
}

.modal {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  background: var(--card);
  color: var(--text);
  max-width: none;
  width: min(720px, 90vw);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal::backdrop {
  background: rgba(15, 20, 30, 0.35);
}

.modal-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 20px;
  width: 100%;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: var(--text);
}

.modal-header {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.modal[open] .modal-content,
.modal.open .modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.permission-grid .perm-option.is-active {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.modal-header h4 {
  margin: 0 0 12px;
}

.modal-body {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-nav {
    flex-wrap: wrap;
  }
}
