/* Basic CSS for tables with classes overview and categories */

body {
    font-family: 'Verdana', sans-serif !important;
}
/* Navigation bar */
.main-nav {
    background-color: #333;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

.nav_button {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 15px 15px;
    text-decoration: none;
    background-color: #333;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1.2em;
    cursor: pointer;
}

.main-nav .nav_button:hover {
    background-color: gray;
    color: white;
    cursor: pointer;
}

.logo {
    float: left;
    display: block;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 2.5em;
    padding: 14px 16px;
    text-decoration: none;
}

/* Footer */
.main-footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    margin-top: 25px;
    bottom: 0;
    width: 100%;
    position: relative;
    padding-bottom: 30px;
}

.footer-icon {
    margin: 0 10px;
    font-size: 0.5em;
    width: 30px;
    height: 30px;
}

/*Home page*/
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6em;
    text-align: center;
}

.home-button {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 15px 15px;
    text-decoration: none;
    background-color: #333;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1em;
}

.home-button:hover {
    background-color: gray;
    color: white;
}

/* All tables */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: left;
}

table th, table td {
    padding: 11px 13px;
    border: 1px solid #bbb;
}

table th {
    background-color: #d9d9d9;
    color: #222;
}

table tr:nth-child(odd) {
    background-color: #f1f1f1;
}

table.overview {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: center;
    table-layout: fixed;
}

table.overview th {
    background-color: #333;
    color: white;
}



table.categories {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: left;
    table-layout: fixed;
}

table.categories th {
    background-color: #333;
    color: white;
}

table.savings {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: left;
}

table.savings th {
    background-color: #333;
    color: white;
}

table.savings tr:nth-child(odd) {
    background-color: #f1f1f1;
}

table.savings tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Left Right Container */

.container {
    display: flex;
}

.left {
    flex: 1;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


/*Form*/

.form {
    width: 90%;
    margin: 0 auto;
    margin: 20px;
    padding: 35px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
}

.form label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: center;
    align-items: center;
    padding: 10px;
    margin: 5px;
    font-size: 1.3em;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="date"],
.form input[type="number"],
.form input[type="select"],
.form textarea {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-block;
    font-size: 1.2em;
    width: 50%;
}


.form input[type="date"] {
    padding: 5px;
    font-size: 1.2em;
}

.form-group {
    display: block;
    width: 100%;
    align-items: left;
    text-align: right;
    padding-right: 25 px;
}

.form select {
    width: 50%;
    padding: 10px;
    font-size: 1.5em;
}

.form-button {
    width: 50%;
    padding: 10px;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 0;
    font-size: 1.2em;
}

.form-button:hover {
    background-color: gray;
}

/* Pop up form */

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.graph-popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.popup-content {
    background-color: #333;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    text-align: center;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.pop-button {
    width: 50%;
    padding: 10px;
    color: black;
    background-color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 0;
    font-size: 1.2em;
}

.pop-button:hover {
    background-color: gray;
}


.error-message {
    color: red;
    margin: 10px 0;
    border: 1px solid red;
    padding: 10px;
    text-align: center;
    background-color: #ffe6e6;
    border-radius: 4px;
    font-size: 2em;
}

.error-close {
    color: red; 
    font-weight: bold; 
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.error-close:hover {
    color: black;
    font-size: 1.05em;
}


.link {
    text-align: center;
    font-weight: bold;
    color: black;
    text-transform: uppercase;
    text-decoration: none;
}

.link:hover {
    color: #333;
    font-size: 1.05em;
}

.form input[type="submit"] {
    width: 100%;
    padding: 10px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px 0;
}

.form input[type="submit"]:hover {
    background-color: #0056b3;
}

.form input[type="submit"]:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


.transactions {
    width: 100%;
    border-collapse: collapse;
}
.transactions th, .transactions td {
    border: 1px solid #ddd;
    padding: 8px;
}
.transactions th {
    background-color: #f2f2f2;
}



.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(
        green calc(var(--progress) * 1%), 
        lightgray 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle span {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
}

.progress-circle.over-50 {
    background: conic-gradient(
        green calc(var(--progress) * 1%), 
        lightgray 0
    );
}


.graph {
    width: 48%;
    display: inline-block;
}

.all-graphs {
    display: flex;
    justify-content: space-between;
}

.graphs {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}