body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #222;
    color: #fff;
    padding: 20px 0;
}

.sidebar h2 {
    margin: 0 20px 20px;
    font-size: 18px;
}

.sidebar a {
    display: block;
    padding: 0px 20px;
    color: #ddd;
    text-decoration: none;
    font-size: 17px;
}

.sidebar a.active,
.sidebar a:hover {
    background: #444;
    color: #fff;
}

.content {
    flex: 1;
    padding: 20px;
    /* This is the important bit: if table is wider than content,
       we get a horizontal scrollbar for the whole content area */
    overflow-x: auto;
}

.top-bar {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#exportBtn {
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

/* Login page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f0f0;
}

.login-box {
    background: #fff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 320px;
}

.login-box h1 {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    margin-top: 10px;
    font-size: 13px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    box-sizing: border-box;
}

.login-box button {
    margin-top: 15px;
    width: 100%;
    padding: 8px;
    border: none;
    background: #222;
    color: #fff;
    cursor: pointer;
}

.login-box button:hover {
    background: #444;
}

.error {
    background: #ffdddd;
    color: #a00;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

/* DataTable styling tweaks */
table.dataTable {
    font-size: 12px;        /* smaller font for compact rows */
    width: auto !important; /* let the table grow wider than content if needed */
    border-collapse: collapse;
}

table.dataTable th,
table.dataTable td {
    white-space: nowrap;    /* keep fields in one line */
    padding: 4px 6px;
}

/* Description ellipsis (JS toggles 100 chars <-> full text) */
.cell-ellipsis {
    cursor: pointer;
    text-decoration: underline dotted;
}

/* Top bar buttons spacing */
.top-bar button {
    margin-left: 5px;
}

/* Simple modal for show/hide fields */
.modal {
    display: none;              /* shown via JS */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.4);
}

.modal-content {
    background: #fff;
    margin: 80px auto;
    padding: 20px;
    border-radius: 4px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 13px;
}

.modal-actions {
    margin-top: 15px;
    text-align: right;
}

.modal-actions button {
    margin-left: 5px;
}

.field-checkbox {
    margin-bottom: 5px;
}

