/*
  Admin UI overrides

  - Stop any global CSS/JS theme from forcing ALL CAPS while typing.
  - Make the Variant "Color code" input a bit wider (roughly 30 chars).
*/

/* Never force uppercase in admin inputs */
input,
textarea,
select {
  text-transform: none !important;
}

/* Wider Color code input on Variant add/edit */
#id_color_code {
  width: 30ch !important;
}

/* ------------------------------
   Quick filter bar (Sale list)
   ------------------------------ */

.quick-date-bar {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 6px;
  background: var(--body-bg, #fff);
}

.quick-date-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-date-buttons .button.active {
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.quick-date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quick-date-label {
  font-size: 12px;
  opacity: 0.9;
}

.quick-date-form input[type="date"],
.quick-date-form input[type="number"] {
  min-width: 140px;
}

@media (max-width: 900px) {
  .quick-date-form input[type="date"],
  .quick-date-form input[type="number"] {
    min-width: 120px;
  }
}


/* ------------------------------
   Admin color theme
   Requested:
   - #264b5d -> #64881a
   - #417690 -> #c5cf5e
   ------------------------------ */

:root{
  --admin-green: #64881a;
  --admin-accent: #c5cf5e;
  --admin-bg: #e0e1b5;
}

body{
  background: var(--admin-bg) !important;
}

/* Header (often #264b5d) */
#header{
  background: var(--admin-green) !important;
}
#header a:link,
#header a:visited{
  color: #fff !important;
}

/* Breadcrumbs / module titles (often #417690) */
div.breadcrumbs{
  background: var(--admin-accent) !important;
  color: #111 !important;
}
div.breadcrumbs a{
  color: #111 !important;
}

.module h2,
.module caption,
.inline-group h2{
  background: var(--admin-accent) !important;
  color: #111 !important;
}

/* Buttons */
.button,
input[type=submit],
input[type=button],
.submit-row input,
a.button{
  background: var(--admin-green) !important;
  border-color: var(--admin-green) !important;
  color: #fff !important;
}

.button:hover,
.button:focus,
input[type=submit]:hover,
input[type=submit]:focus,
input[type=button]:hover,
input[type=button]:focus,
.submit-row input:hover,
.submit-row input:focus,
a.button:hover,
a.button:focus{
  background: #4f6c14 !important;
  border-color: #4f6c14 !important;
  color: #fff !important;
}

/* Links */
a:link,
a:visited{
  color: var(--admin-green);
}
a:hover,
a:focus{
  color: #4f6c14;
}
