body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    padding-bottom: 70px !important; /* Increased padding for footer clearance */
    display: flex;
}

.login-form label {
    color: white;
}

/* Sidebar */
.sidebar {
    background-color: #315a6d;
    width: 200px;
    padding: 1rem;
    box-sizing: border-box;
    color: white;
    height: 120vh;
    position: sticky; /* Makes it sticky */
    top: 0; /* Makes it stick to the top when scrolling */
    align-items: center;
    display: flex;
    flex-direction: column;
}


.sidebar img.sidebar-logo {
    width: 100%;
    height: auto;
    max-width: 100px;
    max-height: 180px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

h1, h2 {
    margin-left: 20px; 
    border-left: 5px; 
    padding-left: 10px; 
}

/* Header */
header {
    background-color: #315a6d;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    background-color: #333;
    padding: 1rem;
    gap: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

nav a:hover {
    background-color: #315a6d;
    transform: translateY(-2px);
}

/* Dropdown Styling */
.dropdown {
	position: relative;
	display: inline-block;
}

.dropdown-content {
	display: none;
	position: absolute;
	background-color: #f9f9f9;
	min-width: 160px;
	box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
	z-index: 1;
}

.dropdown-content a {
	color: black;
	padding: 12px 16px;
	text-decoration: none;
	display: block;
}

.dropdown-content a:hover {
	background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
	display: block;
}

/* Main Container */
.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    width: 100%;
}

/* Forms */
.container form {
    display: block;
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stocks Section */
.stocks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    margin-top: 80px;
    width: 100%;
    text-align: center;
}

.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.move {
    margin-left: -10px;
    margin-bottom: 10px;
}


/* Stock Cards */
.stock-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Add this line */
    height: 80%;
    display: flex;
    flex-direction: column;
}

.stock-card .remove-form {
    position: absolute;
    top: 5px;         /* Adjust distance from top edge */
    right: 5px;        /* Adjust distance from right edge */
    z-index: 10;       /* Ensure it's above other content if needed */
    margin: 0;         /* Reset any default form margins */
    padding: 0;        /* Reset any default form padding */
    line-height: 1;    /* Prevent extra vertical space */
    /* display: block;    REPLACE THIS */
    display: inline-block; /* CHANGE TO THIS */
    width: auto; /* Explicitly set width to auto/content size */
}

/* Style the button ('X') itself to be tiny */
.remove-watchlist-btn {
    display: inline-block;
    background: none;
    border: none;
    color: #aaa;
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: color 0.2s ease;
    vertical-align: top;
    outline: none; /* Add this line */
}

/* Optional: Add focus style that doesn't use outline */
.remove-watchlist-btn:focus {
    /* outline: none; /* Ensure outline is none on focus too */
    /* You could slightly change color or add a subtle shadow if desired */
    color: #cc0000; /* Example: Make it slightly brighter red on focus */
}

.remove-watchlist-btn:hover {
    color: #e74c3c;
}
.stock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


.stock-card a.stock-card-content-link,
.stock-card a.stock-card-content-link:hover,
.stock-card a.stock-card-content-link:visited,
.stock-card a.stock-card-content-link * { /* Target the link and all elements inside it */
    text-decoration: none !important; /* Use !important to override other styles if needed */
    color: inherit; /* Ensure text color is inherited correctly */
}

.stock-header h3 {
    margin: 0;
    color: #2c3e50;
}

.company-name {
    color: #7f8c8d;
    margin: 5px 0;
}

.stock-info p {
    margin: 8px 0;
    font-size: 0.9em;
}

.stock-news {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.stock-news h4 {
    margin: 0 0 10px 0;
    color: #3498db;
}

/* Stock Performance Colors */
.positive { color: #27ae60; }
.negative { color: #c0392b; }
.no-stocks {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

/* Stock Card Links */
.stock-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Table Styling */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table th, 
.transactions-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.transactions-table th {
    background-color: #333;
    color: white;
}

.transactions-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.transactions-table tr:hover {
    background-color: #ddd;
}

/* Table Container */
.table-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-container {
    margin-left: 20px; 
    margin-top: 20px; 
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    max-width: 400px;
    width: 100%;
    margin-right: auto;
}

.form-container input,
.form-container button {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* Presentations */
.presentations-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding-top: 20px;
}

.presentation-box {
    width: 280px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.presentation-box h3 {
    margin-top: 0;
}

.presentation-box p, .presentation-box ul {
    font-size: 14px;
    color: #333;
}

.presentation-box button {
    margin-top: 10px;
    padding: 5px 10px;
    border: none;
    background-color: #dc3545;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

.presentation-box button:nth-child(2) {
    background-color: #28a745;
}
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
    z-index: 9999;
}


/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-form-container {
    background-color: #34495E; /* Slightly lighter dark shade for the form */
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    width: 320px;
    text-align: center;
}

.login-header {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ECF0F1; /* Light color for the header */
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

.input-field {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #BDC3C7;
    border-radius: 5px;
    background-color: #ECF0F1;
    color: #34495E;
}

.input-field:focus {
    outline: none;
    border-color: #1ABC9C;
    background-color: #fff;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #1ABC9C; /* Teal color for the login button */
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
}

.submit-btn:hover {
    background-color: #16A085;
}

.guest-btn {
    width: 100%;
    padding: 12px;
    background-color: #BDC3C7; /* Light gray for guest button */
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.guest-btn:hover {
    background-color: #95A5A6;
}

.login-form {
        width: 100%;
    }



/*Changes*/

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    width: 100%;
    gap: 20px;
}

.left-column {
    width: 25%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.right-column {
    flex: 1;
}

#stock-search-form {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#stock-search-form h2 {
    margin-top: 0;
    margin-left: 0;
    padding-left: 0;
    font-size: 1.5rem;
}

#stockForm {
    width: 90%;
    display: flex;
    flex-direction: column;
}

#stockForm label {
    margin-bottom: 5px;
    font-weight: bold;
}

#stockForm input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

#stockForm input[type="submit"] {
    padding: 8px;
    background-color: #315a6d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#stockForm input[type="submit"]:hover {
    background-color: #254556;
}

/* Chart Styling */
#chart_div {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Update Stock Grid to display 4 cards per row */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .stock-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .stock-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }
    
    .left-column {
        width: 100%;
    }
    
    .stock-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Adjust stock card for better fit */
.stock-card {
    height: 80%; /*100% overlapped*/
    display: flex;
    flex-direction: column;
}

.container {
    padding: 20px;
    box-sizing: border-box;
}
.vote-bar-container {
    display: flex;
    height: 20px;
    width: 100%;
    background-color: #f0f0f0;
    margin-bottom: 5px;
}

.vote-bar-yes {
    background-color: green;
    height: 100%;
}

.vote-bar-no {
    background-color: red;
    height: 100%;
}

.members-list img {
    width: 250px;
    height: 250px;
    object-fit: cover; 
}
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.member-card {
    border: 1px solid #ccc;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
}

.member-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.remove-transaction-btn {
    background: none;      /* Remove button background */
    border: none;          /* Remove button border */
    color: #dc3545;        /* Red color (danger) */
    font-size: 1.4em;      /* Make the 'x' a bit larger */
    font-weight: bold;     /* Make it bolder */
    cursor: pointer;       /* Indicate it's clickable */
    padding: 0 5px;        /* Minimal padding */
    line-height: 1;        /* Adjust line height if needed */
    vertical-align: middle;/* Align nicely with text if needed */
    text-decoration: none; /* Remove any potential underlines */
}

.remove-transaction-btn:hover {
    color: #a71d2a;        /* Darker red on hover */
}