:root{ --sidebar-w: 280px; --sidebar-collapsed: 72px; --sidebar-transition: 0.25s ease; }
html, body { height: 100%; }
body { background: #f6f7fb; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar-collapsed);
  background: #0b1220;
  color: #d9e1ff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--sidebar-transition);
}
.sidebar.is-expanded {
  width: var(--sidebar-w);
}
.sidebar .brand {
  font-weight: 700;
  letter-spacing: .2px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .brand small { display: block; font-weight: 500; }
.sidebar .brand i { font-size: 1.4rem; }
.sidebar .brand small { opacity: 0; transition: opacity var(--sidebar-transition); }
.sidebar .nav-section-title { opacity: 0; transition: opacity var(--sidebar-transition); }
.sidebar-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity var(--sidebar-transition), max-width var(--sidebar-transition);
}
.sidebar.is-expanded .sidebar-text {
  opacity: 1;
  max-width: 220px;
}
.sidebar.is-expanded .brand small { opacity: 1; }
.sidebar.is-expanded .nav-section-title { opacity: .7; }
.sidebar a.nav-link {
  color: rgba(217,225,255,.88);
  padding: 10px 16px;
  border-radius: 10px;
  margin: 4px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar a.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.nav-link.active { background: rgba(99, 102, 241, .35); color: #fff; }
.sidebar .nav-section-title {
  padding: 14px 18px 6px;
  font-size: .82rem;
  text-transform: uppercase;
}

.main { flex: 1; min-width: 0; }
.topbar {
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.content { padding: 18px; }

.card-soft {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15,23,42,.05);
}

.fc .fc-toolbar-title { font-size: 1.15rem; }
.fc { background: #fff; border-radius: 16px; padding: 10px; }

.badge-role { background: rgba(99, 102, 241, .12); color: #3730a3; border: 1px solid rgba(99,102,241,.25); }
.form-hint { font-size: .85rem; opacity: .75; }
.table thead th { font-size: .85rem; opacity: .85; }
.text-bg-notify { background-color: #f59e0b; color: #fff; }

.table tbody tr[role="button"] { cursor: pointer; }

.form-control {
  color: #0f172a;
}
.form-control:disabled {
  opacity: 1;
  background-color: #f3f4f6;
  color: #475569;
}
.phone-input {
  position: relative;
}
.phone-input .phone-mask {
  display: none;
}
.phone-input .form-control {
  background-color: transparent;
}
.phone-input .form-control:disabled {
  background-color: #f3f4f6;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: .6rem;
}
.notification-list {
  display: grid;
  gap: 12px;
}
.notification-item {
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.notification-item.unread {
  border-color: rgba(245, 158, 11, .6);
  background: #fff7ed;
}
.notification-meta {
  font-size: .85rem;
  color: #64748b;
}
.notification-files {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.notification-appointment {
  border: 1px dashed rgba(15,23,42,.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fafc;
}
.notification-file-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  text-align: left;
}
.notification-file-link:hover {
  text-decoration: underline;
}

.comment-list {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.comment-text {
  white-space: pre-wrap;
  margin-top: 10px;
  color: #334155;
  font-size: .92rem;
}
.comment-stack {
  display: grid;
  gap: 12px;
}
.comment-card {
  padding: 12px 14px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 12px;
  background: #fff;
}
.comment-author {
  font-weight: 600;
}
.comment-files {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.comment-existing-files {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.comment-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-file-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
}
.comment-file-remove {
  border: 0;
  background: transparent;
  color: #ef4444;
  padding: 0;
}
.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15,23,42,.06);
}
.comment-compose {
  margin-top: 14px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.comment-compose textarea {
  border: 0;
  padding: 0;
  resize: vertical;
}
.comment-compose textarea:focus {
  box-shadow: none;
}
.comment-selected-files {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.comment-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border: 1px dashed rgba(15,23,42,.15);
  border-radius: 8px;
  font-size: .85rem;
  color: #475569;
}
.comment-selected-remove {
  border: 0;
  background: transparent;
  color: #ef4444;
  padding: 0;
}
.comment-file-btn input[type="file"] {
  display: none;
}
.comment-compose-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.comment-attach {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #2563eb;
  background: #f8fafc;
}
.comment-attach input {
  display: none;
}
.comment-send {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.appt-modal-dialog {
  max-width: 980px;
}
.appt-modal-content {
  border-radius: 16px;
}
.appt-modal-header {
  border-bottom: 0;
  padding: 18px 20px 8px;
}
.appt-modal-body {
  padding: 0 20px 20px;
}
.appt-section {
  border-bottom: 1px solid rgba(15,23,42,.08);
  padding-bottom: 16px;
}
.appt-field {
  margin-bottom: 12px;
}
.appt-label {
  font-size: .82rem;
  color: #6b7280;
}
.appt-value {
  font-weight: 600;
}
.appt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.appt-status-badge {
  border: 1px solid transparent;
  font-weight: 600;
}
.appt-status-planned {
  background: #24395B;
  color: #007BFF;
  border-color: #24395B;
}
.appt-status-canceled {
  background: #2A3E45;
  color: #A9D1DC;
  border-color: #2A3E45;
}
.appt-status-completed {
  background: #233B2E;
  color: #33CF7A;
  border-color: #233B2E;
}
.status-pill-active {
  background: #233B2E;
  color: #33CF7A;
}
.status-pill-inactive {
  background: #2A3E45;
  color: #A9D1DC;
}
.appt-multi.is-readonly {
  background-color: #f8fafc;
  cursor: default;
}
.appt-comments {
  margin-top: 18px;
}
.appt-comments-header {
  cursor: pointer;
}

.calendar-day-empty {
  background-color: rgba(42, 62, 69, 0.18) !important;
}
.calendar-day-off {
  background-color: rgba(239, 68, 68, 0.15) !important;
}

.modal-backdrop.show {
  opacity: 0.12;
}
