/* M2 Retention Hub v2: independent visual skin for app.m2portifolio.online. */
:root {
  --r2-ink: #12151a;
  --r2-deep: #0b0d11;
  --r2-sidebar: #11141a;
  --r2-muted: #748078;
  --r2-line: #dfe5df;
  --r2-surface: #ffffff;
  --r2-bg: #eef2ee;
  --r2-accent: #d9ff43;
  --r2-accent-soft: #f1ffd0;
  --r2-radius: 18px;
  --r2-shadow: 0 16px 38px rgba(18, 21, 26, .07);
}

/* Application frame */
.app-shell {
  background: var(--r2-bg);
}

#app-sidebar.sidebar {
  width: 274px;
  padding: 22px 14px 16px;
  background:
    radial-gradient(circle at 14% 0, rgba(217, 255, 67, .12), transparent 18rem),
    linear-gradient(180deg, var(--r2-sidebar) 0%, #080a0e 78%, #07080b 100%);
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 18px 0 48px rgba(0, 0, 0, .12);
  transition: width .22s ease, padding .22s ease;
}

#app-sidebar .sidebar-head {
  padding: 4px 4px 21px;
  border-bottom-color: rgba(255, 255, 255, .1);
}

#app-sidebar .sidebar-brand-row {
  margin: 0 8px 19px;
}

#app-sidebar .sidebar-head p {
  color: #8f9691;
  font-size: 9px;
  letter-spacing: .08em;
}

#app-sidebar.sidebar nav {
  padding: 16px 0;
}

#app-sidebar .nav-item {
  min-height: 48px;
  margin-bottom: 4px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-left-width: 1px;
  border-radius: 14px;
  color: #aab2ac;
  font-size: 12px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

#app-sidebar .nav-item .nav-label {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: .01em;
}

#app-sidebar .nav-item .nav-icon,
#app-sidebar .nav-item .nav-icon svg {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

#app-sidebar .nav-item .nav-icon {
  color: #8c9690;
}

#app-sidebar .nav-item:hover {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .09);
  color: #fff;
  transform: translateX(2px);
}

#app-sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(217, 255, 67, .16), rgba(255, 255, 255, .05));
  border-color: rgba(217, 255, 67, .22);
  box-shadow: inset 3px 0 0 var(--r2-accent);
  color: #fff;
}

#app-sidebar .nav-item:hover .nav-icon,
#app-sidebar .nav-item.active .nav-icon {
  color: var(--r2-accent);
}

#app-sidebar .nav-section-toggle,
#app-sidebar .nav-toggle-all {
  color: #68726d !important;
  letter-spacing: 1.45px !important;
}

#app-sidebar .sidebar-foot {
  padding: 16px 8px 0;
  border-top-color: rgba(255, 255, 255, .1);
}

#app-sidebar.collapsed {
  width: 82px;
  padding-right: 10px;
  padding-left: 10px;
}

#app-sidebar.collapsed .sidebar-brand-row {
  margin-right: 0;
  margin-left: 0;
}

#app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

/* Top command bar */
.workspace {
  background:
    radial-gradient(circle at 96% 0, rgba(217, 255, 67, .15), transparent 25rem),
    linear-gradient(145deg, #f5f7f3 0%, #edf1ed 100%);
}

.topbar {
  min-height: 76px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(11, 13, 17, .96);
  color: #fff;
  box-shadow: 0 10px 28px rgba(11, 13, 17, .13);
}

.topbar strong {
  color: #fff;
  letter-spacing: .06em;
}

.topbar span {
  color: #a6b0a9;
}

.topbar button {
  color: #fff;
}

.content {
  padding: 34px;
  background-image: radial-gradient(rgba(18, 21, 26, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  scrollbar-color: var(--r2-accent) rgba(18, 21, 26, .08);
}

.page {
  max-width: 1540px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1,
.students-page-header h1 {
  color: var(--r2-ink);
  letter-spacing: -.055em;
}

.page-header h1::after,
.students-page-header h1::after {
  width: 54px;
  height: 5px;
  margin-top: 13px;
  background: var(--r2-accent);
  border-radius: 999px;
}

.page-header p,
.muted,
.panel-title p,
.metric-card small {
  color: var(--r2-muted);
}

/* Shared surfaces */
.metric-card,
.panel,
.settings-card,
.settings-panel,
.operational-form-panel,
.operational-list-panel,
.student-profile-panel,
.student-message-panel,
.leads-crm-panel,
.leads-attention-panel,
.reports-toolbar-panel,
.reports-delivery-panel,
.calendar-panel,
.goals-panel,
.followup-panel,
.journey-list-panel,
.modal-card {
  border: 1px solid var(--r2-line);
  border-radius: var(--r2-radius);
  box-shadow: var(--r2-shadow);
}

.metric-card,
.panel,
.settings-card,
.settings-panel,
.operational-form-panel,
.operational-list-panel,
.student-profile-panel,
.student-message-panel,
.leads-crm-panel,
.leads-attention-panel,
.reports-toolbar-panel,
.reports-delivery-panel,
.calendar-panel,
.goals-panel,
.followup-panel,
.journey-list-panel {
  background: rgba(255, 255, 255, .94);
}

.metric-card {
  overflow: hidden;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}

.metric-card::before {
  width: 52px;
  height: 5px;
  border-radius: 0 999px 999px 0;
  background: var(--r2-accent);
}

.metric-card:hover {
  box-shadow: 0 20px 42px rgba(18, 21, 26, .11);
  transform: translateY(-2px);
}

.metric-card span,
.panel h2,
.panel-title h2,
.settings-card h2,
.settings-panel h2 {
  color: var(--r2-ink);
}

.panel-title,
.settings-card > header,
.operational-form-panel > header,
.operational-list-panel > header {
  border-bottom-color: var(--r2-line);
}

.button,
.table-action,
.settings-savebar button,
.form-actions button,
.page-actions button {
  border-radius: 11px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.button.primary,
.primary,
.page-actions .primary,
.form-actions .primary {
  border-color: var(--r2-accent);
  background: var(--r2-accent);
  color: var(--r2-ink);
}

.button.primary:hover,
.primary:hover,
.page-actions .primary:hover,
.form-actions .primary:hover {
  border-color: #c6ed2e;
  background: #c6ed2e;
  box-shadow: 0 12px 22px rgba(166, 204, 31, .26);
  transform: translateY(-1px);
}

.button.secondary,
.secondary,
.table-action {
  border-color: var(--r2-line);
  background: #fff;
  color: var(--r2-ink);
}

input,
select,
textarea,
.table-select {
  border-color: var(--r2-line) !important;
  border-radius: 11px;
  background: rgba(255, 255, 255, .98) !important;
}

input:focus,
select:focus,
textarea:focus,
.table-select:focus {
  border-color: var(--r2-accent) !important;
  box-shadow: 0 0 0 4px rgba(217, 255, 67, .23);
  outline: 0;
}

.status-line {
  border-color: var(--r2-line);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(18, 21, 26, .04);
}

.status-line.success {
  border-color: #c9e77a;
  background: var(--r2-accent-soft);
  color: #3d4d09;
}

.badge,
.placeholder > span {
  border-radius: 999px;
  background: var(--r2-ink);
}

.agenda-day > header,
.schedule-card > header,
.dashboard-schedule-header {
  background: var(--r2-ink);
}

.agenda-day > header span,
.schedule-card > header span,
.schedule-count {
  background: var(--r2-accent);
  color: var(--r2-ink);
}

.operational-table th,
table th {
  background: #e8ede8;
  color: #5f6c64;
}

.operational-table th,
.operational-table td,
table th,
table td {
  border-color: var(--r2-line);
}

.operational-table tbody tr:hover,
table tbody tr:hover {
  background: #f5fbdc;
}

/* Consistent mobile behavior for the new independent shell. */
@media (max-width: 760px) {
  #app-sidebar.sidebar {
    padding: 18px 12px 14px;
  }

  .topbar {
    min-height: 66px;
    padding: 0 16px;
  }

  .content {
    padding: 20px 14px;
    background-size: 18px 18px;
  }

  .metric-card,
  .panel,
  .settings-card,
  .settings-panel,
  .operational-form-panel,
  .operational-list-panel,
  .student-profile-panel,
  .student-message-panel,
  .leads-crm-panel,
  .leads-attention-panel,
  .reports-toolbar-panel,
  .reports-delivery-panel,
  .calendar-panel,
  .goals-panel,
  .followup-panel,
  .journey-list-panel {
    border-radius: 15px;
  }
}

.google-access-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.google-access-divider::before,
.google-access-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .14);
}

.google-access-button {
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.google-access-button > div {
  max-width: 100%;
}

.google-access-hint {
  margin: 8px 0 14px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
  text-align: center;
}
