html{
	/* background: linear-gradient(-45deg, #f5deb3, #c3aca1); */
	background: #cccccc;
	overflow: auto;
	width: 100%;
}
html, body {
    height: 100%;
}

table input {
	box-sizing: border-box;
	width: 100%;
}

table{
	border-top: 1px solid black;
	width: 100%;
	height: 80%;
	border-bottom: 1px solid black;
	margin: 2ch 0;
	counter-reset: sn;
	display: flex;
	flex-direction: column;
}

#ledger_table tr {
    display: grid;
    grid-template-columns: 0.5fr 1fr 3fr repeat(3, 1fr);
}

#insert_table {
    tr {
	display: grid;
	grid-template-columns: 0.5fr 3fr repeat(5, 1fr);
    }
    tfoot tr {
	grid-template-columns:  5.5fr 2fr 1fr;
    }
}


tbody tr:nth-child(even){
	background: #aaaaaa;
}

tbody .counter::after {
	counter-increment: sn;
	content: counter(sn);
}

input, button {
	border-radius: 0.4em;
}

input:invalid {
	border: 1px dashed #ffaaaa;
	&:focus {
		border: none;
	}
}

.delme {
	font-size: 0.7em;
	/* background-color: #df8933; */
	background-color: #dc8464;
	margin: auto;
}

tfoot {
    border-top: 1px solid black;
}

/* .amount, */ tfoot .number {
    /* padding-right: 2ch; */
    font-weight: bold;
}

.number {
	text-align: right;
}

@media screen and (width >= 100ch){
	body {
		margin: auto;
		padding-top: 1ch;
		width: 95%;
		font-size: 1.2em;
		line-height: 1.3;
	}
	input {
		margin-bottom: 1ch;
	}
	table input {
		margin-bottom: 0.5ch;
	}
	#view_container {
	    width: 80%;
	}
}

.error {
	color: red;
}

nav {
	border-bottom: 1px solid black;
	margin-bottom: 1ch;
}

nav li {
	display: inline;
}

#miti-label, .submit-btn {
    float: right;
}

.line_mover {
    display: inline-flex;
    flex-direction: column;
    /* somehow the buttons move down */
    transform: translateY(-25%);
}

.line_mover_btn {
    height: fit-content;
    line-height: 0.6em;
    border: none;
    background-color: transparent;
}

.line_mover_btn:hover {
    background-color: grey;
}

#reset_lines {
    margin-top: 2ch;
}

.party_name_input {
    min-width: 20ch;
    width: 20%;
}

#view_container {
    counter-reset: sn;
}

#view_container {
    .bill_line {
	display: grid;
	grid-template-columns: 1fr 3fr repeat(4, 1fr);
    }
    tfoot {
	display: flex;
	tr {
	    width: 100%;
	    align-self: flex-end;
	}
    }
}

#view_edit_btn {
    display: inline-block;
    input {
	background-color: #BD5500;
    }
}

.editing {
    background-color: #cdac99;
}

@media print {
	html {
	    background: white;
	    padding-left: 5ch;
	    padding-right: 3ch;
	}
	tbody tr:nth-child(even){
		background: #cccccc;
	}
	nav,
	.line_mover,
	input[type="button"],
	button,
	.ledger_view,
	#de_container {
		display: none;
	}
        input {
            border: none;
	    background-color: transparent;
        }
	table, th, td {
	    border: 1px solid black;
	    border-collapse: collapse;
	}
	label:has(input[value=""]) {
	    display: none;
	}
	#view_container tfoot {
	    flex-grow: 1;
	}
	#view_edit_btn {
	    display: none;
	}
}
