/* Reset and basic layout */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f6f7fb;
    color: #222;
    scroll-behavior: smooth;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1f1f2e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: padding 0.3s;
}

header .logo {
    font-size: 1.9em;
    font-weight: bold;
}

header nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

header nav a:hover {
    text-decoration: underline;
    color: #00bfff;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0%;
    width: 100%;
    background: #1f1f2e;
    color: white;
    text-align: center;
    padding: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
}

/* Main container */
.container {
    max-width: 1000px;
    margin: 120px auto 100px; /* add extra top margin for fixed header */
    padding: 20px;
}

/* Account cards */
.accounts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.account {
    background: white;
    padding: 25px;
    flex: 1;
    min-width: 250px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.account:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Buttons */
.transactions button,
.loan-btn,
.admin-btn {
    padding: 12px 28px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: #1f1f2e;
    color: white;
    transition: 0.3s, transform 0.2s;
}

.transactions button:hover,
.loan-btn:hover,
.admin-btn:hover {
    background: #44445e;
    transform: translateY(-2px);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.overlay-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 85%;
    max-width: 900px;
    position: relative;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

#close-overlay {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
    transition: 0.3s;
}

#close-overlay:hover {
    color: #ff4d4d;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    transition: 0.2s;
}

table th {
    background: #1f1f2e;
    color: white;
}

table tr:hover {
    background: #f5f5f5;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 8px;
    overflow: hidden;
}

.profile-dropdown:hover .profile-dropdown-content {
    display: block;
}

.profile-dropdown-content a {
    color: #222;
    padding: 12px 15px;
    display: block;
    text-decoration: none;
    transition: 0.3s;
}

.profile-dropdown-content a:hover {
    background: #f0f0f0;
    color: #1f1f2e;
}

/* Profile avatar in dropdown */
.profile-dropdown img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    .accounts {
        flex-direction: column;
    }
    header nav {
        margin-top: 10px;
        width: 100%;
    }
    header nav a {
        display: block;
        margin: 5px 0;
    }
    .container {
        margin-top: 140px; /* extra for smaller screens */
        padding: 15px;
    }
    .overlay-content {
        width: 95%;
        padding: 20px;
    }
}