/* Global Body & Layout Styles */
body {
    font-family: system-ui, sans-serif;
    margin: 2rem;
    background: #f8f9fa;
    overflow-x: hidden;
}

.card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.card.small {
    flex: 1 1 300px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-logo {
    height: 70px;
    width: auto;
}

/* Navigation Menu Styles */
.main-nav {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
}
.main-nav a {
    text-decoration: none;
    color: #0d6efd;
    font-weight: 600;
    font-size: 1.1rem;
    padding: .6rem 1rem;
    border-radius: .5rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.main-nav a:hover {
    background-color: #e9ecef;
}
.main-nav a.active {
    background-color: #0d6efd;
    color: #fff;
}
.main-nav a.logout {
    margin-left: auto;
    color: #dc3545;
}

/* Table Styles */
.table-frame {
    max-height: 70vh;
    overflow: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}
.table-frame table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}
.truncate-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}
.summary-table th, .summary-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
.summary-table th {
    background-color: #f8f9fa;
}

/* Form & Button Styles */
.btn {
    padding: .5rem 1rem;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary { background: #0d6efd; color: #fff; }
.form-inline { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
input[type=number] {
    padding: .4rem .6rem;
    border: 1px solid #ced4da;
    border-radius: .5rem;
    width: 120px;
}
.filter-container { margin-bottom: 1rem; }
.filter-container label { font-weight: bold; margin-right: 0.5rem; }
.filter-container select { padding: 0.4rem; border-radius: 0.5rem; border: 1px solid #ced4da; }

/* Login Page Styles */
.login-body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-card {
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1.5rem;
}
.login-card h1 {
    margin-bottom: 2rem;
    color: #333;
}
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 600;
    color: #555;
}
.form-group input {
    width: 100%;
    padding: .8rem;
    border: 1px solid #ced4da;
    border-radius: .5rem;
    box-sizing: border-box;
}
.login-btn {
    width: 100%;
    padding: .8rem;
    font-size: 1.1rem;
}
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: .5rem;
    margin-bottom: 1.5rem;
}
