/* Before — Global Design System & Stylesheet */

:root {
  --ink: #171815;
  --muted: #777872;
  --paper: #f5f4ef;
  --card: #fff;
  --line: #e5e3dc;
  --orange: #ff5d39;
  --dark: #20211e;
  --purple: #6d61d9;
  --mint: #68c5a2;
  --yellow: #efb93e;
  --radius: 18px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Shell Layout */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px 1fr;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #1c1d1a;
  color: #fff;
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font: 700 22px Manrope, sans-serif;
  margin: 0 10px 42px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-size: 21px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #a7a8a3;
  border-radius: 11px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 14px "DM Sans";
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: var(--transition);
}

.nav-item:hover, 
.nav-item.active {
  background: #30312d;
  color: #fff;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item b {
  font-size: 11px;
  margin-left: auto;
  background: #40413c;
  padding: 3px 7px;
  border-radius: 10px;
  color: #fff;
}

.sidebar-bottom {
  margin-top: auto;
}

.profile {
  border-top: 1px solid #353632;
  margin-top: 16px;
  padding: 18px 7px 0;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
}

.profile .avatar {
  width: 36px;
  height: 36px;
  background: #595a54;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.profile strong, 
.profile small {
  display: block;
}

.profile strong {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.profile small {
  font-size: 10px;
  color: #92938d;
  margin-top: 2px;
}

.profile-actions-btn {
  background: none;
  color: #888;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.profile-actions-btn:hover {
  color: #fff;
}

/* Header / Topbar */
.topbar {
  height: 76px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 244, 239, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.search {
  width: min(430px, 45vw);
  display: flex;
  align-items: center;
  gap: 9px;
  color: #92928c;
  background: transparent;
}

.search svg {
  width: 18px;
  height: 18px;
}

.search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  font: 14px "DM Sans";
  color: var(--ink);
}

.search kbd {
  font: 12px "DM Sans";
  white-space: nowrap;
  border: 1px solid #d8d6cf;
  background: #fff;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  color: var(--ink);
  transition: var(--transition);
  text-decoration: none;
}

.icon-button:hover {
  background: #fafaf8;
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--orange);
  right: 8px;
  top: 7px;
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.primary-button, 
.secondary-button, 
.review-button, 
.dark-button {
  border: 0;
  border-radius: 11px;
  font: 600 13px "DM Sans";
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.primary-button {
  background: var(--orange);
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 5px 14px rgba(255, 93, 57, 0.25);
}

.primary-button:hover {
  background: #ef4e2c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 93, 57, 0.35);
}

.secondary-button {
  padding: 11px 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.secondary-button:hover {
  background: #fbfbf9;
  border-color: #d2d0c9;
  transform: translateY(-1px);
}

.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  place-items: center;
  cursor: pointer;
}

/* Page Content Container */
.content {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 42px 60px;
}

/* Welcome Area */
.welcome-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #989990;
  margin-bottom: 10px !important;
  text-transform: uppercase;
}

.welcome-row h1 {
  font: 700 29px Manrope, sans-serif;
  margin: 0 0 7px;
  letter-spacing: -0.7px;
}

.welcome-row p {
  color: var(--muted);
  font-size: 14px;
}

/* Red Announcement Card */
.alert-card {
  min-height: 138px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(115deg, #292a27, #1c1d1a);
  padding: 27px 29px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.alert-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #ff6844;
  margin-right: 18px;
  box-shadow: 0 8px 35px rgba(255, 96, 62, 0.4);
  flex-shrink: 0;
  z-index: 2;
}

.alert-icon svg {
  width: 23px;
  height: 23px;
  color: #fff;
}

.alert-copy {
  position: relative;
  z-index: 2;
}

.alert-copy > span {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ff8a6f;
  font-weight: 700;
}

.alert-copy h2 {
  font: 600 19px Manrope, sans-serif;
  margin: 5px 0;
}

.alert-copy p {
  margin: 0;
  color: #bcbdb7;
  font-size: 13px;
}

.alert-copy strong {
  color: #fff;
}

.review-button {
  position: relative;
  z-index: 2;
  margin-left: auto;
  background: #fff;
  color: #222;
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-button:hover {
  background: #fbfbf9;
  transform: translateY(-1px);
}

.review-button span {
  margin-left: 10px;
  transition: transform 0.2s;
}

.review-button:hover span {
  transform: translateX(4px);
}

.alert-orbit {
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #464742;
  border-radius: 50%;
  right: 90px;
}

.alert-orbit:before, 
.alert-orbit:after {
  content: "";
  position: absolute;
  border: 1px solid #3b3c38;
  border-radius: 50%;
  inset: 38px;
}

.alert-orbit:after {
  inset: 76px;
}

/* Dashboard Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 38px;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px 19px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.02);
}

.metric-card div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric-icon {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
}

.metric-icon svg {
  width: 14px;
  height: 14px;
}

.coral { background: #ff7456; }
.purple { background: #7166d6; }
.mint { background: #68bd9e; }
.yellow { background: #eaae39; }

.metric-card small {
  color: #676862;
  font-size: 11px;
  font-weight: 500;
}

.metric-card > strong {
  display: block;
  font: 700 25px Manrope, sans-serif;
  margin: 14px 0 5px;
  letter-spacing: -0.5px;
}

.metric-card p {
  margin: 0;
  font-size: 10px;
  color: #96978f;
}

.metric-card .up {
  color: #e9593a;
  font-weight: 600;
}

.metric-card .good {
  color: #3ba27b;
  font-weight: 600;
}

/* Section Header styling */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}

.section-head h2 {
  font: 600 18px Manrope, sans-serif;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.section-head p {
  font-size: 12px;
  color: var(--muted);
}

.segmented {
  padding: 3px;
  background: #e9e7e0;
  border-radius: 9px;
  display: flex;
  gap: 2px;
}

.segmented button, 
.segmented a {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 7px;
  color: #777;
  font: 600 11px "DM Sans";
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}

.segmented button.active, 
.segmented a.active {
  background: #fff;
  color: #222;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Contracts Row Layout (Original layout) */
.contract-list {
  display: grid;
  gap: 10px;
}

.contract-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: minmax(210px, 1.8fr) 1fr 1fr 1fr auto;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.contract-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(41, 41, 24, 0.04);
  border-color: #d2d0c9;
}

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

.company-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font: 700 15px Manrope, sans-serif;
  text-transform: uppercase;
}

.company strong, 
.contract-col strong {
  display: block;
  font: 600 13px Manrope, sans-serif;
  color: var(--ink);
}

.company small, 
.contract-col small {
  font-size: 10px;
  color: #989990;
  margin-top: 4px;
  display: block;
}

.status {
  padding: 5px 8px;
  border-radius: 15px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: max-content;
}

.status.urgent {
  background: #fff0ec;
  color: #e05234;
}

.status.soon {
  background: #fff7df;
  color: #b87c0b;
}

.status.safe {
  background: #eaf7f1;
  color: #318969;
}

.status.cancelled {
  background: #f0eee8;
  color: #7a7b74;
}

.row-menu {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #888;
  transition: var(--transition);
}

.row-menu:hover {
  background: #fbfbf9;
  color: var(--ink);
  border-color: #cbd0c9;
}

/* Spend Chart and Tip Grid */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.spend-card, 
.tip-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
}

.spend-card {
  display: flex;
  flex-direction: column;
}

.section-head.compact {
  align-items: flex-start;
  margin-bottom: 24px;
}

.text-button {
  border: 0;
  background: transparent;
  font: 600 11px "DM Sans";
  color: var(--orange);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.text-button:hover {
  color: #ef4e2c;
  transform: translateX(2px);
}

/* CSS Bar Chart representation */
.bar-chart {
  height: 180px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 44px, #efeee9 45px);
  margin-top: auto;
}

.bar-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.bar {
  width: min(38px, 70%);
  border-radius: 7px 7px 0 0;
  background: #272824;
  position: relative;
  transition: height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar:hover {
  background: var(--orange);
}

.bar span {
  position: absolute;
  top: -23px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.bar-item small {
  margin-top: 8px;
  font-size: 9px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Tip Card (Smart Advice) */
.tip-card {
  position: relative;
  background: #fff7e6;
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tip-label {
  font-size: 9px;
  color: #9c7118;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tip-card h2 {
  font: 600 18px Manrope, sans-serif;
  max-width: 260px;
  margin: 56px 0 8px;
  letter-spacing: -0.3px;
}

.tip-card p {
  font-size: 11px;
  color: #77725f;
  max-width: 310px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.tip-art {
  position: absolute;
  right: 25px;
  top: 28px;
}

.tip-art > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 28px Manrope, sans-serif;
  color: #9b721f;
}

.tip-ring {
  width: 83px;
  height: 83px;
  border-radius: 50%;
  border: 7px solid #f3c769;
  border-left-color: #fff0c8;
  transform: rotate(-35deg);
}

.dark-button {
  background: #242520;
  color: #fff;
  padding: 11px 16px;
  border-radius: 9px;
}

.dark-button:hover {
  background: #121310;
  transform: translateY(-1px);
}

.dark-button span {
  margin-left: 10px;
  transition: transform 0.2s;
}

.dark-button:hover span {
  transform: translateX(3px);
}

/* Empty States */
.empty-state {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 50px 30px;
}

.empty-state div {
  font-size: 32px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font: 600 16px Manrope, sans-serif;
  margin-bottom: 8px;
}

.empty-state p {
  color: #888;
  font-size: 12px;
  max-width: 300px;
  margin: 0 auto;
}

/* Modals & Backdrops */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 24, 21, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: #fff;
  width: min(520px, 100%);
  border-radius: 22px;
  padding: 31px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.18);
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 18px;
  border: 0;
  background: #f2f1ed;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: #e5e3dc;
}

.modal h2 {
  font: 600 23px Manrope, sans-serif;
  margin-bottom: 4px;
}

.modal-sub {
  color: #777;
  font-size: 12px;
  margin-bottom: 24px;
}

/* Form Styles */
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 7px;
  font: 13px "DM Sans";
  outline: 0;
  background: #fbfbf9;
  color: var(--ink);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 93, 57, 0.1);
  background: #fff;
}

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

.switch-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f5f4f0;
  border-radius: 11px;
  position: relative;
  margin-bottom: 20px;
}

.switch-row strong {
  font-weight: 600;
  font-size: 12px;
}

.switch-row small {
  font-weight: 400;
  color: #888;
  margin-top: 3px;
  display: block;
}

.switch-row input {
  width: 42px;
  height: 22px;
  opacity: 0;
  position: absolute;
  right: 12px;
  z-index: 2;
  cursor: pointer;
}

.switch-row i {
  width: 42px;
  height: 23px;
  background: #cbc9c2;
  border-radius: 20px;
  position: relative;
  display: inline-block;
  pointer-events: none;
}

.switch-row i:after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  background: #fff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: var(--transition);
}

.switch-row input:checked + i {
  background: var(--orange);
}

.switch-row input:checked + i:after {
  left: 22px;
}

.submit {
  width: 100%;
  margin-top: 4px;
}

/* Toast alert */
.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  background: #20211e;
  color: #fff;
  padding: 13px 17px;
  border-radius: 13px;
  display: flex;
  gap: 11px;
  align-items: center;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast > span {
  width: 27px;
  height: 27px;
  background: #3aa47c;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.toast.error > span {
  background: #e05234;
}

.toast svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.toast strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.toast small {
  display: block;
  font-size: 9px;
  color: #aaa;
  margin-top: 3px;
}

/* Auth Layout Styles */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--paper);
  padding: 24px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: min(420px, 100%);
  padding: 38px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.02);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  font: 700 24px Manrope, sans-serif;
  margin-top: 14px;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert-message {
  padding: 12px 14px;
  background: #fff0ec;
  color: #e05234;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-message.success {
  background: #eaf7f1;
  color: #318969;
}

/* Contracts Table/Grid & Search Control */
.search-controls {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.search-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #92928c;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  font: 14px "DM Sans";
  color: var(--ink);
  margin-top: 0;
  padding: 0;
}

.filter-select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 11px 14px;
  font: 600 12px "DM Sans";
  color: var(--ink);
  cursor: pointer;
  width: auto;
  margin-top: 0;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777872' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Grid layout for Contracts */
.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.contract-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.contract-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(41, 41, 24, 0.04);
  border-color: #d2d0c9;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-body h3 {
  font: 600 15px Manrope, sans-serif;
  margin-bottom: 4px;
  color: var(--ink);
}

.card-body span {
  font-size: 11px;
  color: var(--muted);
}

.card-price {
  font: 700 20px Manrope, sans-serif;
  margin: 16px 0;
}

.card-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

/* Bulk actions bar */
.bulk-actions-bar {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #20211e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 90;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.bulk-actions-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.bulk-actions-bar button {
  background: transparent;
  border: 1px solid #40413c;
  color: #fff;
  padding: 6px 12px;
  border-radius: 7px;
  font: 600 11px "DM Sans";
  cursor: pointer;
  transition: var(--transition);
}

.bulk-actions-bar button:hover {
  background: #30312d;
}

.bulk-actions-bar button.delete-bulk {
  background: var(--orange);
  border-color: var(--orange);
}

.bulk-actions-bar button.delete-bulk:hover {
  background: #ef4e2c;
}

/* Onboarding Wizard Stepper */
.onboarding-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.onboarding-steps:after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--line);
  left: 0;
  right: 0;
  top: 15px;
  z-index: 1;
}

.step-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  z-index: 2;
  border: 2px solid var(--paper);
}

.step-indicator.active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 93, 57, 0.15);
}

.step-indicator.completed {
  background: var(--ink);
  color: #fff;
}

/* Demo banner */
.demo-banner {
  background: #fff7df;
  border-bottom: 1px solid #f3c769;
  padding: 10px 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #9c7118;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 25;
}

.demo-banner a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 700;
  margin-left: 10px;
}

.demo-banner a:hover {
  text-decoration: underline;
}

/* Calendar styling */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.calendar-header-day {
  background: #fff;
  padding: 12px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.calendar-day {
  background: #fff;
  min-height: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-day.other-month {
  background: #fafaf8;
  color: #c2c0b8;
}

.calendar-day.today {
  background: #fffdf5;
}

.calendar-day.today .day-number {
  background: var(--orange);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.day-number {
  font-size: 11px;
  font-weight: 600;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.calendar-event {
  font-size: 9px;
  padding: 4px 6px;
  border-radius: 5px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: block;
}

.calendar-event:hover {
  filter: brightness(90%);
}

/* Detail Timeline History styling */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
  margin-top: 20px;
}

.timeline:after {
  content: "";
  position: absolute;
  width: 2px;
  background: var(--line);
  top: 4px;
  bottom: 4px;
  left: 3px;
}

.timeline-item {
  position: relative;
}

.timeline-item:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  left: -20px;
  top: 6px;
  z-index: 2;
  border: 2px solid #fff;
}

.timeline-item.success:after {
  background: var(--mint);
}

.timeline-item.warning:after {
  background: var(--orange);
}

.timeline-content {
  font-size: 12px;
}

.timeline-content strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.timeline-content span {
  font-size: 10px;
  color: var(--muted);
}

/* File attachments view */
.file-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.file-item {
  border: 1px solid var(--line);
  background: #fbfbf9;
  padding: 10px 14px;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-item-info svg {
  color: var(--muted);
}

.file-item-info strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.file-item-info small {
  font-size: 9px;
  color: var(--muted);
}

.file-item-actions {
  display: flex;
  gap: 8px;
}

.file-item-actions a,
.file-item-actions button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.file-item-actions a:hover,
.file-item-actions button:hover {
  color: var(--ink);
}

/* Keyframes animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Details Page styling */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.detail-header-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.detail-header-left .logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.detail-header-left h1 {
  font: 700 24px Manrope, sans-serif;
  letter-spacing: -0.5px;
}

.detail-header-left span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

.info-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.info-item {
  border-bottom: 1px solid var(--paper);
  padding-bottom: 12px;
}

.info-item span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

/* Skeleton Loading Screens */
.skeleton {
  background: linear-gradient(90deg, #f2f1ed 25%, #e8e6df 50%, #f2f1ed 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 14px;
  width: 80%;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 50%;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Chart Canvas container */
.chart-container {
  height: 240px;
  position: relative;
  margin-top: 20px;
}

/* Custom Checkbox styles for bulk selections */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 24px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  margin-bottom: 0;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 3px;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: #eee;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--orange);
  border-color: var(--orange);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Responsive Overrides */
@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 24px 10px;
  }
  .brand span:last-child,
  .nav-item:not(.active) {
    font-size: 0;
  }
  .brand {
    margin-left: 13px;
  }
  .nav-item {
    justify-content: center;
  }
  .nav-item b,
  .profile div:not(.avatar),
  .profile-actions-btn {
    display: none;
  }
  .profile {
    display: flex;
    justify-content: center;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contract-row {
    grid-template-columns: 1.5fr 1fr 1fr auto;
  }
  .contract-row .contract-col:nth-of-type(3) {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: -250px;
    width: 230px;
    z-index: 1000;
    transition: var(--transition);
  }
  .sidebar.open {
    left: 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  }
  .brand span:last-child,
  .nav-item:not(.active) {
    font-size: 14px;
  }
  .nav-item {
    justify-content: flex-start;
  }
  .nav-item b,
  .profile div:not(.avatar),
  .profile-actions-btn {
    display: block;
  }
  .topbar {
    padding: 0 16px;
  }
  .mobile-menu {
    display: grid;
  }
  .search {
    display: none;
  }
  .content {
    padding: 28px 16px;
  }
  .welcome-row {
    align-items: flex-start;
    gap: 12px;
  }
  .welcome-row .secondary-button {
    display: none;
  }
  .welcome-row h1 {
    font-size: 23px;
  }
  .alert-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 22px;
  }
  .alert-icon {
    width: 42px;
    height: 42px;
  }
  .alert-copy {
    width: calc(100% - 60px);
  }
  .alert-copy h2 {
    font-size: 16px;
  }
  .review-button {
    margin: 18px 0 0 60px;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contract-row {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .contract-row > .contract-col {
    display: none;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .segmented {
    display: flex;
  }
  .segmented button,
  .segmented a {
    padding: 6px 8px;
  }
  .primary-button {
    padding: 11px;
  }
  .primary-button span {
    display: none;
  }
  .search-controls {
    grid-template-columns: 1fr;
  }
  .calendar-header-day {
    padding: 4px;
    font-size: 8px;
  }
  .calendar-day {
    min-height: 60px;
    padding: 4px;
  }
  .calendar-event {
    font-size: 7px;
    padding: 2px 4px;
  }
}

@media (max-width: 430px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .top-actions .icon-button {
    display: none;
  }
}
