/* Reset some basics */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e6f0;        

/* Sidebar styling */
.sidebar {
    width: 220px;
    background-color: #1a1a1a; /* Darker sidebar */
    color: #e0e6f0;
    height: 100vh;
    position: fixed;
    padding-top: 30px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.8);
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 1px;
    color: #00aaff; /* Sky blue */
}

.sidebar a {
    display: block;
    padding: 15px 25px;
    color: #c0dfff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: #00aaff;
    color: #121212;
}

/* Main content area */
.content {
    margin-left: 220px;
    padding: 30px 40px;
    min-height: 100vh;
}

/* Page headings */
h2 {
    margin-top: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #00aaff;
}

/* Top bar with search and add button */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Search input */
.top-bar input[type="text"] {
    padding: 10px 15px;
    width: 280px;
    border: 1px solid #00aaff;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #222;
    color: #e0e6f0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.top-bar input[type="text"]::placeholder {
    color: #7fbfff;
}

.top-bar input[type="text"]:focus {
    border-color: #66cfff;
    outline: none;
    background-color: #1a1a1a;
}

/* Buttons */
button, .btn {
    background-color: #00aaff;
    color: #121212;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(0,170,255,0.5);
}

button:hover, .btn:hover {
    background-color: #008ecc;
    color: #e0e6f0;
    box-shadow: 0 4px 12px rgba(0,140,204,0.8);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1e1e1e;
    box-shadow: 0 3px 8px rgba(0,0,0,0.7);
    color: #e0e6f0;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #333;
    text-align: left;
    vertical-align: middle;
}

th {
    background-color: #00aaff;
    color: #121212;
    font-weight: 700;
    user-select: none;
}

tr:nth-child(even) {
    background-color: #2a2a2a;
}

tr:nth-child(odd) {
    background-color: #1e1e1e;
}



.edit-btn {
    background-color: #009933;
}

.edit-btn:hover {
    background-color: #006622;
    color: #e0e6f0;
}

.view-btn {
    background-color: #0300cc;
}

.view-btn:hover {
    background-color: #020096;
    color: #e0e6f0;
}

.delete-btn {
    background-color: #cc3300;
}

.delete-btn:hover {
    background-color: #992200;
    color: #e0e6f0;
}

.sidebar a.clear-logs:hover {
    background: #cc0000 !important;
}

/* Pagination */
.pagination {
    margin-top: 25px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    color: #00aaff;
    border: 1px solid #00aaff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    user-select: none;
    background-color: transparent;
}

.pagination a:hover {
    background-color: #008ecc;
    color: #121212;
    border-color: #008ecc;
}

.pagination a.active {
    background-color: #008ecc;
    color: #121212;
    border-color: #008ecc;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px 0;
    }

    .content {
        margin-left: 0;
        padding: 15px;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar input[type="text"] {
        width: 100%;
    }
}

/* Login box container */
.login-box {
    background-color: #1a1a1a;
    padding: 40px 30px;
    border-radius: 10px;
    width: 320px;
    margin: 200px auto; /* centers the box horizontally with some vertical space */
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.5);
    text-align: center;
    color: #e0e6f0;
}


/* Heading */
.login-box h2 {
    margin-bottom: 25px;
    color: #00aaff;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 1px;
}

/* Error message */
.login-box p {
    margin-bottom: 15px;
    font-weight: 600;
    color: #ff5555;
}

/* Input fields */
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1.5px solid #00aaff;
    border-radius: 6px;
    background-color: #222;
    color: #e0e6f0;
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.login-box input::placeholder {
    color: #7fbfff;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: #66cfff;
    outline: none;
    background-color: #1a1a1a;
}

/* Login button */
.login-box button {
    width: 100%;
    background-color: #00aaff;
    color: #121212;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 170, 255, 0.6);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-box button:hover {
    background-color: #008ecc;
    color: #e0e6f0;
    box-shadow: 0 8px 20px rgba(0, 140, 204, 0.9);
}

/* Actions buttons */
.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-right: 5px;
    color: white;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.edit-btn {
    background-color: #27ae60;
}

.edit-btn:hover {
    background-color: #1e8449;
}

.delete-btn {
    background-color: #e74c3c;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Pagination */
.pagination {
    margin-top: 25px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    color: #1a82ff;
    border: 1px solid #1a82ff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    user-select: none;
}

.pagination a:hover {
    background-color: #1a82ff;
    color: white;
}

.pagination a.active {
    background-color: #166ac9;
    color: white;
    border-color: #166ac9;
}

/* Responsive */
@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px 0;
    }

    .content {
        margin-left: 0;
        padding: 15px;
        border-radius: 0;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar form,
    .top-bar .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .top-bar input[type="text"] {
        border-radius: 6px;
        border-right: 1px solid #3a539b;
    }

    .top-bar button[type="submit"] {
        border-radius: 6px;
        width: 100%;
    }
}

/* Form Styling */
.form {
    background-color: rgb(34, 34, 34);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.form input,
.form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form button {
    margin-top: 20px;
    padding: 12px 20px;
    border: none;
    background-color: #3498db;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.form button:hover {
    background-color: #2980b9;
}

/* Message Styles */
.message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.form-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 200px;
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.15);
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #90caff;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #222;
    color: #fff;
    font-size: 15px;
    transition: 0.3s ease;
}

.form-group input:focus {
    border-color: #00aaff;
    outline: none;
    background-color: #1a1a1a;
}

.checkbox-group {
    display: flex;
    align-items: center;
    font-weight: 600;
    gap: 10px;
    color: #ccc;
}

.full-width {
    grid-column: 1 / -1;
}

.center {
    text-align: center;
}

button[type="submit"] {
    padding: 12px 24px;
    background-color: #00aaff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 170, 255, 0.3);
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #008ecc;
}

.section {
        margin-bottom: 15px;
    }

    .collapsible {
        background-color: #00aaff;
        color: white;
        cursor: pointer;
        padding: 10px;
        width: 100%;
        text-align: left;
        font-weight: bold;
        border: none;
        outline: none;
        border-radius: 4px;
        margin-top: 10px;
    }

    .collapsible:hover {
        background-color: #008ecc;
    }

    .content-box {
        padding: 0 10px;
        display: none;
        overflow: hidden;
        background-color: #111;
        border: 1px solid #333;
        border-radius: 0 0 4px 4px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    td {
        padding: 10px 5px;
        color: white;
        vertical-align: top;
    }

    input[type="text"],
    input[type="number"],
    select {
        width: 100%;
        padding: 6px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }

    .btn {
        margin-top: 15px;
        background-color: #00aaff;
        color: white;
        padding: 10px 20px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
    }

    .btn:hover {
        background-color: #008ecc;
    }

     .collapsible {
            cursor: pointer;
            position: relative;
            padding-left: 25px;
            font-weight: bold;
        }

        /* Plus/Minus sign style */
        .collapsible::before {
            content: "+";
            position: absolute;
            left: 5px;
            top: 50%;
            transform: translateY(-50%);
            font-weight: bold;
            font-size: 18px;
            transition: transform 0.3s ease;
        }

        /* Change plus to minus when active */
        .collapsible.active::before {
            content: "−"; /* minus sign */
            color: #00aaff;
        }

        /* Content box */
        .content-box {
            display: none;
            margin-top: 5px;
            margin-bottom: 20px;
        }
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: #1e1e1e;
    padding: 20px;
    flex: 1 1 200px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.15);
    color: #e0e6f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 170, 255, 0.3);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: #00aaff;
    font-weight: 700;
}

.card p {
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffffff;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    width: 150px;
     margin-left: auto;
}

.filter-form label {
    font-weight: 600;
    color: #90caff;
    margin-right: 8px;
}

.filter-form select,
.filter-form input[type="date"] {
    padding: 10px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e6f0;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.filter-form select:focus,
.filter-form input[type="date"]:focus {
    border-color: #00aaff;
    outline: none;
    background-color: #1a1a1a;
}

.filter-form button {
    background-color: #00aaff;
    color: #121212;
    font-weight: bold;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 170, 255, 0.5);
}

.filter-form button:hover {
    background-color: #008ecc;
    color: #e0e6f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    color: #e0e6f0;
    margin-top: 20px;
    border: 1px solid #333;
}

th, td {
    padding: 12px;
    border: 1px solid #333;
    text-align: left;
}

th {
    background-color: #222;
    color: #00aaff;
}

tr:nth-child(even) {
    background-color: #2a2a2a;
}