/* Dashboard base */
.alaqsa-hrm-dashboard {
    background: #f6f8fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.alaqsa-hrm-dashboard h2 {
    margin-top: 0;
}
#alaqsa-hrm-dashboard-form label {
    margin-right: 18px;
}
#alaqsa-hrm-dashboard-form select,
#alaqsa-hrm-dashboard-form input[type="text"] {
    margin-left: 5px;
    margin-right: 7px;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 40px;
    margin-top: 25px;
}
.grid-card {
    background: #fff;
    padding: 14px;
    border-radius: 7px;
    box-shadow: 0 1px 4px #ddd;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 120px;
    position: relative;
}
.grid-card-label {
    font-size: 1.1em;
    color: #4a5a6a;
    margin-bottom: 10px;
}
.grid-card-value {
    font-size: 2em;
    margin-bottom: 13px;
}
.grid-card button {
    margin-top: auto;
    padding: 5px 12px;
    font-size: 1em;
}
#alaqsa-hrm-dashboard-modules {
    margin-top: 38px;
}
#dashboard-module {
    min-width: 210px;
}

/* Details Date Row and Button in One Line */
.module-datepicker-area {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 10px 0;
}
.module-datepicker-area label {
    margin-bottom: 0;
    margin-right: 6px;
}
.module-datepicker-area select,
.module-datepicker-area input[type="text"] {
    margin-right: 7px;
    margin-left: 2px;
}
.module-details-table-btn {
    margin-left: 7px;
    padding: 5px 12px;
    font-size: 1em;
}
.module-table-loading {
    margin-left: 10px;
    font-size: 1em;
    color: #888;
}

#alaqsa-hrm-dashboard-details-table-wrap {
    margin: 28px 0 0 0;
    background: #fff;
    padding: 20px 10px 18px 10px;
    border-radius: 7px;
    box-shadow: 0 1px 6px #d3d3d3;
    max-width: 98vw;
    overflow-x: auto;
}

/* Table styling */
.alaqsa-hrm-popup-table {
    border-collapse: collapse;
    margin: 15px 0;
    width: 100%;
    background: #fafcff;
}
.alaqsa-hrm-popup-table th,
.alaqsa-hrm-popup-table td {
    border: 1px solid #ccc;
    padding: 8px 11px;
    background: #f8fafb;
}
.alaqsa-hrm-popup-table th {
    background: #e5ecf3;
    font-weight: 500;
}
.alaqsa-hrm-popup-table tr:nth-child(even) td {
    background: #f3f7fa;
}

/* Popup */
#alaqsa-hrm-dashboard-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.34);
}
#alaqsa-hrm-dashboard-popup .popup-content {
    background: #fff;
    border-radius: 8px;
    max-width: 520px;
    width: 98vw;
    margin: 90px auto 0;
    padding: 28px 24px 14px 24px;
    position: relative;
    box-shadow: 0 2px 10px #888;
}
#alaqsa-hrm-dashboard-popup label {
    display: block;
    margin-bottom: 8px;
}
#popup-employee-id {
    min-width: 170px;
    margin-right: 10px;
}
#popup-submit {
    padding: 6px 13px;
}
.close-popup {
    position: absolute;
    right: 19px;
    top: 15px;
    font-size: 1.7em;
    color: #888;
    cursor: pointer;
}

/* Messages */
.alaqsa-hrm-message {
    margin-top: 12px;
    padding: 8px 13px;
}
.alaqsa-hrm-message.success {
    background: #e0ffe0;
    color: #2b6c2b;
}
.alaqsa-hrm-message.error {
    background: #ffe0e0;
    color: #a33;
}

/* Datepicker fixes */
.ui-datepicker {
    background: #fff !important;
    box-shadow: 0 4px 18px #aaa;
    border: 1px solid #bcd;
    z-index: 2000 !important;
}

/* Responsive */
@media (max-width:900px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width:600px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    #alaqsa-hrm-dashboard-details-table-wrap { padding: 10px 2px; }
}