/* Basic Reset */
body, html, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
}

.dashboard-container {
    display: flex;
    gap: 20px; /* Added gap between sidebar and main content */
}

/* Sidebar styles */
.sidebar {
    width: 220px;
    background-color: #2d3a5f;
    color: white;
    padding: 20px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 15px 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.sidebar ul li a {
    color: white; /* White text color */
    text-decoration: none; /* Remove underline */
    font-weight: 500; /* Semi-bold text */
}

.sidebar ul li:hover {
    background-color: #3f4e78;
}

/* Main content styles */
.main-content {
    margin-left: 260px; /* Increased margin to create more gap */
    padding: 20px;
    width: calc(100% - 260px);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    width: 300px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Analytics overview cards */
.analytics-overview {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Individual card solid colors */
.card:nth-child(1) {
    background-color: #FF6F61; /* Soft Red */
}

.card:nth-child(2) {
    background-color: #3859ec; /* Green */
}
.card.category-card{
    background-color: #b8d31d;
}
.card:nth-child(3) {
    background-color: #FF9800; /* Blue */
}
.card.card.author-card{
    background-color: #25d3e0;
}
.card:nth-child(4) {
    background-color: #ff0000; /* Orange */
}

.card.new-card {
    background-color: #9C27B0; /* Purple */
}
.card.fine-card {
    background-color: #25e044; /* Purple */
}

/* Hover effect for individual card */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Fade-in animation for the table section */
.fade-in-animation {
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Table section */
.table-section {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.table-container {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    width: 48%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.table-container h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    text-align: left;
    padding: 10px;
}

th {
    background-color: #f4f4f4;
}

/* Adjusted first row and second row of cards styling */
.first-row .card {
    width: 22%; /* Adjusted width to fit 4 cards in the row */
}

.second-row .card {
    width: 30%; /* Adjusted width to fit 3 cards in the row */
}


/* Submenu styles */
.submenu {
    display: none; /* Hide submenu by default */
    list-style: none;
    padding-left: 20px; /* Indent submenu */
}

.submenu li {
    padding: 10px 0; /* Add padding for submenu items */
    cursor: pointer; /* Pointer cursor for submenu items */
}



/* modal  */

.card {
    cursor: pointer; /* Makes it clear that the card is clickable */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px); /* Lifts the card slightly on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Enhances the shadow on hover */
}







/* ------------------------new----------------------------  */

.auth-controls {
    display: flex;
    align-items: center;
    margin-left: auto; /* Aligns controls to the right */
}

.btn-profile,
.btn-logout,
.btn-login,
.btn-register {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff; /* Bootstrap primary color */
    color: white;
    transition: background-color 0.3s;
}

.btn-profile:hover,
.btn-logout:hover,
.btn-login:hover,
.btn-register:hover {
    background-color: #0056b3; /* Darker shade for hover */
}

#loggedOutMessage {
    display: flex;
    align-items: center;
    color: #666;
    margin-left: auto; /* Aligns message to the right */
}


/* modal --------------------------------  */


/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px; /* Set a maximum width */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.profile-card {
    display: flex;
    align-items: center;
}

.profile-card img {
    width: 150px; /* Set desired width */
    height: 150px; /* Set desired height */
    border-radius: 50%; /* Circular shape */
    object-fit: cover; /* Ensure the image fits the container */
    border: 2px solid #ccc; /* Optional border */
    margin-right: 20px;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    margin: 0 0 10px;
}

.profile-info p {
    margin: 5px 0;
}

