/* ========================================
   ULTIMED - MAIN STYLESHEET
   Merged from all page-specific CSS files
   ======================================== */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  
  /* Colors */
  --primary: #045854;
  --accent: #045854;
  --accent-orange: #c24d19;
  --orange: #C24D19;
  --page-bg: #FFF6EE;
  --main-bg: #FFF6EE;
  --card-bg: #ffffff;
  --card: #ffffff;
  --bg: #fff6ee;
  --muted: #7d9a95;
  --border: #f3dbd1;
  --border-light: #f3dbd1;
  
  /* Buttons */
  --btn-start: #EE6326;
  --btn-end: #B23701;
  
  /* Typography */
  --instrument-font-family: "Instrument Sans-SemiBold", Helvetica;
  --body-font-size: 14px;
  --btn-font-size: 14px;
  
  /* Misc */
  --radius: 12px;
  --shdw: 0px 1px 4px 0px rgba(194, 77, 25, 0.1);
}

/* ========================================
   BASE & RESET
   ======================================== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--instrument-font-family);
  font-size: var(--body-font-size);
  background: var(--main-bg);
  color: #043540;
  overflow-x: hidden !important;
}

a {
  text-decoration: none;
  color: inherit;
}

.btn {
  font-size: var(--btn-font-size);
}

/* ========================================
   FORM VALIDATION (from styleguide.css)
   ======================================== */
.invalid-feedback {
  display: block !important;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.675rem;
  color: #dc3545;
}

.form-control.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8-.4-.4-.4.4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.input-group .form-control.is-invalid {
  border-right: none;
}

.input-group .form-control.is-invalid + .btn {
  border-color: #dc3545;
}

/* ========================================
   SIDEBAR (DESKTOP)
   ======================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1040;
}

.sidebar__logo {
  background: #fff;
  padding: 16px 22px;
  border-bottom: 1px solid #eee;
}

.sidebar__logo img {
  width: 150px;
}

.sidebar__nav {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar__link {
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar__link--active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar__footer {
  margin-top: auto;
  padding: 18px;
}

/* ========================================
   MOBILE SIDEBAR (OFFCANVAS)
   ======================================== */
#mobileSidebar.offcanvas-start {
  background: var(--accent);
  color: #fff;
}

#mobileSidebar .offcanvas-header {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.offcanvas-logo {
  width: 150px;
  margin-right: auto;
}

.sidebar-menu-mobile .nav-link {
  color: #fff;
  padding: 14px 12px;
  border-radius: 8px;
  font-size: 18px;
}

.sidebar-menu-mobile .nav-link:hover,
.sidebar-menu-mobile .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-menu-mobile .logout {
  margin-top: 20px;
}

.offcanvas {
  width: 260px !important;
  background: var(--accent);
  color: #fff;
}

.offcanvas-body .nav-link {
  color: #fff !important;
  padding: 12px 4px;
}

/* ========================================
   HEADER (FIXED)
   ======================================== */
.app-header {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  top: 0;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px;
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .app-header {
    left: 0;
  }
}

.hamburger {
  display: none;
  background: none;
  border: 0;
  margin-right: auto;
  padding: 6px;
}

@media (max-width: 991.98px) {
  .hamburger {
    display: inline-flex;
  }
}

.header__right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
}

.header__user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.header__name {
  color: #043540;
  font-weight: 600;
}

.header__role {
  color: var(--orange);
  font-size: 12px;
}

/* ========================================
   PAGE LAYOUT
   ======================================== */
.page-container {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
  min-height: 100vh;
  background: var(--main-bg);
  max-width: 100% !important;
  overflow-x: hidden !important;
  margin-top: 20px !important;
}

@media (max-width: 991.98px) {
  .page-container {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

.page-inner {
  padding: 22px;
}

.page-body {
  margin-left: var(--sidebar-w);
  padding: 100px 24px 40px;
  min-height: 100vh;
}

@media (max-width: 991px) {
  .page-body {
    margin-left: 0;
    padding-top: 120px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ========================================
   PAGE HEADER ROW (Title + Actions)
   ======================================== */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h1,
.page-header h2 {
  margin: 0;
  color: var(--primary);
}

/* ========================================
   ACTIONS ROW
   ======================================== */
.actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions-right .search-box {
  width: 320px;
  max-width: 40vw;
  min-width: 160px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
}

.search-box {
  min-width: 320px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
}

.actions-right .btn-filter {
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  background: linear-gradient(181deg, #fff, #FFFAF4);
}

.btn-filter {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
}

.actions-right .btn-add {
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
}

.btn-add {
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
}

/* ========================================
   MEMBERSHIP STYLES
   ======================================== */
.membership-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.membership-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.membership-card .card-body {
  padding: 16px;
  flex: 1;
}

.membership-card h5 {
  font-weight: 700;
  font-size: 14px;
  color: #043540;
}

.card-actions {
  padding: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.membersip-add-btn {
  border: 1px solid #e0591e !important;
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
}

.accent-orange {
  color: var(--accent-orange);
}

.image-preview {
  height: 200px;
  border-radius: 12px;
  background: #ddd url('../img/mplan_1.png') center/cover;
}

/* ========================================
   PATIENT LIST STYLES
   ======================================== */
.table-wrapper {
  height: calc(100vh - var(--header-h) - 130px);
  overflow-y: auto;
  padding-right: 8px;
}

.table-responsive-inline {
  overflow-x: auto;
}

.card-panel {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(194, 77, 25, 0.1);
  min-width: 900px;
}

table.patients {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

table.patients thead th {
  color: var(--orange);
  font-weight: 600;
  padding: 10px;
}

table.patients tbody td {
  padding: 12px 10px;
  border-top: 1px solid var(--border-light);
  color: #043540;
}

.user-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-size: cover;
}

.member-badge {
  padding: 4px 8px;
  border-radius: 8px;
}

.member-badge.basics {
  background: #ffe9e0;
}

.member-badge.plus {
  background: #A3D1E7;
}

.member-badge.corporate {
  background: #F18A5C;
}

/* ========================================
   PATIENT PROFILE STYLES
   ======================================== */
.profile-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #eee;
}

.profile-name {
  color: #043540;
  font-weight: 700;
}

.name {
  font-weight: 700;
  margin-bottom: 4px;
}

.icon-sm {
  width: 18px;
  opacity: 0.9;
  vertical-align: middle;
  margin-right: 6px;
}

.small-card {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: var(--card-bg);
}

.small-card-type {
  font-size: 12px;
  color: var(--accent-orange);
  font-weight: 600;
}

.small-card-title {
  font-weight: 700;
  color: var(--accent);
  margin-top: 6px;
}

.small-date {
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 700;
}

.badge-gold {
  background: #FFD897;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.patient-tabs {
  display: flex;
  gap: 8px;
  border-bottom: none;
}

.patient-tabs .nav-link {
  background: #045854;
  color: white;
  border-radius: 20px;
  padding: 8px 24px;
  font-weight: 600;
  border: none;
  margin-right: 8px;
}

.patient-tabs .nav-link.active {
  background: #C24D19 !important;
  color: #fff !important;
}

.patient-tabs .nav-link.inactive {
  background: #045854;
  color: #fff !important;
}

.search-input {
  border-radius: 10px;
  border: 1px solid #dfd3ca;
  padding: 10px;
  background: #fff;
  height: 44px;
}

.appointment-card {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eee;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.appointment-type {
  color: #C24D19;
  font-size: 13px;
  font-weight: 600;
}

.appointment-title {
  font-size: 16px;
  font-weight: 700;
  color: #043540;
}

.location-sm {
  width: 22px;
  height: 22px;
  display: inline-block;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* ========================================
   APPOINTMENT STYLES
   ======================================== */
.pill {
  background: #fff;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  color: var(--accent);
}

.pill.active {
  background: var(--btn-start);
  color: #fff;
  border-color: transparent;
}

.pill.inactive {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.appointments-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 15px;
}

@media (max-width: 1199px) {
  .appointments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .appointments-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .appointments-grid {
    grid-template-columns: 1fr;
  }
}

.appt-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.appt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.tag {
  background: #FFECD2;
  color: #C24D19;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.date-box {
  background: #C24D19;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.date-label {
  font-size: 10px;
}

.date-day {
  font-size: 14px;
  font-weight: 700;
}

.appt-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.divider {
  width: 100%;
  height: 1px;
  background: #F3DBD1;
}

.appt-title {
  font-size: 16px;
  font-weight: 700;
  color: #043540;
}

.appt-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-row {
  display: flex;
  gap: 10px;
}

.meta-row img {
  width: 18px;
}

.meta-label {
  color: #C24D19;
  font-size: 12px;
  font-weight: 600;
}

.meta-text {
  font-size: 14px;
  color: #043540;
}

.btn-light-sm {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  padding: 8px 10px;
  font-size: 12px;
  background: linear-gradient(181deg, #fff, #FFFAF4);
  color: #043540;
}

/* ========================================
   GP CLINICS STYLES
   ======================================== */

/* Clinics Grid */
.clinics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 12px;
}

/* Clinic Card */
.clinic-card {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

/* Clinic Image */
.clinic-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* Clinic Body */
.clinic-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.clinic-title {
  font-size: 14px;
  font-weight: 700;
  color: #043540;
  margin: 0 0 8px;
}

.clinic-meta {
  flex: 1;
  color: #043540;
  font-size: 13px;
}

.meta-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.meta-line img {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  flex-shrink: 0;
}

.meta-line address {
  font-style: normal;
  color: #043540;
  line-height: 1.3;
  margin: 0;
}

.meta-label {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.meta-value {
  color: #043540;
  font-size: 13px;
}

.close-note {
  color: #6b6b6b;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 0;
}

/* Clinic Actions */
.clinic-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Responsive - Clinics Grid */
@media (max-width: 1199.98px) {
  .clinics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991.98px) {
  .clinics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .clinics-grid {
    grid-template-columns: 1fr;
  }
  .clinic-image img {
    height: 140px;
  }
}

/* ========================================
   GP CLINIC ADD/EDIT FORM STYLES
   ======================================== */

.gp-form {
  padding: 0;
}

/* Image Upload Preview (specific to GP clinic forms) */
.gp-form .upload-preview {
  width: 100%;
  max-width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.gp-form .btn-upload {
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-block;
  margin-top: 10px;
}

.gp-form .btn-upload:hover {
  opacity: 0.9;
}

.gp-form .btn-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Form Footer (for GP clinic forms) */
.gp-form .form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.gp-form .btn-cancel {
  background: #fff;
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 8px;
  color: #043540;
  cursor: pointer;
  font-size: 14px;
}

.gp-form .btn-cancel:hover {
  background: #f9f9f9;
}

.gp-form .btn-submit {
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.gp-form .btn-submit:hover {
  opacity: 0.9;
}

/* ======================================== */

.btn-call-now {
  width: 100%;
  border: none;
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  background: linear-gradient(180deg, var(--btn-start), var(--btn-end));
  color: #fff;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 0 20px;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
}

.stat-card span {
  color: var(--accent);
  font-size: 12px;
}

.stat-card h2 {
  margin: 10px 0;
  color: var(--primary);
  text-align: center;
}

/* ========================================
   LOGIN STYLES
   ======================================== */
.input-border {
  border: 1px solid #C24D19;
  height: 44px;
}

.login-btn {
  height: 44px;
  background: linear-gradient(180deg, rgba(238, 99, 38, 1) 0%, rgba(178, 55, 1, 1) 100%);
  border-radius: 8px;
  border: none;
}

.login-btn:hover {
  opacity: .9;
}

.login-btn:active {
  opacity: .8;
}

.login-box {
  width: 100%;
  max-width: 360px;
  border-radius: 12px;
}

.password-toggle {
  border-color: #C24D19 !important;
}

/* ========================================
   FORM STYLES
   ======================================== */
.card {
  border-radius: 14px;
  border: 1px solid var(--border);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  border-radius: 10px;
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  font-size: 14px !important;
}

/* ========================================
   BUTTONS
   ======================================== */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

.btn-primary {
  background: linear-gradient(180deg, #ee6326, #b23701);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
}

.btn-outline-secondary {
  border-radius: 8px;
  border: 1px solid #E8D9D0 !important;
}

.btn-danger {
  background: linear-gradient(#EE6326, #B23701);
  border: none;
}

.btn-ghost {
  background: none;
  border: 0;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 25px;
}

.ulti-pagination {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.page-btn {
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 14px;
  color: #043540;
  cursor: pointer;
}

.page-item.active .page-btn {
  color: var(--orange);
  font-weight: 700;
}

.page-item.disabled .page-btn {
  opacity: 0.4;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 991.98px) {
  /* Hide desktop sidebar */
  aside.sidebar {
    display: none !important;
  }

  /* Ensure offcanvas is on top */
  .offcanvas {
    z-index: 2000 !important;
  }

  .offcanvas-backdrop {
    z-index: 1999 !important;
  }
}

@media (max-width: 767px) {
  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .custom-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
  }
}

@media (max-width: 576px) {
  .page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    width: 100%;
    margin-bottom: 4px;
  }

  .actions-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .search-box {
    flex: 1;
    min-width: 160px !important;
  }

  .btn-filter,
  .btn-add {
    height: 40px;
    font-size: 13px;
    white-space: nowrap;
  }

  .pill {
    padding: 6px 10px;
    white-space: nowrap;
    font-size: 13px;
  }

  .appt-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ========================================
   VIDEO CALL INTERFACE (AGORA)
   ======================================== */

.video-call-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-call-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
}

.video-call-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.video-call-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.btn-close-video {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.btn-close-video:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-call-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.video-remote-container {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  position: relative;
}

.video-remote-container video,
.video-local-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-local-container {
  position: absolute;
  bottom: 80px;
  right: 20px;
  width: 200px;
  height: 150px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #fff;
  z-index: 10;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
  font-size: 16px;
}

.video-call-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.btn-control {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-control:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.btn-control.active {
  background: rgba(255, 255, 255, 0.4);
}

.btn-control.btn-danger {
  background: #dc3545;
}

.btn-control.btn-danger:hover {
  background: #c82333;
}

@media (max-width: 768px) {
  .video-local-container {
    width: 120px;
    height: 90px;
    bottom: 60px;
    right: 10px;
  }

  .btn-control {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
}

/* Page Layout */

.page-inner{ padding:22px }


/* VIDEO + CHAT */
.videocall-layout{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
}

/* VIDEO */
.video-box{
  background:#000;
  border-radius:16px;
  position:relative;
  overflow:hidden;
}
.video-main{
  width:100%;
  height:520px;
  object-fit:cover;
}
.video-thumb{
  position:absolute;
  top:16px;
  right:16px;
  width:90px;
  height:90px;
  border-radius:12px;
}
.video-controls{
  position:absolute;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:12px;
}
.video-controls button{
  width:44px;
  height:44px;
  border-radius:50%;
  border:none;
  background:#fff;
}
.video-controls .end{
  background:#e53935;
  color:#fff;
}

/* CHAT */
.chat-box{
  background:#fdebd2;
  border-radius:16px;
  display:flex;
  flex-direction:column;
  padding:16px;
}
.chat-messages{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.msg{
  padding:10px 14px;
  border-radius:10px;
  max-width:80%;
}
.msg.you{
  background:#fde0d2;
  align-self:flex-end;
}
.msg.other{
  background:#fff;
}
.chat-input{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.chat-input input{
  flex:1;
  padding:10px;
  border-radius:8px;
  border:1px solid var(--border);
}
.chat-input button{
  background:var(--accent);
  color:#fff;
  border:none;
  padding:0 16px;
  border-radius:8px;
}

/* RESPONSIVE */
@media(max-width:991px){
  .sidebar{display:none}
  .app-header{left:0}
  .page-body{margin-left:0}
  .videocall-layout{
    grid-template-columns:1fr;
  }
  .video-main{height:360px}
}

@media(max-width:575px){
  .video-main{height:260px}
  .video-controls{
    bottom:10px;
  }
}
