/* styles.css */

  .clear:after { content: "."; display: block; height: 0;	font-size: 0; clear: both; visibility: hidden; }
  .clear { display: inline-block; }
  .clear { display: block; }

body {
  margin: 0;
  padding: 0;
  font: small Helvetica, Arial, sans-serif;
  background-color: black;
  color: white;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Opera and Firefox */
}

#lightbox	{ width: 100%; height: 100%; background: #000; left: 0; opacity: 0.85; position: absolute; top: 0; z-index: 1000;}
/* #keypad	{ position: relative; width: 80%; margin: 10% auto 0; max-width: 600px; } */
/* #keypad {
    display: flex;
    flex-wrap: wrap;
  } */
#keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    grid-column-gap: 15px;
    grid-row-gap: 15px;
    width: 90vw;
    height: 90vh;
    max-width: 400px;
    max-height: 700px;
    margin: 1vh 1vw;
}
.digit {
    position: relative;
    border-radius: 15px;
    background: #FFF;
    cursor: pointer;
    z-index: 1001;
    text-align: center;
    color: #000;
    font-size: 7vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.digit:active { background: yellow; }
.incorrect	{ color: #dc2626; }

#main	{ display: none; }
#mainnav {
	max-width: 1000px;
	margin: 0 auto;
}

h3 { text-align: center; }


/* header = 708858 */
a.header:link {color: #FF0000; text-decoration: none; font-size: 13pt; font-weight: bold;}
a.header:visited {color: #FF0000; text-decoration: none; font-size: 13pt; font-weight: bold;}
a.header:hover {color: #FF823D; text-decoration: none; font-size: 13pt; font-weight: bold;}


/* blue = 004F98 */
a.blue:link {color: #000168; text-decoration: none; font-size: 12pt; font-weight: bold;}
a.blue:visited {color: #000168; text-decoration: none; font-size: 12pt; font-weight: bold;}
a.blue:hover {color: #000168; text-decoration: underline; font-size: 12pt; font-weight: bold;}

table th, table td {
    padding: 3px;
}


.header	{ /* background-color:#45BAC0; */ font-size: 14px; text-align:left; cursor: pointer; padding: 1px 0 5px; }

#blocks {
    display: flex;
    align-content: space-evenly;
    justify-content: space-evenly;
    align-items: stretch;
    flex-wrap: wrap;
}
.catContain {
    flex: 48% 0 1;
    margin-bottom: 5px;
    border-radius: 5px;
	overflow: hidden;
	background-color: #efefef;
	color: #000;
	position: relative;
}
.catContain.recent {
	background-color: lightyellow;
}
@media (min-width: 600px) {
	.catContain { flex: 32% 0 1; }
}

.progress {
    position: relative;
    background-color: #45BAC0;
    height: 4px;
    border-top: 1px solid #000;
}
.spacer	{ height: 15px; }
.rcat	{ text-align: center; font-size: 18px; padding: 4px 8px; }
.note { font-size: 12px; margin: 0 5px; }
.afterwindow .next,
.inwindow .next,
.beforewindow .next {
	color: #fff;
	padding: 2px 5px;
	text-align: center;
    background-color: #64748b;
}
.afterwindow .next { background-color: #dc2626; }
.inwindow .next { background-color: #16a34a; }
/* .beforewindow .next { color: inherit; } */

.preprogress, .inprogress, .postprogress {
	height: 4px;
	position: absolute;
	top: 0;
	width: 0%;
	transition: width .5s linear;
}
.preprogress { background-color: yellow; left: 0; }
.progresscontain:not(.beforewindow) .preprogress { background-color: #FFFF80; }
.inprogress { background-color: #16a34a; transition-delay: .5s; }
.afterwindow .inprogress { background-color: #80BF80; }
.postprogress { background-color: #dc2626; transition-delay: 1s; }
/*
.beforewindow .progress { background-color: yellow; }
.inwindow .progress { background-color: #16a34a; }
.afterwindow .progress { background-color: #dc2626; }
*/

.timeline {
    position: relative;
    height: 15px;
    margin: 0 5px;
    overflow: hidden;
    background: #e5e7eb;
}

/* Segments */
.timeline-bar {
    position: absolute;
    top: 0;
    bottom: 0;
}

.timeline-bar.before {
    left: 0;
    background: #cbd5e1;
}

.timeline-bar.window {
    background: #4ade80;
}

.timeline-bar.after {
    background: #fca5a5;
}

/* Marker */
.timeline-marker {
    position: absolute;
    top: 0px;
    text-align: center;
    margin-left:-4px;
}

.timeline-marker .dot {
    width: 3px;
    height: 15px;
    background: #111827;
    display: block;
    margin: 0 auto;
    border-width: 0 1px;
    border-style: solid;
    border-color: #fff;
}

.timeline-marker .label {
    font-size: 11px;
    margin-top: 4px;
    white-space: nowrap;
}

/* Labels */
.timeline-label {
    position: absolute;
    top: 42px;
    font-size: 12px;
    color: #374151;
}

.timeline-label.start {
    left: 0;
}

.timeline-label.next {
    right: 0;
}

/* Contextual coloring */
.timeline.beforewindow .dot { background: #64748b; }
.timeline.inwindow .dot { background: #16a34a; }
.timeline.afterwindow .dot { background: #dc2626; }

.progresscontain > td { border-top: 1px solid #000; position: relative; height: 5px; }
/* .prewindow {
    background-color: rgba(255,255,255,.5);
    height: 4px;
    position: absolute;
    width: 40%;
    top: 0;
    left: 0;
}
.window {
    height: 4px;
    position: absolute;
    width: 20%;
    top: 0;
    border-right: 1px solid #000;
    border-left: 1px solid #000;
    margin-left: -1px;
}
.beforewindow .window { background-color: #A2DCDF; }
.window.start { left: 40%; }
.window.end { right: 40%; } */

.btn	{ border: none; text-align: center; background-color: #256290; color: white; width: 100%; cursor: pointer; padding: 4px 0; }
.action { 
	display: none;
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
}
.action .btn	{ width: 50%; float: left; display: block; }
.action .btn.mark	{ border-right: 1px solid #000; width: calc(50% - 1px); }
/* .before	{ background: #16a34a; } */
/* .past	{ background: #dc2626; } */
/* .in-before	{ box-shadow: inset 0 0 3px 3px #16a34a; } */
/* .in-past	{ box-shadow: inset 0 0 3px 3px #dc2626; } */
.hide	{ margin: 30px auto; padding: 10px 0; width: 50%; max-width: 300px; min-width: 200px; }

.detail { /* border: 1px solid #45BAC0; */ /* background-color: #45BAC0; */  }

/*  CALENDAR  */
#priorMonths {
	margin: 0 0 20px;
	background-color: #fff;
	border-color: #333;
}
#priorMonths th {
	background-color: #333;
	color: #fff;
	padding: 5px;
}
#priorMonths .projection-note th {
	color: #b8c2cc;
	font-size: 10px;
	font-weight: normal;
	padding: 2px 5px;
}
#priorMonths td {
    color: #333;
	padding: 3px;
}
#priorMonths a {
	color: #333;
	display: block;
}
#priorMonths a.current {
	box-shadow: 0 0 0 3px yellow;
}
#priorMonths .outlier {
    background-color: #999;
}
#priorMonths .upper.outlier {
    background-color: #16a34a;
    color: #fff;
}
#priorMonths .lower.outlier {
    background-color: #dc2626;
    color: #fff;
}
#priorMonths .outlier a {
    color: #fff;
}

.container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 12px 40px;
}
.navbtn {
    background-color: #333;
    color: #fff;
    padding: 0 3px;
    text-align: center;
    min-width: 23px;
    display: inline-block;
    font-size: 15px;
    margin: 2px 1px;
    line-height: 15px;
}
#calendar {
	margin-top: 25px;
}

.stats-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 20px;
}
.summary-card, .stats-panel {
	background: #111820;
	border: 1px solid #293744;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.summary-card {
	padding: 14px;
	min-width: 0;
}
.summary-label {
	display: block;
	color: #91a4b5;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: .06em;
	margin-bottom: 8px;
	text-transform: uppercase;
}
.summary-card strong {
	display: block;
	font-size: 16px;
	line-height: 1.2;
	margin-bottom: 5px;
}
.stats-summary .summary-card:nth-child(1) > strong,
.stats-summary .summary-card:nth-child(2) > strong {
	font-size: clamp(10px, 3.25vw, 16px);
	letter-spacing: -.02em;
	white-space: nowrap;
}
.summary-card small { color: #91a4b5; }
.status-text.before { color: #facc15; }
.status-text.in-before, .status-text.in-past { color: #4ade80; }
.status-text.past { color: #f87171; }
.trend.up, .change.up { color: #4ade80; }
.trend.down, .change.down { color: #f87171; }
.trend.neutral, .change.neutral { color: #b6c2cc; }
.stats-panel { margin-top: 14px; padding: 16px; }
.panel-heading, .history-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}
.panel-heading h2, .history-heading h2 { font-size: 18px; margin: 0 0 3px; }
.panel-heading p, .history-heading p { color: #91a4b5; margin: 0; }
.chart-range {
	background: #1d2a35;
	border-radius: 999px;
	color: #b8c7d3;
	font-size: 11px;
	padding: 5px 9px;
	white-space: nowrap;
}
.chart-wrap { height: 230px; margin-top: 14px; }
.history-heading { margin: 28px 0 10px; }
.history-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 5px 12px;
	color: #a8b7c3;
	font-size: 11px;
	max-width: 430px;
}
.history-legend span { white-space: nowrap; }
.legend-swatch {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	margin-right: 4px;
}
.legend-swatch.high { background: #16a34a; }
.legend-swatch.typical { background: #fff; }
.legend-swatch.low { background: #dc2626; }
.legend-swatch.selected { background: #fff; box-shadow: 0 0 0 2px #f4e500; }
.rate-table { border-collapse: collapse; margin-top: 12px; }
.rate-table th {
	background: #1d2a35;
	color: #dbe7f1;
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.rate-table th, .rate-table td { border-bottom: 1px solid #293744; padding: 8px; }
.rate-table tr:last-child td { border-bottom: 0; }
.occurrence-dialog {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2000;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .72);
	padding: 20px;
}
.occurrence-dialog.open { display: flex; }
.dialog-card {
	background: #18222c;
	border: 1px solid #3a4b59;
	border-radius: 10px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
	max-width: 340px;
	padding: 20px;
	width: 100%;
}
.dialog-card h2 { margin: 0 0 10px; }
.dialog-card p { font-size: 15px; }
.dialog-card .dialog-help { color: #9eb0bd; font-size: 12px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 18px; }
.dialog-actions .btn { border-radius: 4px; padding: 9px; }
.btn.secondary { background: #52616d; }
.btn.danger { background: #c62828; }

@media (max-width: 700px) {
	.stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.panel-heading, .history-heading { display: block; }
	.chart-range { display: inline-block; margin-top: 10px; }
	.history-legend { justify-content: flex-start; margin-top: 10px; }
}

@media (max-width: 430px) {
	.stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.summary-card { padding: 12px; }
	.chart-wrap { height: 200px; }
	.rate-table th, .rate-table td { font-size: 11px; padding: 6px 3px; }
	#calendar .occurances .occurance { font-size: 11px; padding: 5px 4px; }
}
#calendar table, #calendar th, #calendar td {
	border-color: #333;
}
#calendar .dayCol:not(.isFuture) .day {
	cursor: pointer;
}
#calendar .dayCol.isFuture {
    color: #333;
}
#calendar .dayCol.isToday {
	background-color: #1A1A1A;
}
#calendar .dayCol.isToday .day {
	color: gold;
}
#calendar .dayCol.notMonth {
    background-color: #333;
    color: #666;
}
#calendar .occurances {
    min-height: 20px;
    margin-bottom: 10px;
}
#calendar .occurances .occurance {
    display: inline-block;
    background-color: blue;
    margin: 3px 1px;
    padding: 5px;
    font-size: 12px;
    line-height: 12px;
	white-space: nowrap;
    cursor: pointer;
    border-radius: 5px;
}
#calendar .occurances .occurance.next {
	cursor: inherit;
}
#calendar .occurances .occurance.next.before { background-color: yellow; color: #333; }
#calendar .occurances .occurance.next.in-before,
#calendar .occurances .occurance.next.in-past { background-color: #16a34a; }
#calendar .occurances .occurance.next.past { background-color: #dc2626; color: #fff; }

#addNewDate {
	margin: 14px 0 0;
}
#addNewDate .btn {
	border-radius: 5px;
	display: inline-block;
	font-weight: bold;
	padding: 9px 14px;
	width: auto;
}
.occurrence-entry-heading h2 {
	font-size: 18px;
	margin: 0 0 3px;
}
.occurrence-entry-heading p {
	color: #91a4b5;
	margin: 0 0 14px;
}
.backfill-controls {
	display: grid;
	grid-template-columns: minmax(170px, 1.3fr) minmax(90px, .7fr) auto;
	align-items: stretch;
	gap: 8px;
}
.occurrence-field {
	background: #0b1117;
	border: 1px solid #314352;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 44px;
	padding: 5px 10px;
}
.occurrence-field > span {
	color: #91a4b5;
	font-size: 9px;
	font-weight: bold;
	letter-spacing: .05em;
	margin-bottom: 2px;
	text-transform: uppercase;
}
#addNewDate .record-now {
	align-items: center;
	background: linear-gradient(135deg, #168447, #0e6536);
	box-shadow: 0 5px 16px rgba(22, 132, 71, .2);
	display: flex;
	gap: 10px;
	justify-content: center;
	padding: 11px 16px;
	width: 100%;
}
.record-now-icon {
	align-items: center;
	background: rgba(255, 255, 255, .16);
	border-radius: 50%;
	display: flex;
	font-size: 20px;
	height: 28px;
	justify-content: center;
	line-height: 1;
	width: 28px;
}
.record-now strong, .record-now small { display: block; text-align: left; }
.record-now strong { font-size: 14px; }
.record-now small { color: rgba(255, 255, 255, .75); font-size: 10px; font-weight: normal; margin-top: 1px; }
.occurrence-divider {
	display: flex;
	align-items: center;
	color: #7f929f;
	font-size: 10px;
	letter-spacing: .04em;
	margin: 13px 0 9px;
	text-transform: uppercase;
}
.occurrence-divider:before, .occurrence-divider:after {
	background: #293744;
	content: '';
	flex: 1;
	height: 1px;
}
.occurrence-divider span { padding: 0 9px; }
#addNew { white-space: nowrap; }
#newDate {
	display: block;
	font-size: 13px;
	white-space: nowrap;
}
#newHour {
	background: transparent;
	border: 0;
	color: #fff;
	font: inherit;
	font-weight: bold;
	margin: 0 0 0 -4px;
	padding: 0;
	width: 100%;
}
@media (max-width: 520px) {
	.backfill-controls { grid-template-columns: minmax(0, 1.4fr) minmax(85px, .6fr); }
	#addNew { grid-column: 1 / -1; width: 100% !important; }
}
#nav {
    background: #256290;
    left: 0;
    padding: 10px;
    position: fixed;
    text-align: center;
    top: 0;
    width: 100%;
    z-index: 1000;
    color: #fff;
}
#nav a	{ color: #FFF; }
#statsmain	{ margin-top: 35px; }
.calmain	{ position: relative; width: 100%; height: 60px; }
.calmark	{ position: absolute; width: 100%; height: 10px; background: blue; left: 0; top: 3%; box-shadow: inset 0 0 3px 1px #FFF; font-size: 9px; text-align: center; line-height: 9px; }
.calmark1	{ background: #16a34a; }


.header h3 {
    text-align: center;
    margin: 5px;
    display: block;
    position: relative;
}
