﻿/* General page styling */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #0078d7, #00b4d8);
    height: 100vh;
    margin: 0;
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Search + Actions row */
.search-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#searchBox {
    padding: 8px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Action buttons aligned right */
.action-buttons {
    display: flex;
    gap: 10px;
}

/* Shared button styles */
.download-btn,
.logout-btn,
#loginBox button {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Specific button colors */
.download-btn {
    background: #28a745; /* green */
    color: #fff;
}

    .download-btn:hover {
        background: #218838;
        transform: scale(1.05);
    }

.logout-btn {
    background: #d9534f; /* red */
    color: #fff;
}

    .logout-btn:hover {
        background: #c9302c;
        transform: scale(1.08);
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

#loginBox button {
    width: 95%;
    padding: 12px;
    background: #0078d7; /* blue */
    color: #fff;
    font-size: 15px;
}

    #loginBox button:hover {
        background: #005fa3;
        transform: scale(1.05);
    }

/* Login box */
#loginBox {
    width: 360px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    margin: auto;
    margin-top: 100px;
}

    #loginBox h2 {
        margin-bottom: 20px;
        color: #0078d7;
        font-weight: bold;
    }

    #loginBox input {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 12px auto;
        padding: 12px;
        font-size: 15px;
        border: 1px solid #ccc;
        border-radius: 8px;
        box-sizing: border-box;
        transition: all 0.3s ease;
    }

        #loginBox input:focus {
            border-color: #0078d7;
            box-shadow: 0 0 8px rgba(0,120,215,0.5);
            outline: none;
        }

/* Password wrapper */
.password-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 12px auto;
}

    .password-wrapper input {
        width: 100%;
        padding: 12px;
        padding-right: 40px;
        font-size: 15px;
        border: 1px solid #ccc;
        border-radius: 8px;
        box-sizing: border-box;
    }

.toggle-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #0078d7;
    transition: color 0.3s ease;
}

    .toggle-eye:hover {
        color: #005fa3;
    }

/* Error message */
#loginMessage {
    margin-top: 10px;
    font-size: 14px;
    color: red;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File browser styling */
h1 {
    color: #333;
    margin-bottom: 15px;
}

/* Scrollable table container */
.table-container {
    max-height: 550px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
}

th {
    background: #0078d7;
    color: #fff;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 2;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #eef6ff;
    cursor: pointer;
    transition: background 0.2s ease;
}

th:first-child, td:first-child {
    width: 60px;
    text-align: center;
}

/* Download link */
a {
    color: #0078d7;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }
