body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

main {
    padding: 20px;
}

section {
    margin-bottom: 20px;
}

footer {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
}

/* Dashboard */
.dashboard .card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.stats .stat {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.stats a.stat:hover {
    border-color: #0d6efd;
}

.stats .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.stats .stat-label {
    color: #6c757d;
    font-size: .875rem;
}

.stats .stat-main {
    border-color: #10a37f;
}

.stats .stat-main .stat-value {
    color: #10a37f;
}

.stats .stat-error .stat-value {
    color: #f80000;
}

.run-error td {
    border-top: 0;
    padding-top: 0;
}

/* Hourly view of today's schedule */
.day-view {
    display: flex;
    flex-direction: column;
}

.day-hour {
    display: flex;
    border-top: 1px solid #f1f3f5;
    min-height: 2.25rem;
}

.day-hour-empty {
    min-height: 1.25rem;
}

.day-hour-label {
    flex: 0 0 4.5rem;
    padding: 2px 12px;
    color: #6c757d;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}

.day-hour-entries {
    flex: 1;
    padding: 3px 12px 3px 0;
}

.day-hour-now {
    background: #e7f1ff;
}

.day-hour-now .day-hour-label {
    color: #0d6efd;
    font-weight: 600;
}

.day-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    margin: 2px 0;
    border-left: 3px solid #adb5bd;
    background: #f8f9fa;
    border-radius: 4px;
}

.day-entry-time {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.day-entry-success { border-left-color: #198754; }
.day-entry-error { border-left-color: #dc3545; }
.day-entry-missed { border-left-color: #ffc107; }
.day-entry-running { border-left-color: #0dcaf0; }
.day-entry-scheduled { border-left-color: #0d6efd; }

.state-dot {
    display: inline-block;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    margin-right: .5rem;
    vertical-align: baseline;
}

/* Page Schedules: grid times x days */
.schedule-grid .time-input {
    width: 7.5rem;
}

.schedule-grid th.today, .schedule-grid td.today {
    background-color: var(--bs-primary-bg-subtle);
}

.schedule-grid .day-head {
    font-weight: 600;
    text-decoration: none;
    color: var(--bs-body-color);
}

.slot-cell {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-body-bg);
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.slot-cell:hover {
    border-color: var(--bs-primary);
}

.slot-cell.on {
    border: 1px solid var(--bs-primary);
    background: var(--bs-primary);
}

.slot-cell.next {
    box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--bs-success);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info dd {
    margin-bottom: .4rem;
}


/* Site of the page (site_filter.html), logout of the menu */
.site-filter select {
    min-width: 11rem;
    max-width: 16rem;
}

.page-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.navbar .btn-link.nav-link {
    text-decoration: none;
}

.min-w-0 {
    min-width: 0;
}

/* Messages */
.message-cell {
    min-width: 18rem;
    max-width: 40rem;
}

.message-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
}

.queue-move .btn {
    padding: 0 .4rem;
    line-height: 1.4;
}

/* Preview of a notification (similar to Chrome on the desktop) */
.notification-preview {
    max-width: 360px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    overflow: hidden;
    font-size: .875rem;
}

.np-header {
    padding: 8px 12px 0;
    color: #6c757d;
    font-size: .75rem;
}

.np-main {
    display: flex;
    gap: 12px;
    padding: 6px 12px 10px;
}

.np-text {
    flex: 1;
    min-width: 0;
}

.np-title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.np-body {
    color: #495057;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}

.np-image {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.np-actions {
    display: flex;
    border-top: 1px solid #e9ecef;
}

.np-actions span {
    flex: 1;
    padding: 8px 12px;
    color: #0d6efd;
    text-align: center;
}

.np-actions span + span {
    border-left: 1px solid #e9ecef;
}

/* Subscribers: active per day (one series, bars from the baseline) */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 10rem;
    border-bottom: 1px solid #dee2e6;
}

.bar-slot {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    cursor: default;
}

.bar-slot .bar {
    width: 100%;
    min-height: 1px;
    background: #10a37f;
    border-radius: 4px 4px 0 0;
}

.bar-slot:hover .bar, .bar-slot:focus .bar {
    background: #0b7a5f;
}

/* Subscribers: share of the push services */
.share-row {
    display: block;
    padding: 4px 0 8px;
    color: inherit;
    text-decoration: none;
}

.share-track {
    height: 8px;
    background: #f1f3f5;
    border-radius: 4px;
    margin-top: 2px;
}

.share-bar {
    height: 100%;
    background: #10a37f;
    border-radius: 4px;
}

.share-row:hover .share-bar {
    background: #0b7a5f;
}

/* Test page of a site: debug log */
.debug-log {
    flex: 1;
    min-height: 24rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px 12px;
    background: #f8f9fa;
    font-family: SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .8rem;
}

.debug-line {
    padding: 3px 0;
    border-bottom: 1px solid #eef0f2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.debug-ok { color: #146c43; }
.debug-info { color: #495057; }
.debug-warn { color: #997404; }
.debug-error { color: #b02a37; font-weight: 600; }

.debug-detail {
    margin: 2px 0 2px 1.5rem;
    color: #6c757d;
    font-weight: normal;
}

.debug-hint {
    margin: 2px 0 2px 1.5rem;
    color: #0a58ca;
    font-weight: normal;
}

/* Info icon of a form field: tooltip with the explanation */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: .3rem;
    border: 1px solid #6c757d;
    border-radius: 50%;
    color: #6c757d;
    font-size: .65rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1;
    vertical-align: .1em;
    cursor: help;
    user-select: none;
}

.info-tip:hover, .info-tip:focus {
    border-color: #0d6efd;
    color: #0d6efd;
    outline: none;
}

.tooltip-inner {
    max-width: 22rem;
    text-align: left;
}
