/* =================================
       HERO
    ================================= */

.ticket-hero {
  position: relative;

  overflow: hidden;

  background: linear-gradient(120deg, #0758dc, #1687ef 60%, #08afd5);

  color: white;

  border-radius: 22px;

  padding: 27px 30px;

  margin-bottom: 22px;

  box-shadow: 0 16px 40px rgba(23, 105, 255, 0.16);

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 25px;
}

.ticket-hero::before {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  border: 40px solid rgba(255, 255, 255, 0.06);

  border-radius: 50%;

  right: -90px;
  top: -130px;
}

.ticket-hero::after {
  content: "";

  position: absolute;

  width: 160px;
  height: 160px;

  border: 25px solid rgba(255, 255, 255, 0.05);

  border-radius: 50%;

  right: 110px;
  bottom: -120px;
}

.hero-content {
  position: relative;

  z-index: 1;
}

.hero-label {
  font-size: 11px;

  opacity: 0.78;

  margin-bottom: 8px;
}

.hero-title {
  font-size: 25px;

  font-weight: 800;

  letter-spacing: -0.7px;
}

.hero-description {
  margin-top: 7px;

  font-size: 12px;

  opacity: 0.8;

  max-width: 600px;

  line-height: 1.6;
}

.hero-button {
  position: relative;

  z-index: 2;

  flex-shrink: 0;

  height: 42px;

  padding: 0 18px;

  border: none;

  border-radius: 10px;

  background: white;

  color: var(--blue-dark);

  font-size: 11px;

  font-weight: 800;

  cursor: pointer;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

  transition: 0.2s;
}

.hero-button:hover {
  transform: translateY(-2px);
}

/* =================================
       SUMMARY
    ================================= */

.summary-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 16px;

  margin-bottom: 25px;
}

.summary-card {
  background: var(--white);

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

  border-radius: var(--radius);

  padding: 20px;

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

.summary-top {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;
}

.summary-icon {
  width: 40px;
  height: 40px;

  border-radius: 12px;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 17px;

  background: #edf4ff;

  color: var(--blue);
}

.summary-icon.green {
  background: #e9fbf3;

  color: var(--green);
}

.summary-icon.orange {
  background: #fff5e8;

  color: var(--orange);
}

.summary-icon.red {
  background: #fff0f0;

  color: var(--red);
}

.summary-card small {
  display: block;

  color: var(--muted);

  font-size: 10px;

  margin-top: 16px;
}

.summary-card h2 {
  margin-top: 6px;

  font-size: 21px;

  letter-spacing: -0.5px;
}

.summary-card p {
  font-size: 10px;

  color: var(--muted);

  margin-top: 5px;
}

/* =================================
       TICKET CARD
    ================================= */

.card {
  background: white;

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

  border-radius: var(--radius);

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

.card-header {
  padding: 20px 22px;

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

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 15px;
}

.card-title h3 {
  font-size: 15px;

  font-weight: 750;
}

.card-title p {
  color: var(--muted);

  font-size: 10px;

  margin-top: 4px;
}

.header-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 190px;

  height: 35px;

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

  border-radius: 9px;

  padding: 0 11px 0 32px;

  font-size: 10px;

  outline: none;

  background: #fff;

  transition: 0.2s;
}

.search-box input:focus {
  border-color: #b8d0ff;

  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.06);
}

.search-icon {
  position: absolute;

  left: 11px;

  top: 50%;

  transform: translateY(-50%);

  color: #8996a8;

  font-size: 12px;
}

.filter-area {
  display: flex;

  gap: 7px;
}

.filter-area select {
  height: 35px;

  padding: 0 10px;

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

  border-radius: 9px;

  background: white;

  color: var(--text);

  font-size: 10px;

  outline: none;

  cursor: pointer;
}

/* =================================
       TICKET TABLE
    ================================= */

.table-wrap {
  width: 100%;

  overflow-x: auto;
}

table {
  width: 100%;

  min-width: 820px;

  border-collapse: collapse;
}

th {
  padding: 12px 20px;

  text-align: left;

  background: #fafcff;

  color: #8491a5;

  font-size: 9px;

  text-transform: uppercase;

  letter-spacing: 0.6px;

  font-weight: 700;

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

  white-space: nowrap;
}

td {
  padding: 16px 20px;

  border-bottom: 1px solid #eef2f7;

  font-size: 11px;

  vertical-align: middle;

  white-space: nowrap;
}

tbody tr {
  transition: 0.15s ease;

  cursor: pointer;
}

tbody tr:hover {
  background: #f9fbff;
}

tbody tr:last-child td {
  border-bottom: none;
}

.ticket-number {
  color: var(--blue);

  font-weight: 750;

  font-size: 11px;
}

.ticket-subject {
  display: block;

  max-width: 260px;

  overflow: hidden;

  text-overflow: ellipsis;
}

.ticket-category {
  color: var(--muted);

  font-size: 10px;

  margin-top: 3px;
}

.ticket-date {
  color: var(--muted);

  font-size: 10px;
}

/* =================================
       STATUS
    ================================= */

.status {
  display: inline-flex;

  align-items: center;

  gap: 5px;

  padding: 6px 9px;

  border-radius: 20px;

  font-size: 9px;

  font-weight: 700;
}

.status::before {
  content: "";

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: currentColor;
}

.status.open {
  color: var(--blue);

  background: #edf4ff;
}

.status.progress {
  color: #9b6b12;

  background: #fff6e5;
}

.status.resolved {
  color: #159b68;

  background: #eafaf3;
}

.status.closed {
  color: #7b8798;

  background: #f0f3f6;
}

/* =================================
       PRIORITY
    ================================= */

.priority {
  display: inline-flex;

  align-items: center;

  gap: 5px;

  font-size: 9px;

  font-weight: 700;
}

.priority i {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: currentColor;
}

.priority.high {
  color: var(--red);
}

.priority.medium {
  color: var(--orange);
}

.priority.low {
  color: var(--green);
}

/* =================================
       SLA
    ================================= */

.sla {
  font-size: 9px;

  color: var(--muted);
}

.sla.warning {
  color: var(--orange);

  font-weight: 700;
}

.sla.danger {
  color: var(--red);

  font-weight: 700;
}

.sla.success {
  color: var(--green);
}

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

.action-btn {
  width: 31px;
  height: 31px;

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

  border-radius: 8px;

  background: white;

  cursor: pointer;

  font-size: 13px;

  color: #657286;

  transition: 0.2s;
}

.action-btn:hover {
  color: var(--blue);

  border-color: #bcd2ff;

  background: #f4f8ff;
}

/* =================================
       PAGINATION
    ================================= */

.pagination {
  padding: 15px 20px;

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

  display: flex;

  align-items: center;

  justify-content: space-between;
}

.pagination-info {
  color: var(--muted);

  font-size: 9px;
}

.pagination-buttons {
  display: flex;

  gap: 5px;
}

.page-btn {
  width: 29px;
  height: 29px;

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

  border-radius: 7px;

  background: white;

  color: #657286;

  font-size: 9px;

  cursor: pointer;
}

.page-btn.active {
  background: var(--blue);

  border-color: var(--blue);

  color: white;
}

/* =================================
       MODAL
    ================================= */

.modal {
  position: fixed;

  inset: 0;

  background: rgba(15, 30, 55, 0.45);

  display: none;

  align-items: center;

  justify-content: center;

  padding: 20px;

  z-index: 500;

  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
}

.modal-box {
  width: 100%;

  max-width: 650px;

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

  overflow-y: auto;

  background: white;

  border-radius: 20px;

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);

  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;

    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

.modal-head {
  padding: 20px 22px;

  display: flex;

  justify-content: space-between;

  align-items: center;

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

.modal-head h3 {
  font-size: 15px;
}

.modal-head small {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 9px;
}

.close-btn {
  width: 30px;
  height: 30px;

  border: none;

  background: #f3f6fa;

  border-radius: 8px;

  cursor: pointer;

  font-size: 15px;
}

.modal-body {
  padding: 22px;
}

/* =================================
       DETAIL TICKET
    ================================= */

.ticket-detail-head {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 20px;

  margin-bottom: 20px;
}

.detail-number {
  color: var(--blue);

  font-size: 11px;

  font-weight: 800;
}

.detail-title {
  font-size: 17px;

  font-weight: 800;

  margin-top: 6px;

  line-height: 1.4;
}

.detail-meta {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin-top: 9px;
}

.meta-chip {
  padding: 5px 8px;

  border-radius: 6px;

  background: #f4f7fa;

  color: #667386;

  font-size: 8px;

  font-weight: 600;
}

.detail-description {
  padding: 16px;

  background: #f8faff;

  border: 1px solid #edf2f8;

  border-radius: 12px;

  color: #586579;

  font-size: 10px;

  line-height: 1.7;

  margin-bottom: 20px;
}

.timeline {
  position: relative;

  padding-left: 25px;
}

.timeline::before {
  content: "";

  position: absolute;

  left: 5px;

  top: 5px;

  bottom: 5px;

  width: 1px;

  background: #dce5f1;
}

.timeline-item {
  position: relative;

  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;

  left: -24px;

  top: 3px;

  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: var(--blue);

  border: 2px solid white;

  box-shadow: 0 0 0 1px #cbd8ea;
}

.timeline-item.support .timeline-dot {
  background: var(--cyan);
}

.timeline-header {
  display: flex;

  justify-content: space-between;

  gap: 10px;
}

.timeline-header strong {
  font-size: 10px;
}

.timeline-header span {
  color: var(--muted);

  font-size: 8px;
}

.timeline-text {
  margin-top: 5px;

  color: #667386;

  font-size: 9px;

  line-height: 1.6;
}

/* =================================
       NEW TICKET FORM
    ================================= */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;

  font-size: 10px;

  font-weight: 700;

  margin-bottom: 7px;
}

.required {
  color: var(--red);
}

.form-control {
  width: 100%;

  height: 40px;

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

  border-radius: 9px;

  padding: 0 12px;

  outline: none;

  color: var(--text);

  background: white;

  font-size: 10px;

  transition: 0.2s;
}

textarea.form-control {
  height: 115px;

  resize: vertical;

  padding-top: 11px;
}

.form-control:focus {
  border-color: #b8d0ff;

  box-shadow: 0 0 0 3px rgba(23, 105, 255, 0.06);
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 14px;
}

.upload-box {
  border: 1px dashed #cbd7e6;

  border-radius: 10px;

  padding: 15px;

  text-align: center;

  background: #fafcff;

  cursor: pointer;

  transition: 0.2s;
}

.upload-box:hover {
  border-color: #8eb2f5;

  background: #f6f9ff;
}

.upload-box strong {
  display: block;

  font-size: 10px;

  color: #566477;
}

.upload-box span {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 8px;
}

.upload-box input {
  display: none;
}

.modal-footer {
  padding: 0 22px 22px;

  display: flex;

  justify-content: flex-end;

  gap: 9px;
}

.btn {
  height: 39px;

  padding: 0 16px;

  border-radius: 9px;

  font-size: 10px;

  font-weight: 700;

  cursor: pointer;
}

.btn-secondary {
  background: white;

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

  color: #5e6b7c;
}

.btn-primary {
  background: var(--blue);

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

  color: white;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

/* =================================
       TOAST
    ================================= */

.toast {
  position: fixed;

  right: 25px;

  bottom: 25px;

  background: #172230;

  color: white;

  padding: 13px 17px;

  border-radius: 10px;

  font-size: 10px;

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);

  transform: translateY(80px);

  opacity: 0;

  transition: 0.3s;

  z-index: 1000;
}

.toast.show {
  transform: translateY(0);

  opacity: 1;
}

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

.mobile-menu {
  display: none;

  width: 36px;
  height: 36px;

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

  border-radius: 9px;

  background: white;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  margin-right: 12px;
}

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .ticket-hero {
    align-items: flex-start;

    flex-direction: column;
  }

  .hero-button {
    width: 100%;
  }

  .card-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .header-actions {
    width: 100%;

    flex-wrap: wrap;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 800px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    width: 250px;

    transform: translateX(-100%);

    transition: 0.25s ease;
  }

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

  .main {
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .topbar {
    padding: 0 18px;
  }

  .page-heading {
    display: flex;

    align-items: center;
  }

  .content {
    padding: 22px 18px 40px;
  }

  .user-info {
    display: none;
  }

  .notification {
    display: none;
  }
}

@media (max-width: 600px) {
  .summary-grid {
    grid-template-columns: 1fr 1fr;

    gap: 10px;
  }

  .summary-card {
    padding: 15px;
  }

  .summary-card h2 {
    font-size: 17px;
  }

  .summary-icon {
    width: 34px;
    height: 34px;
  }

  .ticket-hero {
    padding: 23px;
  }

  .hero-title {
    font-size: 21px;
  }

  .filter-area {
    width: 100%;
  }

  .filter-area select {
    flex: 1;
  }

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