:root {
  --brand-navy: #2E314D;
  --brand-section: #3A3F63;
  --brand-gold: #C2A96B;
  --brand-gold-soft: #E2D4AE;
  --bg-main: #F7F5EF;
  --bg-card: #FFFFFF;
  --text-primary: #1F2238;
  --text-secondary: #6F748A;
  --border: #DDD4C0;
  --danger: #C64E4E;
  --ok: #2E9961;
  --shadow: 0 8px 26px rgba(38, 34, 25, 0.08);
  --shadow-hover: 0 16px 34px rgba(38, 34, 25, 0.12);
  --ease-soft: 220ms cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 20% 0%, #fff8e7 0%, rgba(255, 248, 231, 0) 32%),
    linear-gradient(180deg, #f9f8f4 0%, #f3f0e8 100%);
  color: var(--text-primary);
}

a {
  color: #8C6D2F;
  text-decoration: none;
  transition: color var(--ease-soft), opacity var(--ease-soft);
}

a:focus-visible {
  outline: 3px solid rgba(58, 63, 99, 0.42);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(1320px, 95%);
  margin: 26px auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft);
}

.card > h3 {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #efe5d3;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #d6c59b;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.muted {
  color: var(--text-secondary);
}

h1, h2, h3 {
  margin: 0 0 12px 0;
  color: #262A43;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

label {
  display: block;
  margin-bottom: 7px;
  color: #6D7288;
  font-size: 13px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #D8CFBC;
  background: #FFFFFF;
  color: var(--text-primary);
  padding: 11px 12px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(194, 169, 107, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: #848aa0;
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #f4f2eb;
}

button, .btn {
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--text-primary);
  padding: 9px 12px;
  display: inline-block;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  min-height: 44px;
  text-align: center;
  transition:
    transform var(--ease-soft),
    box-shadow var(--ease-soft),
    border-color var(--ease-soft),
    background var(--ease-soft),
    color var(--ease-soft),
    opacity var(--ease-soft);
}

button:hover, .btn:hover {
  transform: translateY(-1px);
}

button:active, .btn:active {
  transform: translateY(0);
}

button:disabled,
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible,
.btn:focus-visible,
.admin-nav-link:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(58, 63, 99, 0.42);
  outline-offset: 2px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-primary {
  background: linear-gradient(145deg, #D4BC82 0%, #B6944C 100%);
  color: #1F2238;
  border-color: #B6944C;
  box-shadow: 0 8px 18px rgba(182, 148, 76, 0.26);
}

.btn-primary:hover {
  box-shadow: 0 14px 24px rgba(182, 148, 76, 0.34);
  filter: saturate(1.03);
}

.btn-secondary {
  background: linear-gradient(145deg, #374064 0%, #2E314D 100%);
  color: #F7F8FC;
  border-color: #2E314D;
}

.btn-secondary:hover {
  box-shadow: 0 14px 24px rgba(46, 49, 77, 0.24);
  filter: brightness(1.04);
}

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

.btn-danger:hover {
  box-shadow: 0 14px 24px rgba(198, 78, 78, 0.24);
  filter: brightness(1.03);
}

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

.actions form {
  margin: 0;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-ok {
  background: rgba(46, 153, 97, 0.12);
  border-color: rgba(46, 153, 97, 0.45);
  color: #1f6b45;
}

.alert-error {
  background: rgba(198, 78, 78, 0.12);
  border-color: rgba(198, 78, 78, 0.42);
  color: #7c2430;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid #EFE7D5;
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: #6D7288;
  font-weight: 700;
  background: #FBF8F0;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #fffdf6;
}

tbody tr:nth-child(even) {
  background: rgba(251, 247, 238, 0.52);
}

table tr {
  transition: background var(--ease-soft);
}

.admin-nav {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px 0 14px;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #f9f8f4 70%, rgba(249, 248, 244, 0));
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d9ceb4;
  background: #fffdfa;
  color: #3a3f63;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(38, 34, 25, 0.04);
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft), background var(--ease-soft), color var(--ease-soft);
}

.admin-nav-link:hover {
  border-color: #c2a96b;
  color: #2e314d;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(38, 34, 25, 0.09);
}

.admin-nav-link.is-active {
  background: linear-gradient(145deg, #374064 0%, #2E314D 100%);
  border-color: #2E314D;
  color: #f7f8fc;
}

.admin-nav-link.admin-nav-logout {
  margin-left: auto;
  background: #fff8f8;
  border-color: #eccaca;
  color: #8b2732;
}

.section-title {
  margin-top: 2px;
  margin-bottom: 8px;
  font-size: 15px;
  color: #86692D;
  font-weight: 700;
}

.refund-warning {
  border: 1px solid #E3C36A;
  background: linear-gradient(180deg, #FFF8E6 0%, #FFF3D8 100%);
  color: #5D4516;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  line-height: 1.75;
  font-size: 14px;
}

.form-panel {
  background: #FFFEFB;
  border: 1px solid #E9DFC8;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  transition: border-color var(--ease-soft), box-shadow var(--ease-soft), transform var(--ease-soft);
}

.form-panel .section-title {
  margin-bottom: 10px;
}

.form-panel:hover {
  border-color: #d9c7a3;
  box-shadow: 0 12px 24px rgba(38, 34, 25, 0.06);
}

.form-note {
  color: #6A6F85;
  font-size: 12px;
  margin-top: 6px;
}

.ticket-form-card {
  padding: 20px;
}

.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ticket-entry-intro {
  background:
    radial-gradient(circle at right top, rgba(194, 169, 107, 0.14) 0%, rgba(194, 169, 107, 0) 34%),
    linear-gradient(135deg, rgba(255, 252, 244, 0.98) 0%, rgba(255, 249, 236, 0.92) 100%);
  border-color: #d8ccb2;
}

.admin-dashboard-intro {
  background:
    radial-gradient(circle at right top, rgba(46, 49, 77, 0.09) 0%, rgba(46, 49, 77, 0) 38%),
    radial-gradient(circle at left bottom, rgba(194, 169, 107, 0.11) 0%, rgba(194, 169, 107, 0) 30%),
    linear-gradient(135deg, rgba(255, 254, 249, 0.98) 0%, rgba(250, 245, 232, 0.92) 100%);
}

.page-eyebrow,
.section-kicker,
.summary-panel-kicker {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(182, 148, 76, 0.3);
  background: rgba(255, 248, 230, 0.86);
  color: #775b22;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-title {
  margin: 10px 0 8px;
  font-size: 31px;
  line-height: 1.05;
}

.page-subtitle,
.summary-panel-copy {
  margin: 0;
  max-width: 720px;
  color: #5a617b;
  line-height: 1.7;
  font-size: 14px;
}

.page-intro-meta {
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.intro-stat {
  border: 1px solid #e6dcc7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.intro-stat strong {
  font-size: 16px;
  color: #252942;
}

.intro-stat-label {
  color: #7a8096;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.74fr);
  gap: 18px;
  align-items: start;
}

.ticket-form-main {
  display: grid;
  gap: 14px;
}

.ticket-form-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.form-panel-emphasis {
  background:
    radial-gradient(circle at 0% 0%, rgba(194, 169, 107, 0.08) 0%, rgba(194, 169, 107, 0) 30%),
    #fffefb;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-caption {
  max-width: 280px;
  color: #7b8094;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.field-stack {
  display: grid;
  gap: 7px;
  height: 100%;
}

.field-stack-compact {
  gap: 6px;
}

.field-stack-highlight {
  padding: 12px;
  border: 1px solid #e8dcc4;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.refund-field {
  border-color: #edd7ba;
  background: linear-gradient(180deg, #fff8f0 0%, #ffffff 100%);
}

.form-quick-note {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #e7dcc2;
  border-radius: 12px;
  background: #fffaf0;
  color: #5a4b28;
  font-size: 13px;
  font-weight: 600;
}

.collapsible-panel summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  color: #2b3049;
}

.collapsible-panel summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel summary::after {
  content: '+';
  float: right;
  color: #6f748a;
  font-size: 18px;
  line-height: 1;
}

.collapsible-panel[open] summary::after {
  content: '-';
}

.ticket-submit-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.breakdown-toggle-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e2d8c2;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 6px;
  user-select: none;
  cursor: pointer;
  padding: 12px 14px;
  border: 2px solid #d3bb82;
  background: linear-gradient(180deg, #fffaf0 0%, #fff3da 100%);
  border-radius: 12px;
  color: #4c3f1f;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 10px rgba(182, 148, 76, 0.15);
}

.toggle-control input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: #2e314d;
  cursor: pointer;
}

.toggle-control span {
  display: inline-block;
  line-height: 1.25;
}

.toggle-control:hover {
  border-color: #b6944c;
}

.breakdown-suggest {
  color: #7a5318;
  font-weight: 700;
}

.live-summary {
  border: 1px solid #e6dcc7;
  border-radius: 12px;
  padding: 12px 13px;
  background: linear-gradient(180deg, #fffdfa 0%, #fffaf0 100%);
  display: grid;
  gap: 8px;
  min-height: 100%;
}

.live-summary-inline {
  margin-top: 2px;
}

.refund-live-summary {
  border-color: #f0d6b8;
  background: linear-gradient(180deg, #fff8f1 0%, #fffefc 100%);
}

.live-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: #59607c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.live-result-row strong.is-profit {
  color: #1f7f4f;
}

.live-result-row strong.is-loss {
  color: #8b2732;
}

.live-result-row strong.is-even {
  color: #2e314d;
}

.negative-non-refund-warning {
  margin: 12px 0 16px;
  padding: 11px 12px;
  border: 1px solid rgba(198, 78, 78, 0.46);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff4f4 0%, #ffecec 100%);
  color: #7a1f2a;
  display: grid;
  gap: 4px;
  line-height: 1.55;
  font-size: 13px;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  clear: both;
}

.negative-non-refund-warning strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #6f1720;
}

.negative-non-refund-warning span {
  display: block;
  color: #7a2733;
}

.input-readonly {
  background: #f7f7f7;
  color: #555c76;
}

.summary-panel {
  border: 1px solid #e2d7bf;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 251, 242, 0.96) 100%);
  padding: 15px;
  display: grid;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(38, 34, 25, 0.07);
}

.summary-panel-primary {
  border-color: #d6c59b;
  background:
    radial-gradient(circle at 100% 0%, rgba(194, 169, 107, 0.14) 0%, rgba(194, 169, 107, 0) 34%),
    linear-gradient(180deg, #fffdf8 0%, #fff9eb 100%);
}

.summary-panel h3 {
  margin: -2px 0 0;
}

.checklist-list {
  display: grid;
  gap: 8px;
}

.checklist-item {
  position: relative;
  padding: 10px 12px 10px 34px;
  border: 1px solid #ece1cb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #313654;
  line-height: 1.6;
  font-size: 13px;
}

.checklist-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(145deg, #d4bc82 0%, #b6944c 100%);
  box-shadow: 0 0 0 4px rgba(194, 169, 107, 0.14);
}

.attachment-list-note {
  padding: 10px 12px;
  border: 1px dashed #d7c8a6;
  border-radius: 12px;
  background: #fffaf0;
}

.attachments-block {
  display: grid;
  gap: 10px;
  align-content: start;
}

.attachments-actions {
  position: relative;
  z-index: 2;
  row-gap: 8px;
}

.attachments-actions .btn {
  min-width: 116px;
}

.attachments-selected-box {
  display: block;
  clear: both;
}

.attachments-help {
  margin-top: 0;
}

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

.btn-compact {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 999px;
}

.attachment-remove-toggle {
  background: #fff8f8;
  color: #8b2732;
  border: 1px solid #eccaca;
}

.attachment-remove-toggle:hover {
  box-shadow: 0 10px 16px rgba(139, 39, 50, 0.16);
}

.attachment-remove-toggle.is-marked {
  background: #8b2732;
  color: #fff;
  border-color: #8b2732;
}

.attachment-remove-state {
  display: none;
  font-size: 11px;
  font-weight: 700;
  color: #8b2732;
}

.attachment-remove-state.is-visible {
  display: inline-block;
}

.notes-block {
  margin-top: 8px;
}

.notes-block textarea {
  margin-top: 2px;
}

.admin-section-card {
  overflow: hidden;
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-section-head h3 {
  margin: 8px 0 0;
}

.admin-section-copy {
  max-width: 360px;
  color: #69708a;
  font-size: 13px;
  line-height: 1.65;
  text-align: right;
}

.admin-search-shell {
  background:
    radial-gradient(circle at 0% 0%, rgba(194, 169, 107, 0.08) 0%, rgba(194, 169, 107, 0) 28%),
    linear-gradient(180deg, #fffefb 0%, #fffaf2 100%);
}

.dashboard-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dfd3bc;
  background: rgba(255, 255, 255, 0.85);
  color: #444b65;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(38, 34, 25, 0.04);
}

.dashboard-table-wrap {
  border: 1px solid #ece2cf;
  border-radius: 14px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 251, 243, 0.96) 100%);
}

.dashboard-table-wrap table {
  border-radius: 0;
}

.employees-summary-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.employees-summary-title {
  color: #252942;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(194, 169, 107, 0.18) 0%, rgba(194, 169, 107, 0) 28%),
    radial-gradient(circle at 10% 80%, rgba(46, 49, 77, 0.08) 0%, rgba(46, 49, 77, 0) 34%);
}

.login-shell {
  width: min(1120px, 96vw);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #DCCFAB;
  box-shadow: 0 14px 36px rgba(33, 30, 23, 0.14);
}

.login-brand {
  background:
    linear-gradient(165deg, #2E314D 0%, #3A3F63 55%, #4F567F 100%);
  color: #F4F6FB;
  padding: 34px 34px 26px 34px;
  position: relative;
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  bottom: -90px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(234, 216, 171, 0.2) 0%, rgba(234, 216, 171, 0) 70%);
  pointer-events: none;
}

.brand-logo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(234, 216, 171, 0.35);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.brand-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.login-brand h1 {
  color: #F8F9FF;
  margin-bottom: 10px;
  font-size: 30px;
}

.login-brand .company {
  color: #EAD8AB;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 22px;
}

.login-brand .dept {
  color: #F6EDDA;
  font-size: 16px;
  margin-bottom: 16px;
}

.login-brand .welcome {
  color: #E3E8FA;
  line-height: 1.8;
  max-width: 520px;
}

.login-form-pane {
  background: #FFFFFF;
  padding: 30px 28px 24px;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e7dcc2;
  color: #6f5a27;
  background: linear-gradient(180deg, #fff9ea 0%, #fff3d8 100%);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-title {
  margin-bottom: 6px;
  color: #2C3049;
}

.login-sub {
  color: #7E8296;
  margin-bottom: 14px;
}

.login-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
  font-size: 14px;
}

.login-field {
  margin-bottom: 12px;
}

.login-help {
  margin-top: 10px;
  font-size: 12px;
  color: #7c8094;
}

@media (max-width: 1100px) {
  .container { width: min(1200px, 97%); }
}

@media (max-width: 900px) {
  .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 24px 20px 20px;
  }

  .login-brand h1 {
    font-size: 25px;
  }

  .login-brand .company {
    font-size: 19px;
  }

  .login-form-pane {
    padding: 22px 18px 18px;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-active {
  color: #1f7f4f;
  background: rgba(46, 153, 97, 0.12);
  border-color: rgba(46, 153, 97, 0.35);
}

.status-disabled {
  color: #9a5a19;
  background: rgba(233, 162, 56, 0.15);
  border-color: rgba(192, 118, 26, 0.35);
}

.status-deleted {
  color: #8b2732;
  background: rgba(198, 78, 78, 0.12);
  border-color: rgba(198, 78, 78, 0.35);
}

.status-info {
  color: #2e314d;
  background: rgba(58, 63, 99, 0.12);
  border-color: rgba(58, 63, 99, 0.35);
}

.status-warning {
  color: #9a5a19;
  background: rgba(233, 162, 56, 0.14);
  border-color: rgba(192, 118, 26, 0.35);
}

.status-critical {
  color: #8b2732;
  background: rgba(198, 78, 78, 0.12);
  border-color: rgba(198, 78, 78, 0.35);
}

.announcements-board {
  border-color: #d9cfb8;
  background:
    radial-gradient(circle at 12% -20%, #fffaf0 0%, rgba(255, 250, 240, 0) 38%),
    #fffdf8;
}

.announcement-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.announcement-board-head h3 {
  margin-bottom: 0;
}

.announcement-list,
.announcements-admin-list {
  display: grid;
  gap: 10px;
}

.announcement-item {
  border: 1px solid #e5dcc8;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft);
}

.announcement-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(38, 34, 25, 0.08);
  border-color: #d6c59b;
}

.announcement-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.announcement-head strong {
  color: #252942;
  font-size: 14px;
}

.announcement-body {
  line-height: 1.75;
  color: #313654;
  white-space: normal;
}

.employee-grid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.employee-grid-head h3 {
  margin-bottom: 0;
}

.employee-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
}

.employee-card {
  border: 1px solid #e4d9c3;
  border-radius: 12px;
  background: #fffdfa;
  padding: 12px;
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft);
}

.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(38, 34, 25, 0.09);
  border-color: #d4c08f;
}

.employee-card-active {
  border-color: #b6944c;
  box-shadow: 0 0 0 2px rgba(182, 148, 76, 0.18);
}

.employee-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.employee-name {
  font-size: 16px;
  font-weight: 700;
  color: #262a43;
  margin-bottom: 4px;
}

.employee-card-stats {
  margin-top: 10px;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #3e425a;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr;
  gap: 12px;
  align-items: end;
}

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

.directory-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #efe7d5;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 251, 243, 0.94) 100%);
}

.search-mode-card {
  border-color: #b6944c;
  box-shadow: 0 0 0 2px rgba(182, 148, 76, 0.18);
}

.topbar .actions .btn:hover,
.actions .btn:hover,
.actions button:hover {
  box-shadow: 0 12px 22px rgba(38, 34, 25, 0.12);
}

.employees-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: #252942;
}

.employees-collapsible > summary::-webkit-details-marker {
  display: none;
}

.employees-collapsible > summary::after {
  content: '+';
  font-size: 20px;
  line-height: 1;
  color: #6f748a;
}

.employees-collapsible[open] > summary::after {
  content: '-';
}

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

.report-kpi {
  border: 1px solid #e4dccb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffdf8;
  display: grid;
  gap: 6px;
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft), background var(--ease-soft);
}

.report-kpi:hover {
  transform: translateY(-2px);
  border-color: #d5c49b;
  background: linear-gradient(180deg, #fffefb 0%, #fff7e8 100%);
  box-shadow: 0 14px 24px rgba(38, 34, 25, 0.08);
}

.report-kpi strong {
  font-size: 19px;
  color: #252942;
}

.finance-snap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.finance-box {
  border: 1px solid #e5dcc8;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  transition: transform var(--ease-soft), box-shadow var(--ease-soft), border-color var(--ease-soft);
}

.finance-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(38, 34, 25, 0.08);
}

.finance-normal {
  background: linear-gradient(180deg, #f9fffb 0%, #ffffff 100%);
  border-color: #c8e7d6;
}

.finance-refund {
  background: linear-gradient(180deg, #fff8f1 0%, #ffffff 100%);
  border-color: #f0d6b8;
}

.finance-box-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #242942;
}

.finance-line {
  margin-bottom: 6px;
  color: #2d334d;
}

.finance-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
}

.finance-chip-normal {
  color: #1f7f4f;
  background: rgba(46, 153, 97, 0.12);
  border: 1px solid rgba(46, 153, 97, 0.3);
}

.finance-chip-refund {
  color: #9a5a19;
  background: rgba(233, 162, 56, 0.14);
  border: 1px solid rgba(192, 118, 26, 0.3);
}

.finance-chip-danger {
  color: #8b2732;
  background: rgba(198, 78, 78, 0.12);
  border: 1px solid rgba(198, 78, 78, 0.35);
}

.finance-mini-title {
  margin-top: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #59607c;
}

.finance-mini-table-wrap {
  border: 1px solid #ece2cf;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.finance-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.finance-mini-table th,
.finance-mini-table td {
  padding: 6px 7px;
  border-bottom: 1px solid #f0e8d8;
}

.finance-mini-table th {
  background: #fbf7ee;
  color: #6d7288;
}

.ticket-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.ticket-status-issued,
.ticket-status-change,
.ticket-status-split {
  color: #1f7f4f;
  background: rgba(46, 153, 97, 0.12);
  border-color: rgba(46, 153, 97, 0.35);
}

.ticket-status-full_refund,
.ticket-status-partial_refund {
  color: #9a5a19;
  background: rgba(233, 162, 56, 0.14);
  border-color: rgba(192, 118, 26, 0.35);
}

.recipients-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.recipient-summary-chip {
  border: 1px solid #e4d9c3;
  border-radius: 12px;
  background: #fffdf8;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.recipient-summary-chip strong {
  color: #252942;
  font-size: 13px;
}

.recipient-summary-chip span {
  color: #5d647e;
  font-size: 12px;
}

.recipients-groups {
  display: grid;
  gap: 12px;
}

.recipient-type-card {
  border: 1px solid #e6dcc7;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fffefb 0%, #fffaf1 100%);
}

.recipient-type-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.recipient-type-head h4 {
  margin: 0;
  color: #252942;
  font-size: 16px;
}

.recipient-type-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipient-type-empty {
  padding: 8px 2px;
  font-size: 13px;
}

.recipient-table-wrap {
  border: 1px solid #ece2cf;
  border-radius: 12px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.92);
}

.recipient-email {
  font-weight: 700;
  color: #252942;
}

.recipient-id {
  margin-top: 2px;
  font-size: 12px;
}

@media (hover: none) {
  .card:hover,
  .announcement-item:hover,
  .employee-card:hover,
  .report-kpi:hover,
  .finance-box:hover,
  .topbar .actions .btn:hover,
  .actions .btn:hover,
  .actions button:hover,
  .admin-nav-link:hover,
  button:hover,
  .btn:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .page-intro,
  .form-section-head,
  .admin-section-head {
    flex-direction: column;
  }

  .page-intro-meta {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ticket-form-sidebar {
    position: static;
    order: -1;
  }

  .section-caption {
    max-width: none;
    text-align: left;
  }

  .admin-section-copy {
    max-width: none;
    text-align: left;
  }

  .filter-toolbar {
    grid-template-columns: 1fr;
  }
  .finance-snap-grid {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    padding-bottom: 10px;
    margin-bottom: 8px;
  }

  .ticket-submit-wrap {
    justify-content: stretch;
  }

  .ticket-submit-wrap .btn-primary {
    width: 100%;
  }

  .recipient-type-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .container {
    width: 96%;
    margin: 16px auto;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .topbar .actions {
    width: 100%;
  }

  .topbar .actions .btn {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .col-8, .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }

  .form-panel {
    padding: 12px;
    margin-top: 10px;
  }

  .page-title {
    font-size: 26px;
  }

  .section-title {
    font-size: 14px;
  }

  .announcement-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  button, .btn {
    min-height: 42px;
    padding: 10px 12px;
  }

  input, select, textarea {
    font-size: 16px;
    padding: 12px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .page-intro-meta {
    grid-template-columns: 1fr;
  }

  .container {
    width: 94%;
    margin: 12px auto;
  }

  .grid {
    gap: 10px;
  }

  .actions {
    gap: 6px;
  }

  .attachments-actions .btn {
    width: 100%;
  }

  .toggle-control {
    font-size: 15px;
    padding: 10px 12px;
  }

  .toggle-control input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .admin-nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .login-wrap {
    padding: 12px;
  }
}
