/* Kindred Admin Theme — light blue palette matching Figma */

:root {
  /* Override Django admin CSS variables */
  --primary: #6a9cba;
  --accent: #8faabe;
  --secondary: #93b5d0;
  --primary-fg: #fff;

  --body-fg: #1a1a2e;
  --body-bg: #e8eff6;
  --body-quiet-color: #6b7280;
  --body-loud-color: #1a1a2e;

  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: #5a8aaa;
  --header-link-color: rgba(255, 255, 255, 0.9);

  --breadcrumbs-fg: #4a7a96;
  --breadcrumbs-link-fg: #4a7a96;
  --breadcrumbs-bg: #d6e4f0;

  --link-fg: #4a7a96;
  --link-hover-color: #3a6a86;
  --link-selected-fg: #3a6a86;

  --hairline-color: #c8d8e6;
  --border-color: #c8d8e6;

  --darkened-bg: #dce8f1;
  --selected-bg: #c4d8e8;
  --selected-row: #d6e4f0;

  --button-fg: #fff;
  --button-bg: #6a9cba;
  --button-hover-bg: #5a8aaa;
  --default-button-bg: #5a8aaa;
  --default-button-hover-bg: #4a7a96;

  --close-button-bg: #8faabe;
  --close-button-hover-bg: #7a96aa;

  --object-tools-fg: #fff;
  --object-tools-bg: #8faabe;
  --object-tools-hover-bg: #7a96aa;

  --message-success-bg: #dff0d8;
  --message-warning-bg: #fcf8e3;
  --message-error-bg: #f2dede;

  /* Module headers (section titles like USERS, COHORTS) */
  --module-header-bg: #5a8aaa;
  --module-header-fg: #fff;
}

/* Body background with decorative bowls */
body {
  background: url('../../images/kindred-logo/email-bg.png') center center / cover fixed no-repeat;
  min-height: 100vh;
}

/* Header bar */
#header {
  background: var(--header-bg);
  color: var(--header-color);
}

#header a:link, #header a:visited {
  color: var(--header-link-color);
}

#branding h1 {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Module headers */
.module > h2, .module > caption, .inline-group h2 {
  background: var(--module-header-bg);
  color: var(--module-header-fg);
}

/* Breadcrumbs */
div.breadcrumbs {
  background: var(--breadcrumbs-bg);
  color: var(--breadcrumbs-fg);
}

/* Buttons */
.submit-row input[type="submit"],
.submit-row input[type="button"],
.button, a.button, .submit-row a {
  border-radius: 8px;
}

input[type="submit"], input[type="button"], .button, a.button {
  border-radius: 8px;
}

.submit-row input.default {
  background: var(--default-button-bg);
  border-radius: 8px;
}

.submit-row input.default:hover {
  background: var(--default-button-hover-bg);
}

/* Rounded inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
}

select {
  height: auto;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(147, 181, 208, 0.3);
  outline: none;
}

/* Softer table rows */
#result_list tbody tr:hover td,
#result_list tbody tr:hover th {
  background: var(--selected-row);
}

/* Delete button — keep red but rounded */
.submit-row .deletelink,
.deletelink {
  border-radius: 8px;
}

/* Changelist filter sidebar */
#changelist-filter {
  border-radius: 8px;
}

/* Related widget wrapper — less boxy */
.related-widget-wrapper select {
  border-radius: 8px;
}
/* Inline group h3 — match label colour */
.inline-group h3 {
  color: var(--body-quiet-color);
}

/* Calendar & date widgets */
.calendarbox, .clockbox {
  border-radius: 8px;
}

/* ── Notification bell ── */
#notification-bell {
  display: inline-block;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  padding: 4px;
  margin-left: 10px;
}

#notification-bell svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.85);
  vertical-align: middle;
  transition: fill 0.15s;
}

#notification-bell:hover svg {
  fill: #fff;
}

#notif-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-weight: bold;
}

#notif-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 30px;
  width: 380px;
  max-height: 440px;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  text-transform: none;
  text-align: left;
}

#notif-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333 !important;
  transition: background 0.15s;
  cursor: pointer;
}

.notif-item:hover {
  background: #f5f5f5;
}

.notif-item.unread {
  background: #f0f7ff;
  border-left: 3px solid #417690;
}

.notif-item.unread:hover {
  background: #e0efff;
}

.notif-item-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: #333 !important;
  line-height: 1.3;
}

.notif-item-message {
  font-size: 12px;
  color: #666 !important;
  margin-bottom: 4px;
  line-height: 1.4;
}

.notif-item-time {
  font-size: 11px;
  color: #999 !important;
  text-align: right;
}

.notif-footer {
  padding: 10px 16px;
  text-align: center;
  border-top: 1px solid #ddd;
  font-size: 12px;
  background: #f5f5f5 !important;
  position: sticky;
  bottom: 0;
  color: #333 !important;
}

.notif-footer a {
  color: #417690 !important;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 600;
}

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

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

.notif-empty {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 13px;
}
