:root {
  --primary: #6b1f4e;
  --secondary: #4e1438;
  --accent: #e2a91c;
  --primary-fg: #fff;
  --body-fg: #2a2029;
  --body-bg: #fcf9fb;
  --body-quiet-color: #6f6170;
  --body-medium-color: #55465a;
  --body-loud-color: #2b1230;
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: #2b1230;
  --header-link-color: #f7edf2;
  --breadcrumbs-fg: #f7edf2;
  --breadcrumbs-link-fg: #fff;
  --breadcrumbs-bg: #6b1f4e;
  --link-fg: #6b1f4e;
  --link-hover-color: #4e1438;
  --link-selected-fg: #4e1438;
  --hairline-color: #e8e0e7;
  --border-color: #e4dce3;
  --darkened-bg: #f4f0f3;
  --selected-bg: #eee5eb;
  --selected-row: #f8f1e6;
  --button-bg: #6b1f4e;
  --button-fg: #fff;
  --button-hover-bg: #4e1438;
  --default-button-bg: #6b1f4e;
  --default-button-hover-bg: #4e1438;
  --close-button-bg: #6b5965;
  --close-button-hover-bg: #55434f;
  --delete-button-bg: #a3424c;
  --delete-button-hover-bg: #87313b;
}

html[data-theme="dark"] {
  --primary: #8d5473;
  --secondary: #563149;
  --accent: #e2a91c;
  --primary-fg: #fff;
  --body-fg: #f0e9ef;
  --body-bg: #19141b;
  --body-quiet-color: #b9acba;
  --body-medium-color: #d3c7d2;
  --body-loud-color: #fff8fd;
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: #241720;
  --header-link-color: #f7edf2;
  --breadcrumbs-fg: #f7edf2;
  --breadcrumbs-link-fg: #fff;
  --breadcrumbs-bg: #43263a;
  --link-fg: #e2b7ce;
  --link-hover-color: #f1d8e5;
  --link-selected-fg: #f1d8e5;
  --hairline-color: #3b303c;
  --border-color: #4a3d4b;
  --darkened-bg: #231c26;
  --selected-bg: #302334;
  --selected-row: #3a2c37;
  --button-bg: #75425f;
  --button-fg: #fff;
  --button-hover-bg: #8b5273;
  --default-button-bg: #75425f;
  --default-button-hover-bg: #8b5273;
  --close-button-bg: #584d59;
  --close-button-hover-bg: #706371;
  --delete-button-bg: #a3424c;
  --delete-button-hover-bg: #87313b;
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body, #container { background: var(--body-bg); color: var(--body-fg); }
#header { min-height: 66px; padding: 10px 24px; background: var(--header-bg); box-shadow: 0 3px 14px rgb(27 14 23 / 16%); }
#site-name { display: flex; align-items: center; min-height: 44px; }
.admin-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff !important; font-family: var(--display, Georgia, serif); font-size: 20px; font-weight: 700; text-decoration: none; }
.admin-brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgb(255 255 255 / 38%); border-radius: 11px; background: rgb(255 255 255 / 10%); font-size: 21px; }
.admin-brand small { display: block; margin-top: 2px; color: #e3c9d7; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 9px; letter-spacing: .19em; }
#user-tools { padding-top: 5px; color: #f2e7ed; font-size: 12px; }
#user-tools a { color: #fff !important; }
div.breadcrumbs { padding: 11px 24px; background: var(--breadcrumbs-bg); font-size: 12px; }
#content { padding: 28px 30px; }
#footer { padding: 14px 30px; border-top: 1px solid var(--hairline-color); color: var(--body-quiet-color); font-size: 11px; text-align: center; }
.rv-admin-footer { color: var(--body-quiet-color); }
#content h1 { color: var(--body-loud-color); font-family: var(--display, Georgia, serif); font-size: 30px; font-weight: 500; }
.module, .dashboard .module table { overflow: hidden; border: 1px solid var(--hairline-color); border-radius: 10px; background: var(--body-bg); box-shadow: 0 3px 12px rgb(41 24 38 / 4%); }
.module h2, .module caption, .inline-group h2 { background: var(--darkened-bg); color: var(--body-loud-color); }
.object-tools a:link, .object-tools a:visited { border-radius: 6px; background: #6b1f4e; }
.button, input[type="submit"], input[type="button"], .submit-row input, a.button { border-radius: 6px; font-weight: 600; }
input:focus, select:focus, textarea:focus { border-color: #8b5974 !important; outline: 2px solid rgb(107 31 78 / 13%); }
#nav-sidebar { border-right: 1px solid #e7dfe6; background: #fffefd; }
#nav-sidebar .current-app .section:link, #nav-sidebar .current-app .section:visited { color: #6b1f4e; }

.rv-dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.rv-dashboard-main { min-width: 0; }
.rv-admin-hero { position: relative; isolation: isolate; overflow: hidden; padding: 30px 34px; border: 1px solid #693c55; border-radius: 14px; background: linear-gradient(112deg, #4e1438 0%, #64304b 65%, #75425f 100%); color: #fff; box-shadow: 0 12px 30px rgb(61 28 45 / 17%); }
.rv-admin-hero::after { position: absolute; z-index: -1; top: -110px; right: -45px; width: 300px; height: 300px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 50%; box-shadow: 0 0 0 28px rgb(255 255 255 / 5%), 0 0 0 58px rgb(255 255 255 / 4%); content: ""; }
.rv-admin-kicker { margin: 0 0 8px; color: var(--body-quiet-color); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.rv-admin-hero .rv-admin-kicker { color: #e7c6d7; }
.rv-admin-hero h1 { margin: 0; color: #fff !important; font-family: var(--display, Georgia, serif) !important; font-size: clamp(28px, 3vw, 40px) !important; letter-spacing: -.035em; }
.rv-admin-hero > p:not(.rv-admin-kicker) { margin: 9px 0 18px; color: #f2e5ed; font-size: 14px; }
.rv-hero-link { color: #f2d8a8 !important; font-size: 12px; font-weight: 700; text-decoration: none; }
.rv-hero-link:hover { color: #fff !important; }
.rv-admin-section { margin-top: 26px; }
.rv-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rv-section-heading h2, .rv-activity-card h2 { margin: 0; color: var(--body-loud-color); font-family: var(--display, Georgia, serif); font-size: 22px; font-weight: 600; }
.rv-section-heading > p { margin: 0 0 2px; color: var(--body-quiet-color); font-size: 12px; }
.rv-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rv-quick-card, .rv-app-card, .rv-activity-card { border: 1px solid var(--hairline-color); border-radius: 11px; background: var(--body-bg); box-shadow: 0 3px 12px rgb(41 24 38 / 4%); }
.rv-quick-card { display: flex; min-height: 180px; flex-direction: column; align-items: flex-start; padding: 17px 18px; color: var(--body-fg) !important; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.rv-quick-card:hover { transform: translateY(-2px); border-color: #b995aa; box-shadow: 0 10px 25px rgb(41 24 38 / 10%); }
.rv-quick-number { display: grid; width: 28px; height: 28px; place-items: center; margin-bottom: 10px; border-radius: 9px; background: var(--darkened-bg); color: var(--link-fg); font-family: var(--display, Georgia, serif); font-size: 11px; font-weight: 700; }
.rv-quick-card h3 { margin: 0 0 5px; color: var(--body-loud-color); font-family: var(--display, Georgia, serif); font-size: 17px; }
.rv-quick-card p { margin: 0 0 13px; color: var(--body-quiet-color); font-size: 12px; line-height: 1.5; }
.rv-card-link { display: flex; justify-content: space-between; width: 100%; margin-top: auto; color: var(--link-fg); font-size: 11px; font-weight: 750; }
.rv-app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rv-app-card { overflow: hidden; }
.rv-app-card h3 { margin: 0; padding: 12px 15px; border-bottom: 1px solid var(--hairline-color); background: var(--darkened-bg); color: var(--body-loud-color); font-size: 13px; font-weight: 750; }
.rv-model-list { padding: 3px 14px; }
.rv-model-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline-color); font-size: 12px; }
.rv-model-row:last-child { border-bottom: 0; }
.rv-model-row a:first-child { font-weight: 600; }
.rv-add-link { padding: 2px 7px; border-radius: 5px; background: var(--darkened-bg); font-size: 10px; text-decoration: none; }
.rv-activity-card { padding: 17px 16px; }
.rv-activity-card h2 { margin-bottom: 16px; font-size: 19px; }
.rv-activity-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rv-activity-list li { display: grid; grid-template-columns: 9px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hairline-color); }
.rv-activity-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #89798a; }
.rv-activity-dot.is-add { background: #568466; }
.rv-activity-dot.is-delete { background: #b5505b; }
.rv-activity-list strong, .rv-activity-list a, .rv-activity-list div > span { display: block; color: var(--body-fg); font-size: 11px; }
.rv-activity-list small { display: block; margin-top: 4px; color: var(--body-quiet-color); font-size: 10px; }
.rv-activity-empty { color: var(--body-quiet-color); font-size: 12px; }

/* Make the standard model pages feel like part of the same operations console. */
#changelist, #changelist-filter { border-color: var(--hairline-color); border-radius: 9px; }
#changelist-filter { background: var(--body-bg); }
#changelist-filter h2 { border-radius: 8px 8px 0 0; background: var(--darkened-bg); color: var(--body-loud-color); }
#changelist table thead th { background: var(--darkened-bg); }
#changelist table tbody tr:hover { background: var(--darkened-bg); }
.submit-row, .submit-row input { border-radius: 7px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea { border-radius: 6px; }
input[type="submit"], button, a.button, .object-tools a:link, .object-tools a:visited { transition: filter .15s ease, transform .15s ease; }
input[type="submit"]:hover, button:hover, a.button:hover, .object-tools a:hover { filter: brightness(1.08); }

@media (max-width: 1180px) {
  .rv-dashboard-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .rv-quick-grid, .rv-app-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  #header { padding-inline: 15px; }
  #content { padding: 20px 15px; }
  div.breadcrumbs { padding-inline: 15px; }
  .rv-dashboard-layout { grid-template-columns: 1fr; }
  .rv-quick-grid, .rv-app-grid { grid-template-columns: 1fr; }
  .rv-admin-hero { padding: 23px; }
  .rv-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Keep the detailed Django record screens visually connected to the customer app. */
html:not([data-theme="dark"]) {
  color-scheme: light;
  --ink: #2b1230;
  --ink-soft: #55465a;
  --plum: #6b1f4e;
  --plum-deep: #4e1438;
  --plum-wash: #f6edf3;
  --brass: #b8903c;
  --line: #eadfe6;
  --muted: #6f6170;
  --body-fg: #2b1230;
  --body-bg: #fcf9fb;
  --body-quiet-color: #6f6170;
  --body-medium-color: #55465a;
  --body-loud-color: #2b1230;
  --header-color: #2b1230;
  --header-branding-color: #2b1230;
  --header-bg: #fffefd;
  --header-link-color: #55465a;
  --breadcrumbs-fg: #55465a;
  --breadcrumbs-link-fg: #6b1f4e;
  --breadcrumbs-bg: #f5f1f4;
  --link-fg: #6b1f4e;
  --link-hover-color: #4e1438;
  --link-selected-fg: #4e1438;
  --hairline-color: #eadfe6;
  --border-color: #eadfe6;
  --darkened-bg: #f5f1f4;
  --selected-bg: #f6edf3;
  --button-bg: #6b1f4e;
  --button-hover-bg: #4e1438;
  --default-button-bg: #6b1f4e;
  --default-button-hover-bg: #4e1438;
}
body, #container { background: var(--body-bg); font-family: Inter, "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#header { min-height: 78px; padding: .8rem max(1.25rem, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--hairline-color); background: var(--header-bg); box-shadow: none; }
#branding { min-height: 44px; }
.admin-brand { color: var(--body-loud-color) !important; font-family: var(--display, var(--display, Georgia, serif)); }
.admin-brand-mark { border-color: #eadfe6; background: #6b1f4e; }
.admin-brand small { color: var(--body-quiet-color); }
#user-tools { display: flex; align-items: center; gap: .55rem; padding-top: 0; color: var(--body-medium-color); font-size: .8rem; }
#user-tools a { color: var(--link-fg) !important; }
#user-tools form { margin: 0; }
#user-tools button { min-height: 36px; padding: .45rem .8rem; border-radius: 9px; background: #6b1f4e; }
div.breadcrumbs { border-bottom: 1px solid var(--hairline-color); background: var(--breadcrumbs-bg); }
#content { box-sizing: border-box; flex: 1 1 auto; width: auto; min-width: 0; max-width: 1360px; margin: 0 auto; }
#footer { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; text-align: left; }

/* Match Django's permission selector to the RasaVega form surfaces. */
.selector { gap: 10px; }
.selector-available-title, .selector-chosen-title {
  border: 1px solid var(--hairline-color);
  border-radius: 9px 9px 0 0;
  background: #f6edf3;
  color: var(--body-medium-color);
}
.selector-available-title label, .selector-chosen-title label { color: inherit; }
.selector .selector-filter {
  border-color: var(--hairline-color);
  background: #fffefd;
  color: var(--body-quiet-color);
}
.selector .selector-filter input,
.selector select {
  border-color: var(--hairline-color);
  background: #fffefd;
  color: var(--body-fg);
  box-shadow: none;
}
.selector select {
  border-radius: 0 0 9px 9px;
  padding: .45rem .65rem;
}
.selector select option:checked { background: #f6edf3; color: #6b1f4e; }
.selector ul.selector-chooser {
  border: 1px solid var(--hairline-color);
  background-color: #f6edf3;
}
.selector .selector-chosen .list-footer-display {
  border-color: var(--hairline-color);
  background: #f6edf3;
  color: var(--body-medium-color);
}
.selector .selector-chosen .list-footer-display__clear { color: #6b1f4e; }
.selector-add, .selector-remove { border-radius: 5px; }

@media (max-width: 767px) {
  #header { padding: .7rem 1rem; }
  #user-tools { flex-wrap: wrap; justify-content: flex-end; }
}


/* Team sign-in page: compact brand header in the narrow login card */
.login #container { width: min(440px, calc(100% - 2rem)); overflow: hidden; border-radius: 18px; }
.login #content { box-sizing: border-box; width: auto; padding: 1.5rem 2rem 2rem; }
.login .form-row input, .login #id_username, .login #id_password { box-sizing: border-box; width: 100%; }
.login .submit-row { padding: 1rem 0 0; text-align: left; }
.login .submit-row input { width: 100%; }
.console-header { position: relative; display: flex; align-items: center; padding: 1.6rem 20px 1.2rem; border-bottom: 1px solid var(--hairline-color, #eadfe6); background: #fff; }
.console-header::before { position: absolute; top: 0; right: 0; left: 0; height: 6px; content: "";
  background: linear-gradient(90deg, #c3243f 0 11.11%, #f08a24 0 22.22%, #e2a91c 0 33.33%, #3d8b4a 0 44.44%, #0e7c86 0 55.55%, #2f3e8f 0 66.66%, #d23c8e 0 77.77%, #2b1230 0 88.88%, #b8903c 0 100%); }
.team-signin-footer { margin: 0; padding: 0 20px 1.5rem; font-size: .85rem; }
.team-signin-footer a { color: var(--link-fg, #6b1f4e); }
@media (max-width: 767px) { .login .console-header { padding-inline: 15px; } .team-signin-footer { padding-inline: 15px; } }


/* Admin console: its own header, separate from the user site and owner portal */
.console-header { gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; padding-inline: max(20px, calc((100vw - 1400px) / 2)); }
.login .console-header { padding-inline: 20px; }
.console-header .brand-caption { color: var(--primary, #6b1f4e); }
.console-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; }
.console-nav a, .console-nav button { display: inline-flex; align-items: center; min-height: 38px; padding: .45rem .7rem; border: 0; border-radius: 9px; background: none; color: var(--body-medium-color, #55465a); font: 600 14px/1 var(--font-family-primary, system-ui); text-decoration: none; cursor: pointer; }
.console-nav a:hover, .console-nav button:hover { background: var(--selected-bg, #f6edf3); color: var(--primary, #6b1f4e); }
.console-nav form { margin: 0; }
.console-divider { width: 1px; height: 22px; margin: 0 .3rem; background: var(--hairline-color, #eadfe6); }
.console-user { padding: 0 .4rem; color: var(--body-quiet-color, #6f6170); font-size: 13px; }
.console-footer { padding: 18px max(20px, calc((100vw - 1400px) / 2)); border-top: 1px solid var(--hairline-color, #eadfe6); color: var(--body-quiet-color, #6f6170); font-size: 13px; }
.rv-quick-number.has-items { background: #fff1d6; color: #8a5a10; font-weight: 800; }
.rv-hero-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0; }

/* Photo check before approval */
.photo-check-listing { margin: 0 0 24px; padding: 16px; border: 1px solid var(--hairline-color, #eadfe6); border-radius: 14px; background: #fff; }
.photo-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-check-grid figure { margin: 0; }
.photo-check-grid img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; }
.photo-check-grid figcaption { margin-top: 6px; font-size: 13px; }
.photo-check .form-row label { display: flex; gap: 10px; align-items: flex-start; width: auto; font-weight: 500; }
