/* ==========================================================================
   Aegis IT - Master Theme & Layout Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #0c0f14;
  --bg-card: #151b23;
  --bg-card-hover: #1d242e;

  --primary: #2a3441;
  --primary-light: #3a4757;

  --accent: #FF9B4A;      /* papaya orange */
  --accent-hover: #e67f2e;
  --accent-glow: rgba(255, 155, 74, 0.35);

  --text-main: #f2f5f9;
  --text-muted: #9aa8b8;
  --border-color: #26303c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo { height: auto; width: 230px; max-height: 56px; object-fit: contain; }
.brand-logo:hover { opacity: 0.85; }

.user-info, .nav-links { display: flex; align-items: center; gap: 15px; font-size: 0.9rem; }
.nav-links a { color: var(--text-main); }
.nav-links a:hover { color: var(--accent); }

.main-container { display: flex; flex: 1; overflow: hidden; height: calc(100vh - 75px); }

.sidebar {
  width: 330px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.folder-section, .ticket-list { padding: 0.5rem 0; overflow-y: auto; flex: 1; }

.folder-title {
  padding: 8px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: bold;
  letter-spacing: 0.5px;
}

.ticket-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: block;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s;
  position: relative;
}

.ticket-item:hover { background-color: var(--bg-card-hover); }
.ticket-item.active { background-color: var(--bg-card-hover); border-left: 4px solid var(--accent); }

.ticket-subject {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; justify-content: space-between; }

.content-area { flex: 1; display: flex; flex-direction: column; background-color: var(--bg-dark); }

.ticket-header {
  padding: 1.2rem 1.5rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-messages { flex: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

.message-bubble { max-width: 80%; padding: 12px 16px; border-radius: 8px; font-size: 0.92rem; line-height: 1.5; }
.message-client { align-self: flex-start; background-color: var(--bg-card); border: 1px solid var(--border-color); }
.message-consultant { align-self: flex-end; background-color: var(--primary); color: #fff; }
.message-info { font-size: 0.75rem; opacity: 0.75; margin-bottom: 4px; }

.attachment-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.attachment-link {
  display: inline-block;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 4px;
  color: inherit !important;
}
.attachment-link:hover { background: rgba(255,255,255,0.16); text-decoration: none; }

.reply-box { padding: 1rem 1.5rem; background-color: var(--bg-card); border-top: 1px solid var(--border-color); }

.reply-box textarea {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  resize: none;
  height: 75px;
}

.btn-primary, .btn-new-ticket {
  background-color: var(--accent);
  color: #ffffff !important;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}

/* ===== Rolling services ad banner ===== */
.ads-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.ads-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.ad-slide {
  min-width: 100%;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 3.2rem 3.5rem;
  background-size: cover;
  background-position: center;
  background-color: #10151c;   /* fallback while image loads */
  border: 3px solid var(--accent);   /* papaya orange border */
  color: #f2f5f9;
}
.ad-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 10, 14, 0.96) 0%, rgba(8, 10, 14, 0.82) 40%, rgba(8, 10, 14, 0.35) 100%);
  pointer-events: none;
}
.ad-content {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  background: rgba(8, 10, 14, 0.88);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.6rem 2rem;
}
.ad-content h3 { font-size: 1.9rem; margin-bottom: 0.6rem; color: #ffffff; text-shadow: 0 2px 10px rgba(0,0,0,0.7); }
.ad-content p { font-size: 1.15rem; line-height: 1.6; color: #e2e9f0; text-shadow: 0 1px 8px rgba(0,0,0,0.7); margin: 0; }

/* arrows + dots */
.ads-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(12, 15, 20, 0.45);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.ads-arrow:hover { background: var(--accent); color: #0c0f14; }
.ads-prev { left: 14px; }
.ads-next { right: 14px; }
.ads-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}
.ads-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
.ads-dots button.active { background: var(--accent); }
@media (max-width: 700px) {
  .ad-slide { align-items: flex-end; min-height: 300px; padding: 2.2rem 1.4rem 3rem; }
  .ad-slide::before { background: linear-gradient(0deg, rgba(8,10,14,0.95) 0%, rgba(8,10,14,0.7) 55%, rgba(8,10,14,0.3) 100%); }
  .ad-content { padding: 1.2rem 1.4rem; max-width: 100%; }
  .ad-content h3 { font-size: 1.35rem; }
  .ad-content p { font-size: 1rem; }
}

.btn-primary:hover, .btn-new-ticket:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

.unread-dot {
  width: 8px; height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  position: absolute;
  right: 12px; top: 16px;
  box-shadow: 0 0 8px var(--accent);
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.modal-content {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--border-color);
}

.modal-content h3 { margin-bottom: 1rem; color: var(--accent); }

.modal-content input, .modal-content select, .modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #fff;
}

.error-msg { background: rgba(220,53,69,0.15); border: 1px solid #dc3545; color: #f8d7da; padding: 10px 14px; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.success-msg, .info-msg { background: rgba(40,167,69,0.15); border: 1px solid #28a745; color: #d4edda; padding: 10px 14px; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
