@import url("/accessgranted-crm/assets/css/brand-fonts.css");

:root {
  /* Master Palette */
  --cream: #F7ECD9;
  --sand: #E4C7A1;
  --gold: #D5B45D;
  --rust: #7C4D3B;
  --deep-teal: #12374B;
  --crimson: #AE000F;
  --orange: #EC781F;
  --forest-green: #36642B;
  --white: #FFFFFF;

  /* Master Aliases */
  --bg: var(--cream);
  --surface: var(--cream);
  /* Standardizing all white cards to Cream */
  --text-primary: var(--deep-teal);
  --text-secondary: #5E372A;
  --text-mid: #6B5038;
  --text-light: #9C8060;
  --text-faint: #7A6550;
  --text-meta-size: 0.8125rem;
  --text-meta-weight: 700;
  --border: rgba(124, 77, 59, 0.08);

  /* Master Elevation */
  --shadow-sm: 0 8px 25px rgba(124, 77, 59, 0.12);
  --shadow-md: 0 12px 35px rgba(124, 77, 59, 0.15);
  --shadow-lg: 0 20px 40px rgba(124, 77, 59, 0.15);
  /* Master Standard */

  /* Master Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Master Typography */
  --font-display: "Cannon", serif;
  --font-body: "Atten", sans-serif;

  /* Legacy aliases used across student portal */
  --rust-deep: #4d2c1e;
  --pale: #f3e8d4;
  --burgundy: #8b0010;
  --gold-dark: #b89530;
}

.text-meta {
  font-size: var(--text-meta-size);
  font-weight: var(--text-meta-weight);
  color: var(--text-mid);
}

.field-label {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Atten", sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cannon", serif;
  font-weight: 700;
  color: var(--rust);
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 16px;
}

p,
span,
div,
li,
td,
th {
  font-family: "Atten", sans-serif;
}

/* Surgical Heading Fonts */
.nav-link,
.card-title,
.section-title,
.stat-pill-label {
  font-family: "Cannon", serif !important;
}

/* Premium Navigation System */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1003;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}

.nav-top-row {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  background: var(--cream);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.brand {
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-date-display {
  background: var(--white);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.nav-hamburger {
  display: none;
  cursor: pointer;
  color: var(--teal);
}

.nav-icon {
  position: relative;
  background: rgba(124, 77, 59, 0.05);
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nav-icon:hover {
  background: rgba(124, 77, 59, 0.1);
  color: var(--gold-dark);
}

.nav-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border: 2px solid var(--cream);
  border-radius: 50%;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: var(--rust-deep);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.nav-avatar:hover {
  transform: scale(1.05);
  border-color: var(--gold-dark);
}

.nav-menu {
  width: calc(100% - 80px);
  max-width: 1480px;
  margin: 10px auto;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0 40px;
  /* Slight increase in lateral padding */
  display: flex;
  justify-content: flex-start;
  /* Changed from center to left-aligned */
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  font-family: "Cannon", serif !important;
  padding: 14px 5px;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--deep-teal);
  text-decoration: none;
  text-transform: none;
  /* Changed from uppercase to match admin */
  letter-spacing: 0.2px;
  border-bottom: 2px solid transparent;
  transition: all 0.25s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rust);
  border-bottom-color: var(--gold);
  font-weight: 700 !important;
}

.page-head h1,
.page-head h2,
.page-head h3,
.page-title,
.evals-page-header h2,
.cal-page-header h2 {
  font-weight: 800;
}

/* Dropdown Menus */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  background: var(--cream);
  border: 1px solid rgba(124, 77, 59, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  min-width: 220px;
  display: none;
  z-index: 1100;
  padding: 10px 0;
}

.dropdown-menu.show {
  display: block;
  animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 12px 24px;
  font-size: 14px;
  color: var(--teal);
  display: block;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 600;
}

.dropdown-item:hover {
  background: var(--cream);
  color: var(--rust);
}

@media (max-width: 900px) {
  .nav-top-row {
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-hamburger {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    color: var(--rust);
  }

  .nav-hamburger svg,
  .nav-hamburger svg * {
    stroke: var(--rust) !important;
  }

  .brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 80%;
    margin: 0;
    border-radius: 0;
    background: var(--cream);
    /* Cream Background */
    flex-direction: column;
    padding: 40px 20px;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1002;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
  }

  .nav-menu.show {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    width: 100%;
  }

  .nav-link {
    padding: 12px 16px;
    border-bottom: none !important;
    border-radius: var(--radius-md);
    text-align: left;
    /* Ensure left alignment */
  }


  .nav-link:hover,
  .nav-link.active {
    background: rgba(124, 77, 59, 0.08);
  }

  .main-content {
    margin-top: 80px !important;
    padding: 20px !important;
  }

  .summary-grid,
  .dash-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .greeting-row {
    flex-direction: column;
    gap: 12px;
  }

  .affirmation-banner {
    padding: 22px 20px;
  }

  .affirmation-text {
    font-size: 16px;
  }

  .task-item {
    padding: 14px 16px;
  }

  .task-item__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .task-due {
    width: auto;
    margin-left: 0;
  }

  .task-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .task-meta-item:not(:last-child)::after {
    display: none;
  }

  .dashboard-task-list {
    padding: 10px 16px 20px;
  }

  .eval-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .eval-month-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-actions,
  .card-actions .btn-brand {
    width: 100%;
  }

  .card-actions .btn-brand {
    justify-content: center;
  }

  .docs-tabs-nav {
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .docs-table-headers {
    display: none;
  }

  .docs-row-premium {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .doc-action-btns {
    justify-content: flex-start;
    margin-top: 8px;
  }

  .session-card {
    flex-direction: column;
  }

  .session-date-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
  }

  .session-info {
    width: 100%;
  }

  .wb-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wb-toolbar>* {
    max-width: 100%;
  }

  .cal-controls {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .cal-nav {
    justify-content: space-between;
  }

  .cal-grid,
  .cal-week-grid,
  .cal-day-grid {
    overflow-x: auto;
  }
}

/* Menu Overlay */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(42, 22, 16, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open #menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* Main Content */
.main-content {
  margin-top: 150px;
  /* Adjusted for fixed dual-bar nav */
  padding: 30px 40px;
  max-width: 1480px;
  margin-inline: auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}


/* Dashboard Specific Styles */
.greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px
}

.greeting h1 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--rust);
  font-weight: 700
}

.greeting p {
  color: var(--text-light);
  font-size: 16px;
  margin-top: 4px;
  font-weight: 700
}

.date-badge {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-light);
  font-weight: 700;
  box-shadow: var(--shadow-sm)
}

.affirmation-banner {
  background: var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  color: var(--cream);
  box-shadow: var(--shadow-sm)
}

.affirmation-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
  margin-bottom: 10px;
  font-weight: 800;
}

.affirmation-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  /* Premium Rust Shadow */
  transition: all .25s;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 210px;
}

.summary-card> :first-child {
  flex: 1;
  min-width: 0;
}

.sc-icon {
  font-size: 20px;
  margin-bottom: 16px;
  color: inherit;
}

.bg-teal {
  background: var(--deep-teal);
  color: var(--white);
}

.bg-crimson {
  background: var(--crimson);
  color: var(--white);
}

.bg-orange {
  background: var(--orange);
  color: var(--white);
}

.bg-forest-green {
  background: var(--forest-green);
  color: var(--white);
}

.sc-value {
  color: var(--white) !important;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.sc-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 16px;
}

.sc-btn {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  text-align: center;
  display: block;
  width: 100%;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

/* Card System (Admin Parity) */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Premium Rust Shadow */
  margin-bottom: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-header {
  background: var(--rust) !important;
  color: var(--white) !important;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  /* Explicitly round top corners */
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0 !important;
  color: inherit !important;
}

/* Button System (Admin Parity) */
.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-brand svg {
  stroke-width: 2.5;
}

.btn-rust {
  background: var(--rust);
  color: var(--white);
}

.btn-rust:hover {
  background: var(--rust-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 77, 59, 0.2);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
}

.btn-teal:hover {
  background: #0d2a3a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 55, 75, 0.2);
}

.btn-gold {
  background: var(--gold);
  color: var(--rust-deep);
}

.btn-gold:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(213, 180, 93, 0.2);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--pale);
  color: var(--rust-deep);
}

/* Overriding old sc-btn */
.sc-btn {
  background: rgba(255, 255, 255, 0.24) !important;
  color: white !important;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
  text-decoration: none;
}

.sc-btn:hover {
  background: white !important;
  color: var(--rust-deep) !important;
}

.chart-container {
  flex: 1;
  min-height: 280px;
  min-width: 0;
}

/* Tasks and Sessions */
.dashboard-task-list {
  padding: 10px 24px 24px;
}

.dashboard-task-list__state {
  padding: 16px 0;
  text-align: center;
  color: var(--text-secondary);
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--snow);
  border: 1px solid var(--pale);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: default;
  transition: all 0.2s;
}

.task-item__content {
  flex: 1;
  min-width: 0;
}

.task-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.task-item:hover {
  background: white;
  border-color: var(--rust);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.task-text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--rust-deep);
  line-height: 1.35;
  margin-bottom: 0;
}

.task-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.task-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.task-meta-item:not(:last-child)::after {
  content: '·';
  margin-left: 10px;
  color: var(--pale);
  font-weight: 700;
}

.task-meta-item svg {
  stroke-width: 2.5;
  opacity: 0.7;
}

.task-due {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.session-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.session-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.session-date-block {
  min-width: 52px;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--rust);
  color: white;
}

.session-date-block .month {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.8;
}

.session-date-block .day {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
}

.session-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--rust);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.session-info p {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
}

.session-info {
  flex: 1;
  min-width: 0;
}

.session-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(18, 55, 75, 0.08);
  color: var(--deep-teal);
  margin-top: 8px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-tag.in-person {
  background: rgba(213, 180, 93, 0.15);
  color: var(--rust-deep);
}

@media (max-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .summary-card {
    min-height: 0;
    padding: 20px;
  }

  .sc-value {
    font-size: 24px;
  }

  .chart-container {
    height: 240px;
  }
}

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

  .greeting h1 {
    font-size: 24px;
  }

  .card-body[style] {
    padding: 18px !important;
  }
}

/* Evaluations Accordion (Rust Theme) */
.eval-month-group {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.eval-month-header {
  padding: 20px 24px;
  background: var(--rust);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.eval-month-header:hover {
  background: var(--rust-dark);
}

.eval-month-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0;
}

.eval-month-header::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  transition: transform 0.3s;
}

.eval-month-header.open::after {
  content: '−';
  transform: rotate(180deg);
}

.eval-month-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface);
}

.eval-month-header.open+.eval-month-body {
  max-height: 1000px;
  padding: 28px;
  border-top: 1px solid var(--border);
}

.eval-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.eval-cat-box {
  background: var(--cream);
  padding: 16px 10px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(124, 77, 59, 0.08);
}

.eval-feedback {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  background: #FFFBF5;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-radius: 0 12px 12px 0;
}

/* Session Detail Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  animation: modalSlide 0.3s ease;
  position: relative;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 24px;
  font-weight: 700;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
}

.detail-info {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-info strong {
  color: var(--rust-deep);
  font-weight: 700;
  margin-right: 4px;
}

.modal-close-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: #2C1810;
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: #1A0D08;
}

/* Documents High-Fidelity Restoration */
.docs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-top: 24px;
}

.docs-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
}

.docs-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--rust);
  font-weight: 700;
}

.docs-total-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--rust-deep);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-tabs-nav {
  display: flex;
  gap: 40px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: #FAF7F2;
}

.docs-tab {
  position: relative;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.docs-tab.active {
  color: var(--rust-deep);
}

.docs-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
}

.docs-tab-count {
  background: #F2E8DF;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.docs-description {
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  padding: 24px 32px 12px 32px;
  font-weight: 500;
}

.docs-table-headers {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.5fr .8fr .8fr;
  gap: 16px;
  padding: 12px 32px;
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  background: var(--rust);
  border-radius: 0;
  margin: 0 32px 8px 32px;
}

.docs-row-premium {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.5fr .8fr .8fr;
  gap: 16px;
  align-items: center;
  padding: 18px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 0 32px 12px 32px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(94, 55, 42, 0.04);
}

.docs-row-premium:hover {
  border-color: var(--gold);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.file-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-teal);
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(18, 55, 75, 0.15);
}

.file-name-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
}

.file-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 8px;
}

.badge-pdf {
  background: #FCE8E8;
  color: #AE000F;
}

.badge-docx {
  background: #E8EEF1;
  color: #12374B;
}

.doc-meta {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.doc-action-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.doc-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text-light);
}

.doc-action-btn:hover {
  border-color: var(--gold);
  color: var(--rust-deep);
  background: var(--cream);
}

/* --- High-Fidelity Calendar System (Sync with Agent Portal) --- */
.cal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: var(--pale);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--rust);
  min-width: 180px;
  text-align: center;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 20px;
  color: var(--rust-deep);
}

.cal-nav-btn:hover {
  background: var(--white);
  border-color: var(--gold);
  color: var(--gold);
}

.cal-today-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--rust-deep);
  text-transform: uppercase;
  transition: all 0.2s;
}

.cal-today-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #2A1610;
}

.cal-view-tabs {
  display: flex;
  background: rgba(124, 77, 59, 0.08);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.cal-view-tab {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.2s;
  text-transform: uppercase;
}

.cal-view-tab.active {
  background: var(--white);
  color: var(--rust);
  box-shadow: var(--shadow-sm);
}

/* Month View Grid */
.cal-grid {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--deep-teal);
  border-bottom: 2px solid var(--deep-teal);
}

.cal-header-cell {
  padding: 15px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell {
  min-height: 110px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}

.cal-cell:nth-child(7n) {
  border-right: none;
}

.cal-cell:hover {
  background: #F8F9FA;
}

.cal-cell.other-month {
  background: #fafafa;
  opacity: 0.4;
}

.cal-cell.today {
  background: rgba(213, 180, 93, 0.08);
}

.cal-cell.today .cal-day-num {
  background: var(--gold);
  color: var(--rust-deep);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -2px 0 4px -2px;
}

.cal-day-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--rust-deep);
  margin-bottom: 4px;
}

.cal-event {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cal-event:hover {
  opacity: 0.92;
}

/* Week View */
.cal-week-grid {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-week-header {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  background: var(--pale);
  border-bottom: 1px solid var(--border);
}

.cal-week-hcell {
  padding: 15px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  background: var(--deep-teal);
  color: var(--white);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.cal-week-hcell.today-col {
  background: rgba(213, 180, 93, 0.1);
  font-weight: 900;
}

.cal-week-body {
  display: grid;
  grid-template-columns: 60px repeat(7, 1fr);
  max-height: 500px;
  overflow-y: auto;
}

.cal-week-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-align: right;
  padding: 10px 8px 10px 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cal-week-slot {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3px;
  min-height: 48px;
  position: relative;
}

.cal-week-event {
  padding: 4px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 2px;
  text-align: center;
  cursor: pointer;
}

/* Day View */
.cal-day-grid {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-day-header {
  background: #F8F9FA;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cal-day-header-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--rust);
}

.cal-day-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.cal-day-time {
  width: 80px;
  padding: 16px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-light);
  text-align: right;
  border-right: 1px solid var(--border);
}

.cal-day-slot {
  flex: 1;
  padding: 10px;
  min-height: 60px;
}

.cal-day-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
  border-left: 4px solid var(--rust);
  box-shadow: var(--shadow-sm);
}

.cal-day-event:hover {
  transform: translateX(4px);
  border-left-width: 6px;
  border-color: var(--gold);
}