/* static/css/styles.css */

/* Color Variables */
:root {
    --grey-dark: #133a55;      /* Dark tone of 133a55 */
    --grey-medium: #335f7f;    /* Medium tone of 133a55 */
    --grey-light: #5486a9;     /* Light tone of 133a55 */
    --white: #ffffff;          /* White text color */
    --hover-color: #335f7f;     /* Medium tone for hover effect */
}

/* Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--grey-light);
    overflow-x: hidden;
}

/* Top Navigation Bar with 133a55 Gradient */
.navbar {
    background: linear-gradient(90deg, var(--grey-dark), var(--grey-medium)) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: var(--white) !important; /* White font for top bar */
    font-weight: 500;
}

.navbar .nav-link:hover {
    color: var(--grey-light) !important; /* Lighter tone on hover */
}

/* Sidebar Styling */
#wrapper {
    display: flex;
    align-items: stretch;
}

/* Sidebar Styling */
#sidebar-wrapper {
    position: fixed; /* Fix the sidebar position */
    top: 0;
    left: 0;
    height: 100vh; /* Full height of the viewport */
    width: 220px; /* Fixed width */
    background: var(--grey-medium); /* Sidebar background color */
    overflow-y: auto; /* Enable scrolling if content overflows */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    z-index: 1000; /* Ensure it appears above the main content */
}

/* Sidebar Content Padding */
#sidebar-wrapper .sidebar-heading {
    padding: 1rem;
    text-align: center;
}

/* Adjust Content Area */
#page-content-wrapper {
    margin-left: 220px; /* Same as the sidebar width */
    padding: 20px;
    width: calc(100% - 220px); /* Remaining width after accounting for the sidebar */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        position: absolute;
        width: 100%;
        height: auto;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    #sidebar-wrapper.show {
        transform: translateX(0);
    }

    #page-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}

.sidebar-heading {
    padding: 1rem;
    font-size: 1.1rem;
    background: var(--grey-dark); /* Darker header */
    color: var(--white); /* White font */
    text-align: center;
}

/* Sidebar Menu Items */
.sidebar .list-group-item {
    border: none;
    padding: 12px 20px;
    transition: background 0.3s, color 0.3s, transform 0.3s;
    border-radius: 0;
    margin: 5px 10px;
    color: var(--white) !important; /* White font color */
    background: linear-gradient(90deg, var(--grey-medium), var(--grey-light)); /* Default background */
}

/* Hover State for Sidebar Items */
.sidebar .list-group-item:hover {
    background: linear-gradient(45deg, var(--grey-dark), var(--grey-medium)); /* Gradient on hover */
    color: var(--white) !important; /* Ensure font stays white */
    transform: translateX(5px);
}

/* Active State for Sidebar Items */
.sidebar .list-group-item.active {
    background: linear-gradient(45deg, var(--grey-dark), var(--grey-medium)); /* Gradient for active item */
    color: var(--white) !important; /* Ensure font is white */
    transform: translateX(5px);
}

/* Sidebar Menu Icons */
.sidebar .list-group-item i {
    color: var(--white) !important; /* White icons */
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Page Content Styling */
#page-content-wrapper {
    width: 100%;
    padding: 20px;
    transition: margin 0.3s;
}

.container-fluid {
    padding: 20px;
}

/* Form Styling */
form {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

form:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.form-label {
    font-weight: 600;
    color: var(--grey-dark);
    font-size: 0.9rem;
}

.form-control {
    border-radius: 5px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--grey-dark);
    box-shadow: none;
}

/* Buttons */
.btn-extrude {
    background: linear-gradient(45deg, var(--grey-dark), var(--grey-medium));
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    color: var(--white);
}

.btn-extrude:hover {
    background: linear-gradient(45deg, var(--grey-medium), var(--grey-dark));
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Animations */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #sidebar-wrapper {
        min-width: 100%;
        max-width: 100%;
        position: absolute;
        z-index: 1001;
        height: 100%;
        transform: translateX(-100%);
    }

    #sidebar-wrapper.show {
        transform: translateX(0);
    }

    #page-content-wrapper {
        padding: 20px;
    }

    .navbar .navbar-toggler {
        display: block;
    }

    .sidebar-heading {
        font-size: 1rem;
    }

    .list-group-item {
        padding: 10px 15px;
    }

    .list-group-item i {
        margin-right: 6px;
    }
}

/* Modal Title & Body */
.modal-title {
    font-weight: 600;
    color: #333;
}

/* Container for the user details */
.user-detail-title {
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.user-detail-content {
    font-size: 1rem;
    color: #222;
    margin-bottom: 10px;
}

/* Gradient Header for User Details */
.user-detail-title {
    background: linear-gradient(45deg, var(--grey-light), var(--grey-medium));
    padding: 10px;
    border-radius: 5px;
}

/* Two-column layout */
.row {
    margin-bottom: 15px;
}

.col-md-6 {
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 768px) {
    .col-md-6 {
        flex: 1 0 100%;
    }
}

.table th, .table td {
    /* (Additional table styling may go here) */
}

/* Gradient header for the Loan Details card */
.gradient-header {
    background: linear-gradient(to right, #6a11cb, #2575fc); /* Gradient effect remains unchanged */
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Styling for the loan details card */
.card {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Title styling for loan details */
.loan-detail-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4c4c4c;
    margin-bottom: 10px;
}

/* Value styling for loan details */
.loan-detail-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: #007bff;
    padding-left: 10px;
}

/* Optional: Add spacing between rows */
.row {
    margin-bottom: 15px;
}

/* Table Styling for Amortization Table */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #2575fc;
    color: white;
    font-weight: bold;
}

td {
    background-color: #f8f8f8;
}

tbody tr:nth-child(even) {
    background-color: #f1f1f1;
}

/* Styling for table headers */
thead th {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Enhancing the table's clarity */
table th, table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

table td {
    background-color: #f9f9f9;
}

table tr:nth-child(even) td {
    background-color: #f1f1f1;
}

table tr:hover td {
    background-color: #e1e1e1;
}

/* Styling for the rows of data */
tbody td {
    font-size: 1rem;
    font-weight: normal;
}

/* General accordion styling */
.accordion .card-header {
    background: linear-gradient(90deg, var(--grey-dark), var(--grey-medium)) !important;
    color: var(--white) !important;
    border-radius: 10px;
    padding: 15px;
}

.accordion .card-body {
    background: var(--grey-light);
    border-radius: 10px;
    padding: 20px;
}

.accordion .collapse.show {
    border-radius: 10px;
}

.card {
    border: none;
    border-radius: 15px;
}

.card-body {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.card-body:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.card-header h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

ul.list-unstyled li {
    font-size: 1rem;
    padding: 5px 0;
}

ul.list-unstyled li strong {
    color: var(--grey-dark);
}

/* Hover effects */
.card-body:hover {
    background-color: #f9f9f9;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-body ul li {
    margin-bottom: 10px;
}

/* Gradient Header Styling for Sections */
.gradient-header {
    background: linear-gradient(45deg, var(--grey-dark), var(--grey-medium));
    color: var(--white);
    padding: 10px;
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Accordion Collapse Styling */
.accordion-button:not(.collapsed) {
    background-color: var(--grey-dark) !important;
    color: var(--white) !important;
}

.accordion-button.collapsed {
    background-color: var(--grey-medium) !important;
    color: var(--white) !important;
}

.accordion-button {
    font-weight: 600;
}

.bg-light-red {
    background-color: #f8d7da !important; /* Light red */
}

.bg-light-green {
    background-color: #d4edda !important; /* Light green */
}
