body {

    margin: 0;

    font-family: Arial, sans-serif;
}

.main-content {

    padding: 15px;

    margin-bottom: 70px;
}

.app-footer {

    width: 100%;

    background: #1f2937;

    color: white;

    padding: 12px;

    position: fixed;

    bottom: 0;

    left: 0;

    z-index: 999;

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 13px;

    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}


/* =====================================================
   SOLUTIUM COLLEGE ERP - SHARED THEME
   Java 17 | Jakarta Faces | PrimeFaces 13
   ===================================================== */

:root {
    --erp-primary: #174a82;
    --erp-primary-dark: #102b50;
    --erp-accent: #2585e5;
    --erp-page-bg: #f2f6fc;
    --erp-card-bg: #ffffff;
    --erp-text: #26364d;
    --erp-muted: #64748b;
    --erp-border: #dce5f0;
    --erp-success: #15803d;
    --erp-danger: #c62838;
    --erp-warning: #b77905;
    --erp-radius: 12px;
    --erp-shadow: 0 4px 18px rgba(28, 55, 90, 0.07);
}

/* ---------- GLOBAL PAGE ---------- */

html {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--erp-page-bg);
    color: var(--erp-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

.erp-page,
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

/* ---------- PAGE TITLE ---------- */

.erp-page-title,
.container > h1 {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 0 0 24px;
    padding: 19px 22px;

    color: #ffffff;
    background: linear-gradient(
        110deg,
        var(--erp-primary-dark),
        var(--erp-primary),
        #2878bd
    );

    border-radius: var(--erp-radius);
    border-left: 5px solid #54c4f0;
    box-shadow: var(--erp-shadow);

    font-size: 25px;
    font-weight: 700;
    line-height: 1.35;
}

/* ---------- PRIMEFACES PANELS / CARDS ---------- */

.ui-panel.erp-card,
.container .ui-panel {
    margin-bottom: 24px;
    overflow: hidden;

    background: var(--erp-card-bg);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
}

.ui-panel.erp-card > .ui-panel-titlebar,
.container .ui-panel > .ui-panel-titlebar {
    padding: 16px 20px;

    color: var(--erp-primary-dark);
    background: #eaf2fc;

    border: none;
    border-bottom: 1px solid var(--erp-border);
    border-radius: 0;

    font-size: 16px;
    font-weight: 700;
}

.ui-panel.erp-card > .ui-panel-content,
.container .ui-panel > .ui-panel-content {
    padding: 24px;
    background: #ffffff;
}

/* ---------- FORM LABELS ---------- */

.ui-outputlabel,
.ui-widget-content .ui-outputlabel {
    color: #344660;
    font-weight: 600;
}

.ui-outputlabel-rfi {
    color: var(--erp-danger);
}

/* ---------- INPUTS ---------- */

.ui-inputfield,
.ui-selectonemenu,
.ui-calendar .ui-inputfield,
.ui-inputtextarea {
    max-width: 100%;
    border: 1px solid #cbd7e6 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .2s;
}

.ui-inputfield,
.ui-calendar .ui-inputfield,
.ui-inputtextarea {
    padding: 10px 12px !important;
    color: var(--erp-text);
    background: #ffffff;
}

.ui-selectonemenu {
    min-height: 40px;
    background: #ffffff;
}

.ui-selectonemenu .ui-selectonemenu-label {
    padding: 10px 12px;
}

.ui-selectonemenu .ui-selectonemenu-trigger {
    width: 36px;
    background: #f5f8fd;
    border-radius: 0 8px 8px 0;
}

.ui-inputfield:focus,
.ui-selectonemenu.ui-state-focus,
.ui-calendar .ui-inputfield:focus,
.ui-inputtextarea:focus {
    border-color: var(--erp-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 133, 229, .13) !important;
    outline: none;
}

/* ---------- BUTTONS ---------- */

.ui-button {
    margin: 3px;
    padding: 10px 17px !important;

    border: 1px solid var(--erp-primary) !important;
    border-radius: 8px !important;

    color: #ffffff !important;
    background: var(--erp-primary) !important;

    font-weight: 600 !important;
    box-shadow: 0 2px 5px rgba(23, 74, 130, .12);
    transition: background .2s, transform .2s, box-shadow .2s;
}

.ui-button .ui-button-text,
.ui-button .ui-button-icon-left,
.ui-button .ui-button-icon-right {
    color: inherit !important;
}

.ui-button:hover {
    background: #2164a8 !important;
    border-color: #2164a8 !important;
    box-shadow: 0 4px 10px rgba(23, 74, 130, .18);
}

.ui-button:focus-visible {
    outline: 3px solid rgba(37, 133, 229, .3);
    outline-offset: 2px;
}

/* Optional button variants:
   Add these classes to individual p:commandButton components. */

.ui-button.erp-btn-secondary {
    color: #334155 !important;
    background: #edf2f8 !important;
    border-color: #d4deea !important;
}

.ui-button.erp-btn-secondary:hover {
    background: #dfe8f3 !important;
}

.ui-button.erp-btn-success {
    background: #16834a !important;
    border-color: #16834a !important;
}

.ui-button.erp-btn-success:hover {
    background: #116a3b !important;
}

.ui-button.erp-btn-danger {
    background: #c62838 !important;
    border-color: #c62838 !important;
}

/* ---------- DATA TABLES ---------- */

.ui-datatable {
    margin-top: 20px;
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.ui-datatable .ui-datatable-header {
    padding: 15px;
    color: var(--erp-primary-dark);
    background: #edf4fd;
    border: none;
    font-weight: 700;
}

.ui-datatable thead th {
    padding: 13px 12px !important;
    color: #ffffff !important;
    background: var(--erp-primary) !important;
    border: 1px solid #35618d !important;
    text-align: left;
    font-weight: 600;
}

.ui-datatable tbody td {
    padding: 12px !important;
    border-color: #e6edf5 !important;
    vertical-align: middle;
}

.ui-datatable tbody tr:nth-child(even) {
    background: #f7faff;
}

.ui-datatable tbody tr:hover {
    background: #eaf3ff !important;
}

.ui-paginator {
    padding: 10px !important;
    background: #f4f8fd !important;
    border-color: var(--erp-border) !important;
}

/* ---------- PRESENT / ABSENT TAGS ---------- */

.ui-tag {
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- GROWL / MESSAGES ---------- */

.ui-growl {
    top: 90px;
}

.ui-messages,
.ui-message {
    border-radius: 8px;
}

/* ---------- DIALOGS ---------- */

.ui-dialog {
    overflow: hidden;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(16, 43, 80, .2);
}

.ui-dialog .ui-dialog-titlebar {
    padding: 15px 20px;
    color: #ffffff;
    background: var(--erp-primary);
    border: none;
}

.ui-dialog .ui-dialog-content {
    padding: 24px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
    .erp-page,
    .container {
        padding: 14px;
    }

    .erp-page-title,
    .container > h1 {
        padding: 15px;
        font-size: 21px;
    }

    .ui-panel.erp-card > .ui-panel-content,
    .container .ui-panel > .ui-panel-content {
        padding: 15px;
    }

    .ui-button {
        margin: 3px 2px;
    }

    .ui-datatable {
        overflow-x: auto;
    }
}





/* Attendance search form layout */

#attendanceForm .ui-panelgrid {
    width: 100%;
}

#attendanceForm .ui-panelgrid .ui-panelgrid-cell {
    padding: 12px 10px;
    vertical-align: middle;
}

#attendanceForm .ui-panelgrid .ui-outputlabel {
    display: inline-block;
    line-height: 1.5;
}

#attendanceForm .ui-panelgrid .ui-inputfield {
    width: 100%;
    min-width: 0;
}

#attendanceForm .ui-panelgrid .ui-selectonemenu {
    width: 100% !important;
    max-width: 100%;
}

#attendanceForm .ui-panelgrid .ui-calendar {
    display: flex;
    width: 100%;
    max-width: 100%;
}

#attendanceForm .ui-panelgrid .ui-calendar input {
    flex: 1;
    min-width: 0;
}

#attendanceForm .ui-panelgrid .ui-calendar .ui-button {
    flex-shrink: 0;
}

/* Separate the action buttons from the form fields */

#attendanceForm .ui-panel .ui-panel-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: #f6f9fe;
    border-top: 1px solid var(--erp-border);
}

@media (max-width: 600px) {
    #attendanceForm .ui-panelgrid .ui-panelgrid-cell {
        padding: 8px 4px;
    }

    #attendanceForm .ui-panel .ui-panel-footer {
        padding: 12px;
    }
}



/* ==========================================
   MODERN PRIMEFACES 13 DATA TABLE THEME
   ========================================== */

/* Table container */
.ui-datatable {
    background: #ffffff;
    border: 1px solid #d6e3f2 !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(27, 64, 110, 0.09);
    margin-top: 20px;
}

/* Colorful table header */
.ui-datatable .ui-datatable-table thead th {
    background: linear-gradient(135deg, #174a82, #2879bd) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px;
    padding: 15px 12px !important;
    text-align: left;
    border: 1px solid #3d79ae !important;
    border-bottom: 3px solid #55c3f1 !important;
    white-space: nowrap;
}

/* Header text and sorting icons */
.ui-datatable thead th .ui-column-title,
.ui-datatable thead th .ui-sortable-column-icon {
    color: #ffffff !important;
}

/* Odd rows: very light blue */
.ui-datatable .ui-datatable-data > tr:nth-child(odd) {
    background-color: #f0f7ff !important;
}

/* Even rows: white */
.ui-datatable .ui-datatable-data > tr:nth-child(even) {
    background-color: #ffffff !important;
}

/* Cell styling */
.ui-datatable .ui-datatable-data > tr > td {
    padding: 13px 12px !important;
    color: #334155;
    border: none !important;
    border-bottom: 1px solid #e1eaf5 !important;
    vertical-align: middle;
    transition: background-color 0.18s ease;
}

/* Hover effect */
.ui-datatable .ui-datatable-data > tr:hover > td {
    background-color: #dceeff !important;
    color: #173e6d;
}

/* Selected row */
.ui-datatable .ui-datatable-data > tr.ui-state-highlight > td {
    background-color: #c7e3ff !important;
    color: #123c6a !important;
}

/* Paginator */
.ui-datatable .ui-paginator {
    padding: 12px !important;
    background: #edf4fc !important;
    border: none !important;
    border-top: 1px solid #d6e3f2 !important;
}

/* Paginator buttons */
.ui-datatable .ui-paginator .ui-paginator-element {
    border-radius: 6px;
}

/* Search/filter inputs inside tables */
.ui-datatable .ui-column-filter,
.ui-datatable .ui-inputfield {
    border-radius: 6px !important;
}

/* Empty table message */
.ui-datatable .ui-datatable-empty-message > td {
    padding: 25px !important;
    text-align: center;
    color: #64748b;
    background: #f8fbff;
    font-weight: 500;
}

/* Table footer */
.ui-datatable tfoot td {
    background: #e7f0fc;
    color: #173e6d;
    font-weight: 700;
    border-top: 2px solid #c5d8ee !important;
}

/* Book dialog: allow horizontal scrolling when needed */
.book-dialog .ui-dialog-content {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Scrollable form container */
.book-fields-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    box-sizing: border-box;
}

/* Keep controls from being compressed or distorted */
.book-fields-inner {
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    padding: 4px;
}

/* Make controls use the available inner width */
.book-fields-inner .ui-inputfield,
.book-fields-inner .ui-selectonemenu,
.book-fields-inner .ui-selectcheckboxmenu,
.book-fields-inner .ui-inputnumber {
    max-width: 100%;
    box-sizing: border-box;
}