/* style.css */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    margin: 0;
    padding: 20px;
}

.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}
.header {
    background: #0078D4;
    color: white;
}
.footer { 
    color: #777;
}

.ui-widget {
    font-size: 14px;
}

.ui-dialog-content {
    padding: 20px;
}

h2 {
    margin: 0;
    padding: 15px 0;
    font-size: 20px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button,
.ui-button {
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    margin-top: 5px;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

.success {
    color: green;
    text-align: center;
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

.toolbar {
    margin-bottom: 20px;
}

#login-box {
    width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px #aaa;
    padding: 0;
}

#login-box h2 {
    text-align: center;
    padding: 15px;
    margin: 0;
    font-size: 18px;
}

/* --- ADDED: Login Page Layout --- */
.login-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 20px;
    min-height: 80vh;
}

.login-form-wrapper {
    flex: 0 1 400px; /* Let it shrink, don't let it grow, base size 400px */
}

.login-logo-wrapper {
    flex: 0 1 400px; /* Same properties for balance */
    text-align: center;
}

.login-logo-wrapper img {
    max-width: 100%; /* Makes the image responsive */
    height: auto;
    display: block;
}
/* --- END: Login Page Layout --- */


select[multiple] {
    width: 100%;
    height: 120px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
}

#globalModal .ui-dialog-content {
    padding: 20px;
}

#globalModal form {
    margin-top: 10px;
}

#globalModal .field {
    margin-bottom: 15px;
}

#globalModal input,
#globalModal select {
    width: 100%;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.dashboard-tile {
    width: 180px; /* Adjusted width */
    height: 140px; /* Adjusted height */
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-size: 16px; /* Adjusted font size */
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    /* Flexbox properties for centering icon and text */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.dashboard-tile:hover {
    background: #e0e0e0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* Style for the SVG icons within the tiles */
.dashboard-tile svg {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    fill: #0078D4; /* Icon color */
}

.perm-select {
    width: 100%;
    min-height: 80px;
}

.field.checkbox-field {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.field.checkbox-field input[type="checkbox"] {
    margin: 0;
}

.field.checkbox-field label {
    margin: 0;
    font-weight: normal;
    display: inline;
}

/* --- ADDED: Universal Dialog Close Button Enhancement --- */

/* 1. Make the button a larger, touch-friendly target */
.ui-dialog .ui-dialog-titlebar-close {
    width: 44px;
    height: 44px;
}

/* 2. Hide the tiny default background image icon */
.ui-dialog .ui-dialog-titlebar-close .ui-icon {
    display: none;
}

/* 3. Add a new, larger '×' icon using a pseudo-element */
.ui-dialog .ui-dialog-titlebar-close::before {
    content: '×';
    display: block;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    line-height: 44px; /* Vertically centers the '×' in the 44px button */
    color: #555;
}

/* 4. Improve the hover state for desktop users */
.ui-dialog .ui-dialog-titlebar-close:hover {
    background-color: #e0e0e0;
}