:root {
    font-size: 70%; /* Reduce base font size by 30% */
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.content-area {
    padding: 1.4rem;
    max-width: 1120px;
    margin: 0 auto;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border: 1px solid #ef9a9a;
    font-size: 0.9rem;
}

.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin: 0 0 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.admin-link {
    margin-top: 1rem;
    text-align: center;
}

.admin-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

button {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.private-header {
    background-color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: #3498db;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #f8f9fa;
}

.logout-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.logout-button:hover {
    background-color: #c0392b;
}

/* Admin styles */
.admin-nav {
    width: 200px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: #2c3e50;
    padding-top: 20px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

.admin-nav-item {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.3s;
    font-size: 13px;
}

.admin-nav-item:hover {
    background-color: #34495e;
}

.admin-nav-item.active {
    background-color: #3498db;
}

.admin-nav-subsection {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    padding: 8px 20px 8px 40px;
    transition: all 0.3s ease;
    font-size: 13px;
    border-left: 3px solid transparent;
    position: relative;
}

.admin-nav-subsection:before {
    content: "└";
    position: absolute;
    left: 25px;
    color: #7f8c8d;
    font-size: 12px;
}

.admin-nav-subsection:hover {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #ecf0f1;
}

.admin-nav-subsection.active {
    background-color: #2980b9;
    border-left-color: #3498db;
    color: #ecf0f1;
}

/* Admin nav separator and logout button */
.admin-nav-separator {
    flex-grow: 1;
    min-height: 20px;
}

.admin-nav-logout {
    display: flex;
    align-items: center;
    color: #e74c3c !important;
    text-decoration: none;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-size: 13px;
    background-color: rgba(231, 76, 60, 0.1);
    border-top: 1px solid #34495e;
    margin-top: auto;
}

.admin-nav-logout:hover {
    background-color: #e74c3c;
    color: #ffffff !important;
}

.admin-nav-logout .logout-icon {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.admin-nav-logout:hover .logout-icon {
    transform: translateX(-2px);
}

.admin-content {
    margin-left: 200px;
    padding: 20px;
    min-height: 100vh;
}

.user-form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.user-form {
    display: grid;
    gap: 1rem;
    max-width: 500px;
}

.users-table-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.users-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.users-table tbody tr:hover {
    background-color: #f8f9fa;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .btn-submit {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    width: auto;
}

.edit-btn {
    background-color: #3498db;
    color: white;
}

.edit-btn:hover {
    background-color: #2980b9;
}

/* Removed delete-btn styling to allow TailwindCSS control */

.btn-submit {
    background-color: #2ecc71;
    color: white;
    width: 100%;
}

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

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 0.7rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    width: auto;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-cancel {
    background-color: #95a5a6;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: auto;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    color: #3498db;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-link:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
}

.pagination-link.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}