/* ============================================
   Support Console - Admin Styles
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Brand Colors */
  --color-accent: #C7843B;
  --color-accent-hover: #d99344;
  --color-supporting: #F3DB68;
  --color-base: #172531;
  --color-secondary: #2C4857;

  /* Text Colors */
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-text-subtle: rgba(255, 255, 255, 0.5);

  /* Status Colors */
  --color-error: #e57373;
  --color-error-bg: rgba(244, 67, 54, 0.15);
  --color-success: #81c784;
  --color-success-bg: rgba(129, 199, 132, 0.15);

  /* Status Badge Colors */
  --status-new: #C7843B;
  --status-reviewing: #5c9ce6;
  --status-in-progress: #9c7ae6;
  --status-resolved: #81c784;
  --status-closed: rgba(255, 255, 255, 0.5);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;

  /* Shadows */
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-heading: 'Krub', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease-in-out;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   DARK THEME SCROLLBAR
   Applied to all scrollable elements
   ============================================ */

/* Standard scrollbar (Firefox 64+, Chrome 121+) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

/* Webkit scrollbar (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--color-base);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */
.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

/* ============================================
   LOGIN CARD
   ============================================ */
.login-card {
  width: 100%;
  max-width: 380px;
  padding: var(--space-2xl);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-md);
  animation: float 5s ease-in-out infinite;
}

.login-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.login-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  margin-bottom: var(--space-2xl);
}

/* ============================================
   GOOGLE SIGN-IN BUTTON
   ============================================ */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-base);
}

.btn-google:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-google:active {
  transform: translateY(0);
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   ACCESS DENIED STATE
   ============================================ */
.access-denied-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.access-denied-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-2xl);
  background: var(--color-error-bg);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.access-denied-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  color: var(--color-error);
}

.access-denied-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-error);
  margin-bottom: var(--space-sm);
}

.access-denied-message {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   ADMIN PANEL - HEADER
   ============================================ */
.admin-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.admin-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-user-email {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.btn-sign-out {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sign-out:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   ADMIN PANEL - MAIN LAYOUT
   ============================================ */
.admin-main {
  display: grid;
  grid-template-columns: 200px 1fr 400px;
  gap: var(--space-lg);
  flex: 1;
  padding: var(--space-lg);
  overflow: hidden;
  min-height: 0;
}

/* ============================================
   ADMIN SIDEBAR (Filters)
   ============================================ */
.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  height: fit-content;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-section label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

.filter-section select,
.filter-section input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

.filter-section select option,
.status-update-row select option {
  background: var(--color-base);
  color: var(--color-text);
}

.filter-section select:hover,
.filter-section input:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-section select:focus,
.filter-section input:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.filter-section input::placeholder {
  color: var(--color-text-subtle);
}

.filter-stats {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}

/* ============================================
   TICKET LIST
   ============================================ */
.ticket-list {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ticket-list-header {
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.ticket-list-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.ticket-item {
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ticket-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.ticket-item.selected {
  background: rgba(199, 132, 59, 0.15);
  border-color: var(--color-accent);
}

.ticket-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}

.ticket-id {
  font-size: var(--text-xs);
  font-family: monospace;
  color: var(--color-text-subtle);
}

.ticket-subject {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.ticket-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
}

.status-new {
  background: rgba(199, 132, 59, 0.2);
  color: var(--status-new);
}

.status-reviewing {
  background: rgba(92, 156, 230, 0.2);
  color: var(--status-reviewing);
}

.status-in_progress {
  background: rgba(156, 122, 230, 0.2);
  color: var(--status-in-progress);
}

.status-resolved {
  background: rgba(129, 199, 132, 0.2);
  color: var(--status-resolved);
}

.status-closed {
  background: rgba(255, 255, 255, 0.1);
  color: var(--status-closed);
}

/* ============================================
   TICKET DETAIL
   ============================================ */
.ticket-detail {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ticket-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
}

.detail-header {
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-lg);
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.detail-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.detail-meta-item {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.detail-label {
  color: var(--color-text-subtle);
  min-width: 70px;
}

.detail-value {
  color: var(--color-text-muted);
  word-break: break-word;
}

.detail-user-id {
  font-family: monospace;
  font-size: var(--text-xs);
}

.detail-section {
  margin-bottom: var(--space-xl);
}

.detail-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.detail-message {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   STATUS UPDATE ROW
   ============================================ */
.status-update-row {
  display: flex;
  gap: var(--space-sm);
}

.status-update-row select {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.status-update-row select:focus {
  border-color: var(--color-accent);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary-small {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary-small:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.btn-primary-small:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   RESPONSES
   ============================================ */
.detail-responses {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.no-responses {
  padding: var(--space-lg);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.response-item {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
}

.response-admin {
  background: rgba(199, 132, 59, 0.1);
  border-left: 3px solid var(--color-accent);
}

.response-user {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.response-author {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.response-admin .response-author {
  color: var(--color-accent);
}

.response-user .response-author {
  color: var(--color-text-subtle);
}

.response-time {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.response-message {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   RESPONSE FORM
   ============================================ */
.response-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.response-form textarea {
  width: 100%;
  min-height: 100px;
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: var(--transition-fast);
}

.response-form textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.response-form textarea::placeholder {
  color: var(--color-text-subtle);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  text-align: center;
  color: var(--color-text-subtle);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state p {
  font-size: var(--text-sm);
}

/* ============================================
   LOADING INLINE
   ============================================ */
.loading-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.loading-spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   ERROR STATE
   ============================================ */
.error-inline {
  color: var(--color-error);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   NOTIFICATION BELL
   ============================================ */

.notification-wrapper {
  position: relative;
}

.notification-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-base);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-fast);
  z-index: 1000;
}

.notification-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.notification-item {
  padding: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition-fast);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.notification-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.notification-label.label-new {
  background: rgba(199, 132, 59, 0.2);
  color: var(--color-accent);
}

.notification-label.label-reply {
  background: rgba(92, 156, 230, 0.2);
  color: #5c9ce6;
}

.notification-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.notification-subject {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   SETTINGS BUTTON
   ============================================ */

.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   SETTINGS MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  width: 100%;
  max-width: 650px;
  background: var(--color-base);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

.form-group input[type="text"] {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

.form-group input[type="text"]:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-group input[type="text"]::placeholder {
  color: var(--color-text-subtle);
}

.color-input-row {
  display: flex;
  gap: var(--space-sm);
}

.color-input-row input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.color-input-row input[type="text"] {
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-footer:empty {
  display: none;
}

/* ============================================
   SETTINGS MODAL - HEADER WITH BACK BUTTON
   ============================================ */

.modal-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.modal-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.modal-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.modal-back-btn svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   SETTINGS SECTION LIST (Hub View)
   ============================================ */

.settings-section-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.settings-section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.settings-section-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.settings-section-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.settings-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.settings-section-description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.settings-section-arrow {
  width: 20px;
  height: 20px;
  color: var(--color-text-subtle);
  flex-shrink: 0;
}

/* ============================================
   PRIORITY BADGE
   ============================================ */

.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  border-radius: 4px;
  white-space: nowrap;
}

.ticket-badges,
.detail-badges {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ============================================
   PLAN BADGE
   ============================================ */

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 4px;
}

.plan-free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
}

.plan-premium {
  background: linear-gradient(135deg, rgba(199, 132, 59, 0.3), rgba(243, 219, 104, 0.3));
  color: var(--color-supporting);
}

/* ============================================
   ADMIN ACTIONS
   ============================================ */

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-actions .btn-secondary svg {
  flex-shrink: 0;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1200px) {
  .admin-main {
    grid-template-columns: 180px 1fr 350px;
  }
}

@media (max-width: 1024px) {
  .admin-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr 1fr;
    gap: var(--space-md);
  }

  .admin-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .filter-section {
    flex: 1;
    min-width: 150px;
  }

  .filter-stats {
    border-top: none;
    padding-top: 0;
    align-self: flex-end;
  }

  .ticket-list,
  .ticket-detail {
    max-height: 400px;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 480px) {
  .login-card,
  .access-denied-card {
    padding: var(--space-xl);
  }

  .admin-header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .admin-user {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .admin-main {
    padding: var(--space-sm);
  }

  .admin-sidebar {
    flex-direction: column;
  }

  .filter-section {
    min-width: 100%;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   SPECIAL REQUEST BADGES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-danger {
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
}

.badge-warning {
  background: rgba(237, 137, 54, 0.2);
  color: #fbd38d;
}

/* ============================================
   SOURCE BADGES
   ============================================ */

.badge-source {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-source-web {
  background-color: rgba(255, 255, 255, 0.08);
  color: #e0e6ed;
}

.badge-source-app {
  background-color: rgba(115, 209, 255, 0.15);
  color: #73d1ff;
}

.badge-source-email {
  background-color: rgba(199, 132, 59, 0.18);
  color: #f2b16b;
}

/* ============================================
   DANGER ZONE
   ============================================ */

.danger-zone {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-radius: var(--radius-sm);
}

.danger-zone h4 {
  color: #fc8181;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.danger-zone-info {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.danger-zone-deleted {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  font-style: italic;
}

.danger-zone-loading {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.danger-zone-status {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.danger-zone-status .status-active {
  color: var(--color-success);
  font-weight: 500;
}

.danger-zone-status .status-pending {
  color: #fbd38d;
  font-weight: 500;
}

.danger-zone-scheduled {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.danger-zone-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ============================================
   DESTRUCTIVE BUTTONS
   ============================================ */

.btn-destructive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #fff;
  background: #e53e3e;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-destructive:hover:not(:disabled) {
  background: #c53030;
}

.btn-destructive:disabled {
  background: rgba(160, 174, 192, 0.3);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.btn-destructive-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #fc8181;
  background: transparent;
  border: 1px solid rgba(229, 62, 62, 0.5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-destructive-outline:hover:not(:disabled) {
  background: rgba(229, 62, 62, 0.1);
  border-color: rgba(229, 62, 62, 0.7);
}

.btn-destructive-outline:disabled {
  color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
}

.btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #000;
  background: #fbd38d;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-warning:hover:not(:disabled) {
  background: #f6c05c;
}

.btn-warning:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: var(--space-md) var(--space-xl);
  background: var(--color-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left: 3px solid var(--color-success);
}

.toast-error {
  border-left: 3px solid var(--color-error);
}

/* ============================================
   NUKE CONFIRM MODAL
   ============================================ */

.modal-danger {
  border-color: rgba(229, 62, 62, 0.3);
}

.modal-danger .modal-header {
  border-bottom-color: rgba(229, 62, 62, 0.2);
}

.modal-danger .modal-title {
  color: #fc8181;
}

.modal-danger .modal-footer {
  border-top-color: rgba(229, 62, 62, 0.2);
}

.nuke-warning {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(229, 62, 62, 0.1);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-radius: var(--radius-sm);
}

.nuke-warning-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #fc8181;
}

.nuke-warning-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}

.nuke-warning-text strong {
  color: #fc8181;
}

.nuke-warning-text p {
  margin: var(--space-sm) 0;
  color: var(--color-text-muted);
}

.nuke-warning-text ul {
  margin: var(--space-sm) 0;
  padding-left: var(--space-lg);
  color: var(--color-text-muted);
}

.nuke-warning-text li {
  margin-bottom: var(--space-xs);
}

.nuke-confirm-input {
  margin-top: var(--space-lg);
}

.nuke-confirm-input label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.nuke-confirm-input label strong {
  font-family: monospace;
  color: #fc8181;
  background: rgba(229, 62, 62, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.nuke-confirm-input input {
  width: 100%;
  padding: var(--space-md);
  font-family: monospace;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

.nuke-confirm-input input:focus {
  border-color: #fc8181;
  background: rgba(255, 255, 255, 0.08);
}

.nuke-confirm-input input::placeholder {
  color: var(--color-text-subtle);
}

.nuke-user-info {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.nuke-user-label {
  color: var(--color-text-subtle);
  margin-right: var(--space-sm);
}

.nuke-user-value {
  color: var(--color-text);
  font-family: monospace;
}

/* ============================================
   EMAIL TEMPLATES LIST & EDITOR
   ============================================ */

.templates-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 400px;
  overflow-y: auto;
}

.template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.template-item-content {
  flex: 1;
  min-width: 0;
}

.template-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.template-item-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.template-item-description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Template Editor */
.template-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.template-help {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-top: var(--space-xs);
}

.template-tabs {
  display: flex;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.template-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-tab:hover {
  color: var(--color-text);
}

.template-tab.active {
  background: var(--color-accent);
  color: var(--color-text);
}

.template-panel {
  min-height: 200px;
}

.template-panel textarea {
  width: 100%;
  min-height: 200px;
  max-height: 300px;
  padding: var(--space-md);
  font-family: monospace;
  font-size: var(--text-xs);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: var(--transition-fast);
}

.template-panel textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.template-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Gmail-style email preview */
.gmail-preview {
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #dadce0;
}

.gmail-header {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #dadce0;
}

.gmail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4D6473, #2C4857);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  flex-shrink: 0;
}

.gmail-sender-info {
  flex: 1;
  min-width: 0;
}

.gmail-sender-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.gmail-sender-name {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
}

.gmail-sender-email {
  font-size: 12px;
  color: #5f6368;
}

.gmail-date {
  font-size: 12px;
  color: #5f6368;
  margin-left: auto;
}

.gmail-to {
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
}

.gmail-subject {
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 400;
  color: #202124;
  border-bottom: 1px solid #dadce0;
  background: #f8f9fa;
}

.gmail-body {
  background: white;
}

.gmail-iframe {
  width: 100%;
  min-height: 250px;
  max-height: 350px;
  border: none;
  display: block;
}

.template-placeholders {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.placeholders-title {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.placeholders-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.placeholders-list code {
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(199, 132, 59, 0.15);
  color: var(--color-accent);
  border-radius: 4px;
}

/* ============================================
   RESPONSE TEMPLATES MANAGEMENT
   ============================================ */

/* Response template editor */
.response-template-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Form group header with label and delete button */
.form-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.form-group-header label {
  margin-bottom: 0 !important;
}

.response-template-editor .form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Delete button in editor - same hover as list delete */
.btn-delete-template-editor:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.response-template-editor .form-group input,
.response-template-editor .form-group textarea {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-fast);
}

.response-template-editor .form-group input:focus,
.response-template-editor .form-group textarea:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.response-template-editor .form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Add Response Template Button (orange, matches primary style) */
.btn-add-response-template {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-md);
}

.btn-add-response-template svg {
  flex-shrink: 0;
}

/* Delete icon button for response templates */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-delete-response-template:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Delete button (danger style) */
.btn-danger {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #fff;
  background: #ef4444;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Template item actions container (delete + chevron) */
.template-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Response textarea wrapper with inline template selector */
.response-textarea-wrapper {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
}

.response-textarea-wrapper:focus-within {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.response-textarea-wrapper textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-md);
  padding-bottom: 56px; /* Space for the template selector */
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
}

.response-textarea-wrapper textarea::placeholder {
  color: var(--color-text-subtle);
}

/* Template selector container - positioned at bottom-right inside textarea */
.template-select-container {
  position: absolute;
  bottom: var(--space-sm);
  right: 16px; /* Space for scrollbar */
  left: auto;
}

.template-select-inline {
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.template-select-inline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--color-text);
}

.template-select-inline:focus {
  border-color: var(--color-accent);
}

.template-select-inline option {
  background: var(--color-base);
  color: var(--color-text);
  padding: var(--space-sm);
}
