@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Base Reset & Global Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
    overflow-y: auto;   /* Allow vertical scroll */
    font-family: 'Roboto', sans-serif;
    background-color: #1c1c1c;
    color: #fff;
    box-sizing: border-box; /* Include padding and border within element width/height */
}

*, *::before, *::after {
    box-sizing: inherit; /* Ensure this is inherited across all elements */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* General Container */
.container {
    width: 100%;
    max-width: 400px;
    margin: 20px;
    padding: 30px;
    background-color: #333;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    text-align: center;
    overflow-x: hidden; /* Prevent horizontal overflow in container */
}

/* Headings */
h1, h2 {
    color: #fff;
    margin-bottom: 20px;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
}

input, select, textarea {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
    font-size: 16px;
}

input[type="text"], 
input[type="password"], 
input[type="number"], 
input[type="datetime-local"] {
    background-color: #444;
}

input[type="submit"] {
    padding: 15px;
    margin: 20px 0;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Links */
a {
    text-decoration: none;
    color: #007bff;
    margin-top: 20px;
    display: inline-block;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

.logout {
    margin-top: 20px;
}

/* Admin Dashboard Layout */
.admin-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Prevent horizontal overflow */
}

.left-panel {
    width: 250px;
    background-color: #333;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    flex-shrink: 0;
}

.left-panel a {
    color: #fff;
    padding: 10px 0;
    margin: 10px 0;
    text-decoration: none;
    font-size: 16px;
}

.left-panel a:hover {
    background-color: #444;
    padding-left: 10px;
}

.top-panel {
    width: auto;
    background-color: #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #1c1c1c;
    overflow-y: auto;
}

/* Buttons */
button,
.create-task {
    padding: 10px 20px;
    margin: 5px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover,
.create-task:hover {
    background-color: #0056b3;
}

button.delete {
    background-color: #ff4d4d;
}

button.delete:hover {
    background-color: #cc0000;
}

button.assign {
    background-color: #28a745;
}

button.assign:hover {
    background-color: #218838;
}

.reopen-btn {
    background-color: yellow; /* Yellow background */
    color: black; /* Black text */
    border: 1px solid #ccc; /* Light gray border */
    padding: 10px 15px; /* Padding around the text */
    font-size: 14px; /* Font size */
    cursor: pointer; /* Change cursor to pointer on hover */
    border-radius: 5px; /* Optional: adds rounded corners */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.reopen-btn:hover {
    background-color: #ffcc00; /* Darker yellow on hover */
}


/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #555;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #444;
    color: #fff;
    cursor: pointer;
}

td {
    background-color: #333;
    color: #fff;
}

/* Editable Table Cells */
td input[type="text"],
td select,
td textarea {
    background-color: #444;
    color: #fff;
    border: 1px solid #555;
    padding: 8px;
    width: 100%;
    border-radius: 5px;
}

td input:disabled,
td select:disabled,
td textarea:disabled {
    background-color: #333;
    color: #888;  /* Light gray text for disabled inputs */
}

/* Header Cells (Sort Indicators) */
th.sort-asc::after {
    content: "▲";
    margin-left: 5px;
}

th.sort-desc::after {
    content: "▼";
    margin-left: 5px;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

.search-box input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #555;
    border-radius: 5px;
    width: 300px;
    background-color: #444;
    color: #fff;
}

/* Cards */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.card {
    background-color: #333;
    color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 30%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .card {
        width: 100%;
    }
}

/* Form Sections */
.form-heading {
    font-size: 20px;
    color: #00bfff;
    margin: 30px 0 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.form-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.form-section > div {
    flex: 1 1 45%;
}

@media (max-width: 768px) {
    .form-section {
        flex-direction: column;
    }

    .form-section > div {
        flex: 1 1 100%;
    }
}

/* Messages */
.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    background: none;
    display: block;
}

.message.success {
    background-color: #28a745;
    color: #fff;
}

.message.error {
    padding: 10px;
    margin: 0;
    background-color: #dc3545;
    color: #fff;
    border: none;
    text-align: center;
}

.alert-message {
    background-color: #d9edf7;
    color: #31708f;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #bce8f1;
    border-radius: 4px;
}

.checkbox-container {
    display: flex;                /* Use flexbox to display elements in a row */
    gap: 15px;                    /* Add some space between the checkboxes */
    flex-wrap: nowrap;            /* Prevent wrapping to a new line */
    align-items: center;          /* Align checkboxes and labels vertically */
    width: 100%;                  /* Ensure the container takes up available width */
    white-space: nowrap;          /* Prevent text inside labels from wrapping */
}

.checkbox-container label {
    display: flex;                /* Use flexbox within each label to align text and checkbox */
    align-items: center;          /* Vertically align checkbox and text */
    flex-shrink: 0;                /* Prevent shrinking of labels */
}

.checkbox-container input {
    margin-right: 5px;           /* Add space between the checkbox and the label text */
}

/* Filters */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.filters input[type="text"],
.filters select,
.filters input[type="date"] {
    flex: 1 1 auto;
    min-width: 180px;
    padding: 8px;
    font-size: 14px;
}

#clearFilters {
    padding: 8px 12px;
    font-size: 14px;
    background-color: #f0ad4e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.toast {
    position: fixed;
    top: -50px; /* start hidden above */
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: top 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}
.toast.show {
    top: 20px; /* slide down */
    opacity: 1;
}



