/* ── Dashboard cards ──────────────────────────── */
.dash-cards-row {
    display: flex;
    align-items: stretch;
    padding: 0 20px;
}

.dash-cards-row > .col-md-4 {
    display: flex;
    flex-direction: column;
}

.dash-card {
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    margin-bottom: 24px;
    background: #fff;
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #fff;
}

.dash-card-icon {
    font-size: 26px;
    opacity: .9;
}

.dash-card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.dash-card-body {
    padding: 8px 0 4px;
}

.dash-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 20px;
    border-bottom: 1px solid #f2f2f2;
}

.dash-stat:last-child {
    border-bottom: none;
}

.dash-stat-label {
    font-size: 13px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.dash-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.bg-orders       { background: #1E88E5; }
.bg-users        { background: #00897B; }
.bg-todays-order { background: #3949AB; }


/*Styles for users*/
.user-list-container{
    padding-left: 15px;
    padding-right: 15px;
}

.order-list-container{
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 40px;
}

.table {
    text-align:center;
    margin-bottom: 10px;
    border: 1px solid lightgray;
}

.table th {
    text-align:center;
}

.table tbody>tr>td {
    vertical-align: middle;
}

/*Styles for store settings*/
.panel > .panel-heading{
    background-color: #ECEFF1;
    border-color: #CFD8DC;
    color: #37474F;
}

.panel{
    border: solid 1px #CFD8DC;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* CKEditor 5 — keep editor within its Bootstrap col-md-9 column */
.ck-field-wrapper .ck.ck-editor {
    width: 100%;
    max-width: 100%;
}
.ck-field-wrapper .ck-editor__editable {
    min-height: 200px;
}
/* django_ckeditor_5's app.js forces the label's float to none inline;
   restore the col-md-3 left float so it aligns with the other field labels. */
label[for="id_help_html"] {
    float: left !important;
}

.store-param-container{
    margin-left: 15px;
}

.help-text-container{
    margin-right: 15px;
}

/*──────────────────────────────────────────────
  Orders page — filter bar
──────────────────────────────────────────────*/
.filter-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin: 0;
}
.filter-group input,
.filter-group select {
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0 8px;
    font-size: 13px;
    color: #333;
}
.filter-group.search-group input  { width: 220px; }
.filter-group.date-group input    { width: 120px; }
.filter-group.status-group select { width: 140px; }
.filter-group.paginate-group select { width: 80px; }
.btn-apply {
    height: 34px;
    padding: 0 20px;
    align-self: flex-end;
}

/*──────────────────────────────────────────────
  Orders page — table
──────────────────────────────────────────────*/
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.orders-table thead tr {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}
.orders-table thead th {
    padding: 10px 12px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}
.orders-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.1s;
}
.orders-table tbody tr:hover { background: #f9f9f9; }
.orders-table td {
    padding: 9px 12px;
    vertical-align: middle;
}

/*──────────────────────────────────────────────
  Orders page — status badge (inline select)
──────────────────────────────────────────────*/
.status-select-cell .cs-wrap { width: 130px; }
.cs-status-trigger {
    height: 30px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    padding: 0 8px 0 10px;
}
.cs-status-trigger.bg-green { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.cs-status-trigger.bg-red   { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.cs-status-trigger.bg-grey  { background: #e2e3e5; color: #383d41; border-color: #d6d8db; }
.cs-status-trigger.bg-blue  { background: #cce5ff; color: #004085; border-color: #b8daff; }
.cs-status-trigger:hover, .cs-status-trigger.cs-open, .cs-status-trigger:focus {
    box-shadow: none;
    border-color: inherit;
    filter: brightness(0.95);
}

/*──────────────────────────────────────────────
  Orders page — action buttons & misc
──────────────────────────────────────────────*/
.action-link {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    margin-right: 2px;
}
.action-link:hover {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}
.muted-dash { color: #aaa; }
.table-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

/*──────────────────────────────────────────────
  Orders page — pagination (theme colour)
──────────────────────────────────────────────*/
.pagination-wrapper { margin: 10px 0; }
.pagination-wrapper .pagination { margin: 0; }
.pagination > li > a,
.pagination > li > span { color: #00897B; }
.pagination > li > a:hover,
.pagination > li > a:focus {
    color: #fff;
    background-color: #00897B;
    border-color: #00897B;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > a:focus,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
    background-color: #00897B;
    border-color: #00897B;
    color: #fff;
}

/*──────────────────────────────────────────────
  Order color swatches
──────────────────────────────────────────────*/
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.color-swatch-white     { background: linear-gradient(to bottom, #e0e0e0 50%, #ffffff 50%); border-color: #aaa; }
.color-swatch-black     { background: linear-gradient(to bottom, #ffffff 50%, #222222 50%); }
.color-swatch-red       { background: linear-gradient(to bottom, #ffffff 50%, #cc0000 50%); }
.color-swatch-blue      { background: linear-gradient(to bottom, #ffffff 50%, #0055bb 50%); }
.color-swatch-green     { background: linear-gradient(to bottom, #ffffff 50%, #007a3d 50%); }
.color-swatch-lightgrey { background: lightgrey; }

/*──────────────────────────────────────────────
  Custom select dropdown (cs-wrap) — same design as canvas page
──────────────────────────────────────────────*/
.cs-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}
.cs-wrap select.cs-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    border: none;
}
.cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 34px;
    padding: 0 10px 0 12px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    user-select: none;
    transition: border-color .15s, box-shadow .15s;
    white-space: nowrap;
    overflow: hidden;
}
.cs-trigger:hover { border-color: #adb5bd; }
.cs-trigger.cs-open,
.cs-trigger:focus {
    outline: none;
    border-color: #558B2F;
    box-shadow: 0 0 0 3px rgba(85,139,47,.18);
}
.cs-trigger-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: transform .2s ease;
}
.cs-chevron svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cs-trigger.cs-open .cs-chevron { transform: rotate(180deg); color: #558B2F; }
.cs-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1050;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.cs-panel.cs-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.cs-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background .1s;
}
.cs-option:not(:last-child) { border-bottom: 1px solid #f0f0f0; }
.cs-option:hover { background: #F1F8E9; }
.cs-option.cs-selected { background: #DCEDC8; color: #33691E; font-weight: 600; }
.cs-tick svg {
    width: 13px;
    height: 13px;
    stroke: #558B2F;
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity .1s;
}
.cs-option.cs-selected .cs-tick svg { opacity: 1; }
.filter-group.status-group .cs-wrap  { width: 140px; }
.filter-group.paginate-group .cs-wrap { width: 80px; }
