/* assets/css/client.css - Client Portal Specific Styles */

.client-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.client-navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  position: sticky;
  top: 0;
  z-index: 100;
}

.client-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.client-nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.client-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.client-nav-link:hover {
  color: var(--primary, #e11d48);
  background: #f1f5f9;
}

.client-nav-link.active {
  color: var(--primary, #e11d48);
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.client-user-dropdown {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--xhost-gradient, linear-gradient(135deg, #ff1a40, #e11d48));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.client-main-content {
  flex: 1;
  padding: 40px 0 80px;
}

/* Dashboard Summary Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(225, 29, 72, 0.08);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: #fff1f2; color: #e11d48; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.amber { background: #fffbeb; color: #f59e0b; }
.stat-icon.purple { background: #faf5ff; color: #8b5cf6; }

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

/* Service Card & Table */
.panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 28px;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 24px;
}

/* Ticket Conversation Bubbles */
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.message-bubble {
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.message-bubble.client-msg {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.message-bubble.staff-msg {
  background: #fff1f2;
  border-color: #fecdd3;
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.message-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.badge-staff {
  background: #e11d48;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-client {
  background: #64748b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.message-time {
  font-size: 0.8rem;
  color: #64748b;
}

.message-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Status Badges */
.badge-status-open { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-status-answered { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-status-customer-reply { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-status-closed { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

.priority-low { color: #10b981; font-weight: 600; }
.priority-medium { color: #3b82f6; font-weight: 600; }
.priority-high { color: #f59e0b; font-weight: 700; }
.priority-urgent { color: #ef4444; font-weight: 800; }

@media (max-width: 768px) {
  .client-nav-inner {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 16px;
  }
  .client-nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Base UI utilities for Client Area */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.form-control, .form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.form-control:focus, .form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
}

.alert {
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}
.table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.92rem;
  color: #1e293b;
  vertical-align: middle;
}
.table tbody tr:hover {
  background: #f8fafc;
}

