/* KaamEasy — shared premium shell for client subpages (use with client-dashboard.css + body.cd-dash) */

/* Booking page: keep original gradient + form styling from client_style.css */
body.cd-dash.page-booking {
  background: linear-gradient(180deg, #eef4ff 0%, #f5f7fa 32%) !important;
  color: #1a1d26;
}

/* Secondary button used on profile / quick links */
.cd-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: #fff;
  border: 1px solid #dde8e5;
  color: #0b7f73;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.cd-btn-secondary:hover {
  border-color: #0f9d8f;
  background: #f8fffe;
  color: #0a5c52;
}

.cd-page-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.cd-page-head {
  margin-bottom: 24px;
}

.cd-page-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.cd-page-lead {
  margin: 0;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.5;
}

/* White content panel */
.cd-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2ebe9;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.cd-panel h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

/* Booking history list */
.cd-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cd-history-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid #e2ebe9;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  text-align: left;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.cd-history-card:hover {
  border-color: #c5e8e0;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.cd-history-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0b7f73;
}

.cd-history-card p {
  margin: 6px 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
}

.cd-history-card strong {
  color: #334155;
}

.cd-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 0.95rem;
}

/* Profile grid */
.cd-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .cd-profile-grid {
    grid-template-columns: 1fr;
  }
}

.cd-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.cd-profile-hero .cd-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(145deg, #0f9d8f, #1273de);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
}

.cd-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .cd-stat-row {
    grid-template-columns: 1fr;
  }
}

.cd-mini-stat {
  background: #f8faf9;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e8eeec;
  text-align: center;
}

.cd-mini-stat .v {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0b7f73;
  margin: 0;
}

.cd-mini-stat .l {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 6px 0 0;
  font-weight: 700;
}

/* Wallet page */
.cd-wallet-balance {
  font-size: 2rem;
  font-weight: 800;
  color: #0b7f73;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}

.cd-input {
  width: 100%;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dde8e5;
  font: inherit;
  margin-bottom: 12px;
}

.cd-input:focus {
  outline: none;
  border-color: #8fd4c4;
  box-shadow: 0 0 0 3px rgba(15, 157, 143, 0.12);
}

/* Help center form */
.cd-form .cd-input,
.cd-form textarea,
.cd-form select {
  width: 100%;
  max-width: none;
  margin-bottom: 14px;
}

.cd-form textarea {
  min-height: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dde8e5;
  font: inherit;
}

.cd-btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #0f9d8f, #17b897);
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 157, 143, 0.3);
}

.cd-btn-solid:hover {
  filter: brightness(1.05);
}

/* Booking details actions */
.cd-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.cd-action-grid button {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dde8e5;
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.cd-action-grid button:hover {
  border-color: #0f9d8f;
  color: #0b7f73;
}

#map {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2ebe9;
  margin: 20px 0 !important;
  max-width: 100%;
}

/* Chat with driver (client) */
.cd-chat-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.cd-chat-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2ebe9;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.cd-chat-messages {
  height: min(52vh, 420px);
  overflow-y: auto;
  border: 1px solid #e8eeec;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #f8faf9;
}

.cd-chat-msg {
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 14px;
  max-width: 82%;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.cd-chat-msg.client {
  margin-left: auto;
  text-align: right;
  background: linear-gradient(135deg, #0f9d8f, #1273de);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.cd-chat-msg.driver {
  margin-right: auto;
  background: #fff;
  color: #334155;
  border: 1px solid #e2ebe9;
  border-bottom-left-radius: 4px;
}

.cd-chat-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.cd-chat-input-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dde8e5;
  font: inherit;
}

.cd-chat-input-row input:focus {
  outline: none;
  border-color: #8fd4c4;
  box-shadow: 0 0 0 3px rgba(15, 157, 143, 0.12);
}

.cd-chat-input-row button {
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #0f9d8f, #17b897);
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 157, 143, 0.28);
}

.cd-chat-input-row button:hover {
  filter: brightness(1.05);
}
