/* $Header$ */

/* =========================================
   1. Global Defaults & Typography
   ========================================= */

/* [NEW] Force the page to take full height */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* Global Page Container */
table.page {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #f8f9fa;
    width: 100%;
    /* [NEW] Ensure table stretches to bottom of screen */
    height: 100%;
    border-collapse: collapse;
    empty-cells: show;
}

/* Links */
table.page a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

table.page a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

table.page a img {
    border: 0;
}

/* =========================================
   2. Header & Logo
   ========================================= */

/* Top Navigation Bar */
table.page tr.head {
    text-align: center;
    color: #FFFFFF;
    background-color: #212529;
    font-weight: 600;
    font-size: 14px;
    height: 50px;
    /* [NEW] Prevent header from expanding vertically */
    height: 1px; 
}

table.page tr.head img.logo {
    vertical-align: middle;
    width: 100px;
    height: 60px;
}

table.page tr.pagehead td.imagetop {
    width: 100%;
    vertical-align: bottom;
    text-align: right;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    /* [NEW] Minimal height for these rows */
    height: 1px; 
}

/* =========================================
   3. Control/Menu Bar
   ========================================= */

table.page tr.control td {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 8px 15px;
    /* [NEW] Minimal height so it doesn't stretch */
    height: 1px;
}

table.page table.control {
    table-layout: fixed;
    width: 100%;
}

table.page table.control td {
    border: 0;
    padding: 5px;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

table.page table.control a {
    color: #495057;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
}

table.page table.control a:hover {
    background-color: #e9ecef;
    color: #0d6efd;
    text-decoration: none;
}

/* =========================================
   4. Layout: Tree (Sidebar) & Body
   ========================================= */

/* Sidebar Area */
table.page td.tree {
    border-right: 1px solid #dee2e6;
    /* [NEW] Align top so content starts at top, but cell stretches */
    vertical-align: top;
    background-color: #f8f9fa;
    width: 250px;
    padding: 10px;
    /* [NEW] Ensure background fills height */
    height: 100%;
}

/* Main Content Area */
table.page td.body {
    vertical-align: top;
    width: 100%;
    background-color: #FFFFFF;
    padding: 20px;
    /* [NEW] Ensure white background fills height */
    height: 100%;
}

/* =========================================
   5. Headings & Messages
   ========================================= */

table.page table.sysmsg {
    border: 1px solid #cfe2ff;
    background-color: #cfe2ff;
    color: #084298;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 20px;
    padding: 10px;
}

table.page table.sysmsg td.head {
    font-size: 14px;
    font-weight: bold;
    padding: 8px;
}

table.page table.sysmsg td.body {
    padding: 8px;
}

table.page table.body h3.title {
    text-align: left;
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    color: #212529;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 500;
    font-size: 1.75rem;
}

table.page table.body h3.subtitle {
    text-align: left;
    margin: 15px 0;
    font-size: 0.75rem;
    color: #6c757d;
    border: none;
    background: transparent;
    padding: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   6. The LDAP Tree Styling
   ========================================= */

table.tree {
    border-collapse: separate;
    border-spacing: 0;
}

table.tree a {
    text-decoration: none;
    color: #212529;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
}

table.tree a:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

table.tree .phplmnormal,
table.tree a.phplmnormal,
table.tree a.phplm:link,
table.tree a.phplm:visited {
    font-family: inherit;
    font-size: 13px;
    color: #212529;
}

table.tree a.phplm:hover,
table.tree a.phplmselected:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    text-decoration: none;
}

table.tree a.phplmselected:link,
table.tree a.phplmselected:visited {
    color: #0f5132;
    background-color: #d1e7dd;
    font-weight: 600;
}

/* =========================================
   7. Forms & Inputs
   ========================================= */

table.forminput {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
}

/* [NEW] Updated Title Font Size */
table.forminput td.label,
table.entry tr td.title {
    text-align: left;
    /* [NEW] Increased font size here */
    font-size: 16px; 
    font-weight: 600;
    color: #495057;
    padding: 8px 12px;
    background-color: transparent;
}

input[type="text"],
input[type="password"],
table.forminput input.val,
table.entry input.value,
table.entry textarea.value {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    margin-bottom: 5px;
}

input[type="text"]:focus,
input[type="password"]:focus,
table.forminput input.val:focus,
table.entry input.value:focus,
table.entry textarea.value:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

table.forminput input.roval,
table.entry input.roval,
table.entry textarea.roval {
    background-color: #e9ecef;
    opacity: 1;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    color: #6c757d;
}

#login, #password, #generic {
    padding-left: 30px;
    background-position: 8px center;
}

/* =========================================
   8. Data Entry Tables
   ========================================= */

table.entry {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table.entry tr td {
    padding: 8px;
    border-bottom: 1px solid #f2f2f2;
}

table.entry tr td.heading {
    border-bottom: 2px solid #dee2e6;
    color: #21
