/* =========================================================================
   FESTYO PROVIDER DASHBOARD - PLAIN COMPATIBLE CSS
   ========================================================================= */

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

html,
body {
  width: 100%;
}

body {
  font-family: Poppins, Arial, sans-serif;
  background: #f8f9fe;
  color: #2d3436;
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: #111111;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: #d63031; }
.text-success { color: #00b894; }
.text-primary { color: #111111; }
.text-muted { color: #8395a7; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-weight-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.p-5 { padding: 32px; }
.py-5 { padding-top: 32px; padding-bottom: 32px; }
.px-4 { padding-left: 24px; padding-right: 24px; }
.px-5 { padding-left: 32px; padding-right: 32px; }
.w-100 { width: 100%; }
.d-block { display: block; }
.d-flex { display: flex; }
.block { display: block; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.mx-3 { margin-left: 16px; margin-right: 16px; }
.my-3 { margin-top: 16px; margin-bottom: 16px; }
.ml-2 { margin-left: 8px; }
.mr-2 { margin-right: 8px; }
.border-bottom { border-bottom: 1px solid #edeff2; }
.grid-full { grid-column: 1 / -1; }
.hidden { display: none !important; }

/* Loader */
.flex-center { display: flex; justify-content: center; align-items: center; }
body.is-loading { overflow: hidden; }
#global-loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.92);
  z-index: 9999;
  display: none;
  flex-direction: column;
}
#global-loader.active { display: flex; }
.loading-text {
  color: #111111;
  margin-top: 14px;
  z-index: 99999;
  font-weight: 600;
  text-align: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8e8e8;
  border-top: 4px solid #111111;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner-sm { width: 20px; height: 20px; }
.spinner-centered { margin: auto; }
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Badge + Avatar */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-success { background: rgba(0, 184, 148, 0.14); color: #00b894; }
.badge-danger { background: rgba(214, 48, 49, 0.14); color: #d63031; }
.badge-primary { background: rgba(0, 0, 0, 0.1); color: #111111; }
.badge-warning { background: rgba(253, 203, 110, 0.24); color: #b38827; }
.badge-count {
  background: #d63031;
  color: #ffffff;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 8px;
  font-weight: 600;
}
.badge-count-inline { margin: 0; }

.avatar-sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 40px;
}
.avatar-md {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 60px;
}
.avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.brand-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.brand-logo-small { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s ease;
}
.btn ion-icon { font-size: 18px; }
.btn-primary { background: #111111; color: #ffffff; }
.btn-primary:hover { background: #000000; }
.btn-outline-primary { background: transparent; color: #111111; border: 1px solid #111111; }
.btn-outline-primary:hover { background: #f0f0f0; }
.btn-outline-secondary { background: transparent; color: #666666; border: 1px solid #d8dbe0; }
.btn-outline-secondary:hover { background: #f2f4f8; }
.btn-success { background: #00b894; color: #ffffff; }
.btn-danger { background: #d63031; color: #ffffff; }
.btn-danger:hover { background: #b02324; }
.btn-link { background: transparent; border: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: #8395a7;
  font-size: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-icon:hover { background: #edeff2; color: #111111; }
.btn-icon-bordered { border: 1px solid #edeff2; }
.rounded-circle { border-radius: 50%; }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Forms */
.separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: #8395a7;
  font-size: 12px;
  font-weight: 500;
}
.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #edeff2;
}
.separator span { padding: 0 10px; }

.form-group { margin-bottom: 16px; position: relative; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: #2d3436; }
.form-group ion-icon { position: absolute; left: 14px; top: 38px; color: #8395a7; font-size: 18px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
.custom-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #edeff2;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfbfc;
  color: #2d3436;
}
.form-group ion-icon + input { padding-left: 42px; }
input:focus,
textarea:focus,
.custom-select:focus {
  outline: none;
  border-color: #111111;
  background: #ffffff;
  box-shadow: 0 0 0 3px #e8e8e8;
}
.custom-select[multiple] { height: auto; padding: 8px; }
.custom-select[multiple] option { padding: 8px 12px; border-radius: 4px; margin-bottom: 2px; }
.custom-select[multiple] option:checked { background: #f0f0f0; color: #111111; }
.bg-light { background: #f0f2f5 !important; }

input:disabled,
textarea:disabled {
  color: #5f6772;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.captcha-wrap {
  margin: 14px 0 16px;
  display: flex;
  justify-content: center;
}

.captcha-wrap .h-captcha {
  transform-origin: center;
}

.login-method-selector,
.login-email-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #edeff2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Auth Layout */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #111111;
  background-image: linear-gradient(135deg, #111111 0%, #000000 100%);
}
.auth-card {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 40px 30px;
}

/* Dashboard */
.dashboard-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid #edeff2;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #edeff2;
}
.sidebar-header h2 { font-size: 22px; color: #2d3436; }
.sidebar-header h2 span { color: #111111; }
.sidebar-nav { padding: 20px 16px; flex-grow: 1; overflow-y: auto; }
.nav-title { font-size: 11px; font-weight: 600; color: #8395a7; margin: 0 8px 12px; letter-spacing: 1px; }
.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #2d3436;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}
.nav-item ion-icon { font-size: 20px; margin-right: 12px; color: #8395a7; }
.nav-item:hover { background: #f0f0f0; color: #111111; }
.nav-item:hover ion-icon { color: #111111; }
.nav-item.active { background: #111111; color: #ffffff; }
.nav-item.active ion-icon { color: #ffffff; }
.sidebar-footer { padding: 16px; border-top: 1px solid #edeff2; }
.close-sidebar { background: none; border: none; font-size: 24px; cursor: pointer; color: #8395a7; }

.main-content {
  flex-grow: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - 260px);
}
.top-header {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid #edeff2;
  display: flex;
  align-items: center;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.menu-toggle { background: none; border: none; font-size: 26px; cursor: pointer; margin-right: 16px; color: #2d3436; }
.header-title h2 { font-size: 18px; margin: 0; }
.content-body { padding: 30px; max-width: 1280px; margin: 0 auto; width: 100%; flex-grow: 1; }

/* Cover */
.cover-card { position: relative; overflow: hidden; padding-bottom: 60px; }
.banner-img { width: 100%; height: 200px; object-fit: cover; display: block; background: #e0e0e0; }
.edit-banner-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.edit-banner-btn:hover { background: #111111; }
.provider-avatar-box { position: absolute; bottom: 10px; left: 30px; width: 100px; height: 100px; border-radius: 50%; }
.edit-logo-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #111111;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #ffffff;
}
.edit-logo-btn:hover { background: #000000; }

/* Tables */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th,
.table td { padding: 14px 16px; border-bottom: 1px solid #edeff2; }
.table th { background: #fbfbfc; font-weight: 600; color: #8395a7; font-size: 12px; text-transform: uppercase; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fcfcfc; }
.service-desc-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Cards/Grids */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e0e0e0;
  height: 220px;
}
.gallery-item img,
.gallery-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.delete-media {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.8);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.gallery-item:hover .delete-media { opacity: 1; }

.job-card { padding: 20px; display: flex; flex-direction: column; }
.job-card h4 { font-size: 16px; margin-bottom: 8px; }
.job-card .salary { font-weight: 600; color: #00b894; margin-bottom: 12px; font-size: 13px; }
.job-card .meta { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #8395a7; margin-bottom: 12px; }
.job-card p { font-size: 13px; color: #2d3436; margin-bottom: 20px; max-height: 62px; line-height: 1.55; overflow: hidden; }
.job-actions { margin-top: auto; display: flex; gap: 10px; border-top: 1px solid #edeff2; padding-top: 15px; }

/* Chat */
.chat-layout { display: flex; height: calc(100vh - 150px); overflow: hidden; border: 1px solid #edeff2; }
.chat-sidebar { width: 300px; border-right: 1px solid #edeff2; background: #ffffff; display: flex; flex-direction: column; }
.conversation-list { overflow-y: auto; flex-grow: 1; }
.convo-item {
  padding: 15px;
  border-bottom: 1px solid #edeff2;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.convo-item:hover { background: #fbfbfc; }
.convo-item.active { background: #f0f0f0; }
.convo-meta { flex-grow: 1; min-width: 0; }
.convo-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; justify-content: space-between; }
.convo-time { font-size: 11px; color: #8395a7; }
.convo-last { font-size: 12px; color: #8395a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-item .avatar-sm {
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.chat-main { flex-grow: 1; background: #f8f9fe; display: flex; flex-direction: column; }
.chat-header { padding: 15px 20px; background: #ffffff; border-bottom: 1px solid #edeff2; display: flex; align-items: center; }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 75%; display: flex; flex-direction: column; }
.msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.msg-bubble-pending { opacity: 0.7; }
.msg-time { font-size: 11px; color: #8395a7; margin-top: 4px; }
.msg.received { align-self: flex-start; }
.msg.received .msg-bubble { background: #ffffff; color: #2d3436; border-bottom-left-radius: 4px; }
.msg.sent { align-self: flex-end; }
.msg.sent .msg-bubble { background: #111111; color: #ffffff; border-bottom-right-radius: 4px; }
.msg.sent .msg-time { text-align: right; }
.chat-input-area { padding: 15px 20px; background: #ffffff; border-top: 1px solid #edeff2; }
#chat-input-text { border-radius: 24px; padding: 12px 20px; background: #f8f9fe; }
.chat-empty-state { flex-direction: column; opacity: 0.5; }
.chat-empty-icon { font-size: 4rem; }
.chat-active-layout { height: 100%; display: flex; flex-direction: column; }
#chat-user-avatar {
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { opacity: 0; pointer-events: none; display: flex; z-index: -1; }
.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg { max-width: 700px; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid #edeff2; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 18px; }
.close-modal { background: none; border: none; font-size: 24px; color: #8395a7; cursor: pointer; }
.close-modal:hover { color: #d63031; }
.modal-body { padding: 24px; }
.applicants-modal-body { max-height: 70vh; overflow-y: auto; }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 250px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid #111111;
}
.toast ion-icon { font-size: 24px; }
.toast.success { border-left-color: #00b894; }
.toast.success ion-icon { color: #00b894; }
.toast.error { border-left-color: #d63031; }
.toast.error ion-icon { color: #d63031; }

/* Helper classes used by templates */
.status-icon { font-size: 3rem; }
.status-icon-error { opacity: 0.8; }
.status-icon-muted { opacity: 0.5; }
.status-icon-faint { opacity: 0.3; }
.empty-state-icon { font-size: 64px; color: #dddddd; }
.tiny-icon { font-size: 10px; }
.applicant-avatar-fallback { background: #dddddd; font-weight: bold; border-radius: 50%; }
.applicant-card { margin-bottom: 16px; padding: 16px; }
.applicant-header-row { display: flex; gap: 12px; align-items: flex-start; flex: 1; }
.applicant-avatar-wrap { flex-shrink: 0; }
.applicant-main-info { flex: 1; }
.applicant-name { margin: 0 0 4px 0; }
.applicant-phone { margin: 0; color: #666666; font-size: 14px; }
.applicant-status-badge { font-size: 12px; white-space: nowrap; }
.applicant-about { margin: 8px 0; color: #555555; font-size: 14px; }
.applicant-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eeeeee; }
.applicant-actions-row { display: flex; gap: 8px; }
.booking-info-grid { display: flex; gap: 2rem; }
.booking-info-col { flex: 1; }
.booking-event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

/* Responsive */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1); }
  .main-content { margin-left: 0; width: 100%; }
  .lg-hidden { display: block !important; }
}

@media (min-width: 992px) {
  .lg-hidden { display: none !important; }
}

@media (max-width: 768px) {
  .chat-layout { position: relative; height: calc(100vh - 120px); }
  .chat-sidebar {
    width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    transition: transform 0.3s ease;
  }
  .chat-sidebar.hidden-mobile { transform: translateX(-100%); }
  .chat-main { width: 100%; }
  .grid-cards { grid-template-columns: 1fr; gap: 14px; }
  .table th, .table td { padding: 10px 12px; }
  .convo-item {
    padding: 12px;
    gap: 10px;
  }
  .convo-name {
    font-size: 13px;
    gap: 8px;
  }
  .convo-time {
    flex-shrink: 0;
  }
  .convo-last {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .grid-form { grid-template-columns: 1fr; }
  .content-body { padding: 20px 15px; }
  .top-header { padding: 0 15px; }
  .auth-card { padding: 28px 20px; border-radius: 14px; }
  .captcha-wrap .h-captcha { transform: scale(0.92); }
  .booking-info-grid,
  .booking-event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .provider-avatar-box { left: 50%; transform: translateX(-50%); }
  .delete-media { opacity: 1; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .gallery-item { height: 150px; }
  .toast-container { right: 10px; left: 10px; bottom: 14px; }
  .toast { min-width: 0; width: 100%; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-content {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 86vh;
  }
  .btn,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  .custom-select { min-height: 46px; }
}
