html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 360px;
    height: 100dvh;
    background-color: #ddd;
    margin: 0 auto;
}

header {
    position: fixed;
    top: 0;
    width: 360px;
    background-color: #0070c0;
    border-radius: 0 0 7px 7px;
    border: 2px solid black;
    box-sizing: border-box;
    z-index: 10;
    color: white;
}

.header1 {
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.header1 a {
    text-decoration: none;
    color: #0070c0;
    background-color: #fff;
    text-align: center;
    border-radius: 5px;
    font-size: 25px;
    width: 32px;
}

.menuIcon {
    width: 25px;
    height: 25px;
    margin-top: 9px;
}

h1 {
    margin: 0;
    padding-left: 15px;
    font-style: italic;
}

.header2 {
    margin: 10px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-weight: 600
}

.header3 {
    margin: 10px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-weight: 600
}

.expense {
    color: #f20;
}

.income {
    color: #00ff00;
}

.typename {
    text-align: center;
    font-weight: 600;
}

.typeAmt {
    text-align: center;
    font-weight: 400;
}

main {
    position: absolute;
    top: 140px;
    bottom: 70px;
    left: 0;
    right: 0;
    overflow-y: auto;
    text-align: center;
    width: 360px;
    margin: auto;
}

.sortAccounts {
    left: 0px;
    text-align: right;
    margin: 10px;
    right: 0px
}

#sortAccounts {
    border: 1px solid black;
    text-align: center;
    border-radius: 5px;
}

#accountList,
#categoryList {
    margin-bottom: 20px;
}

.addAccount,
.addCategory {
    background-color: #999;
    display: inline;
    text-align: center;
    padding: 5px 10px;
    border: 1px solid black;
    border-radius: 5px;
    cursor: pointer;
}

#recordForm {
    padding: 100px 10px;
    background-color: #bbb;
    border: 1px solid black;
    box-sizing: border-box;
    position: fixed;
    width: 360px;
    height: 100vh;
    z-index: 15;
    top: -1000px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: top 0.5s ease-in-out;

}

.formHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formHeader h2 {
    margin: 0 10px;
    font-size: 20px;
    color: #333;
}

.formOption {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn.cancel {
    background: #f44336;
    color: white;
}

.btn.cancel:hover {
    background: #d32f2f;
}

.btn.save {
    background: #4caf50;
    color: white;
}

.btn.save:hover {
    background: #388e3c;
}

.recordType {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.typeBtn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #eee;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.typeBtn:hover {
    background: #777;
    color: #eee;
}

.recordDetails label,
.dateTime label {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.recordDetails {
    display: flex;
    gap: 15px;
}

#recordCategory,
#recordAccount,
#recordAmount,
#recordDate,
#recordTime,
#recordNotes {
    padding: 8px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.recordNotes {
    min-height: 60px;
    resize: vertical;
}

.dateTime {
    display: flex;
    gap: 15px;
}

#recordList {
    margin: 20px;
}

.recordItem {
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    font-size: 14px;
}

#accountForm,
#categoryForm {
    padding: 7px;
    border: 1px solid black;
    border-radius: 10px;
    background-color: #999;
    box-sizing: border-box;
    text-align: right;
    margin: 20px 20px;
    position: fixed;
    top: -200px;
    transition: top 0.5s ease-in-out;
}

#categoryForm {
    text-align: center;
}

.rName {
    background-color: #fff;
    font-size: 18px;
    margin: 20px 20px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    font-weight: bold;
}

.hidden {
    display: none;
}

#reportSection {
    margin: 15px;
    padding: 15px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #f9f9f9;
}

#reportFilters {
    margin: 10px 0;
}

#reportFilters label {
    display: block;
    margin: 8px 0 4px;
    font-weight: bold;
}

#reportFilters input,
#reportFilters select {
    width: 100%;
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #aaa;
}

.btnGroup {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

#reportOutput {
    margin-top: 15px;
}


footer {
    position: fixed;
    bottom: 0;
    width: 360px;
    background-color: #0070c0;
    border-radius: 15px 15px 0 0;
    border: 2px solid black;
    box-sizing: border-box;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 10;
}

footer a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.footerImg {
    width: 25px;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    margin-bottom: 5px;
}

.menuName {
    font-weight: 600;
}

.addRec {
    position: absolute;
    font-weight: 900;
    font-size: 30px;
    z-index: 5;
    bottom: 90px;
    right: 20px;
    width: 40px;
    background-color: #999;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
}