/* Blur effect for table rows when loading */
.table-blur {
    filter: blur(2px) grayscale(0.2);
    pointer-events: none;
    opacity: 0.7;
    transition: filter 0.2s, opacity 0.2s;
}
/* Dashboard page custom styles moved from dashboard.php */
/* Dashboard table header: more specific, override other th styles */
.dashboard-container .responsive-table thead th {
    background: #f0f0f0 !important;
    color: #111 !important;
    font-weight: 600;
    border-bottom: 2px solid #d1d1d1;
}
td.loan-uid-col, th.loan-uid-col {
    max-width: 110px;
    min-width: 80px;
    word-break: break-all;
    white-space: pre-line;
    background: #f8faff;
    border-right: 1.5px solid #e0e6ef;
    font-family: monospace, monospace;
    font-size: 13px;
}
.clickable-row { cursor: pointer; }
.btn-repay {
    background: none !important;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}
.btn-repay i {
    background: none !important;
    color: #2980b9 !important;
    font-size: 1.2em;
    vertical-align: middle;
}
.btn-repay:focus, .btn-repay:hover {
    background: none !important;
}
/* Loading overlay hidden by default, only shown on AJAX */
.table-loading-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(2px);
    z-index: 10;
}
.table-loading-overlay .spinner {padding:10px 18px;border:1px solid #c1ea75;border-radius:28px;font-size:14px;color:#2980b9;background:#f8fff0;box-shadow:0 2px 6px rgba(0,0,0,0.08);}
.responsive-table-wrapper {position:relative;}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f4;
}

.menu {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto 32px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: relative;
    top: 0;
    left: 0;
    z-index: 100;
    flex-wrap: nowrap;
}
.menu .logo {
    flex: 0 0 auto;
    text-align: left;
    font-weight: bold;
    font-size: 1.1em;
    white-space: nowrap;
}
.menu .menu-items {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}
.menu .menu-items a {
    font-size: 15px;
    color: #222;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    white-space: nowrap;
}
.menu .menu-items a:hover {
    color: #017bff !important;
    text-decoration: none;
}

.menu .account-logout-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    margin-left: 0;
}
.menu .account-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    color: #222;
    white-space: nowrap;
    padding: 6px 0;
    justify-content: flex-end;
}
.menu .logout-link {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    font-weight: 500;
    margin-top: -2px;
    white-space: nowrap;
    padding: 0;
    text-align: right;
    align-self: flex-end;
}
.menu .logout-link:hover {
    color: #017bff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.info, .login {
    padding: 20px;
}

.info {
    background-color: #007BFF;
    color: #fff;
}

.info h1 {
    margin: 0;
    font-size: 24px;
}
.info p {
    margin-top: 10px;
    font-size: 16px;
}

.login h2 {
    margin: 0 0 20px;
    font-size: 22px;
}
.login form {
    display: flex;
    flex-direction: column;
}
.login form input {
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login form button {
    padding: 10px;
    font-size: 16px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.login form button:hover {
    background-color: #0056b3;
}

/* Table styles for dashboard */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
}
th, td {
    padding: 10px 5px;
    border: 1px solid #ddd;
    text-align: left;
    background: none;
    color: #222;
}
th {
    background: none;
    color: #222;
}

/* Status styles */
/* Remove status colors, keep plain text */
.badge-status {display:inline-block;padding:4px 10px;border-radius:14px;font-size:12px;font-weight:600;letter-spacing:.3px;}
.badge-status.active {background:#e8ffe2;color:#27ae60;}
.badge-status.closed {background:#ffe5e2;color:#c0392b;}

/* Repay Loan Page Specific Styles */
.repay-container {
    max-width: 400px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 32px 24px;
}

.repay-container h2 {
    text-align: center;
    margin-bottom: 24px;
}

.repay-container label {
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 500;
    display: block;
}

.repay-container select,
.repay-container input[type="number"],
.repay-container input[type="date"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.repay-container button {
    width: 100%;
    padding: 12px;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
}

.repay-container button:hover {
    background: #0056b3;
}

/* Dashboard specific stylesss */
.dashboard-container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 32px 24px;
}

.dashboard-container h2 {
    text-align: center;
    margin-bottom: 24px;
}

.responsive-table {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.dashboard-container table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
}

.dashboard-container th, .dashboard-container td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.dashboard-container th {
    background: #c1ea75;
    color: #fff;
}

.dashboard-summary {
    margin-top: 32px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 32px;
    background: #f8fff0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(193,234,117,0.12);
    padding: 18px 32px;
    font-size: 1.15em;
    font-weight: 500;
    color: #222;
    align-items: center;
}
.dashboard-summary .summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 160px;
}
.dashboard-summary .summary-label {
    font-size: 0.98em;
    color: #017bff;
    font-weight: 600;
    margin-bottom: 2px;
}
.dashboard-summary .summary-value {
    font-size: 1.25em;
    color: #2980b9;
    font-weight: bold;
}

/* Form Container Styles */
.form-container {
    max-width: 400px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 32px 24px;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 24px;
}

.form-container label {
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 500;
    display: block;
}

.form-container select,
.form-container input[type="number"],
.form-container input[type="date"],
.form-container input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.form-container button {
    width: 100%;
    padding: 12px;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
}

.form-container button:hover {
    background: #0056b3;
}

/* Repay Button Styles */
/* Repay button: icon only, no background */
.btn-repay {
    display: inline-block;
    padding: 0;
    background: none;
    color: #222;
    border: none;
    text-decoration: none;
    font-weight: normal;
    margin: 0 2px;
    font-size: 14px;
    cursor: pointer;
    vertical-align: middle;
}
.btn-repay i {
    font-size: 14px;
}
.btn-repay:hover {
    color: #007BFF;
}

/* Repayment Details Page Styles */
.repayment-details-container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 32px 24px;
}

.repayment-details-container h2 {
    text-align: center;
    margin-bottom: 24px;
}

.repayment-details-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
}

.repayment-details-container th, .repayment-details-container td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.repayment-details-container th {
    background: #007BFF;
    color: #fff;
}

.repayment-details-container p {
    margin: 8px 0;
    font-size: 15px;
}

/* Dashboard Filter Styles */
.dashboard-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-filter label {
    font-weight: 500;
    margin-right: 8px;
}
.dashboard-filter select,
.dashboard-filter input[type="date"] {
    margin-left: 4px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
.dashboard-filter select.active-filter,
.dashboard-filter input[type="date"].active-filter {
    border-color: #2980b9;
    background: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(41,128,185,0.15);
}
.dashboard-filter button {
    padding: 8px 16px;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}
.dashboard-filter button:hover {
    background: #0056b3;
}

/* Responsive styles */
@media (min-width: 600px) {
    .container {
        flex-direction: row;
    }
    .info, .login {
        flex: 1;
        min-width: 300px;
    }
    .login {
        border-left: 1px solid #eee;
    }
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
    .info h1 {
        font-size: 20px;
    }
    .login h2 {
        font-size: 18px;
    }
    table, th, td {
        font-size: 13px;
        padding: 8px 3px;
    }
    .menu {
        padding: 8px;
    }
    .menu a {
        margin: 0 5px;
        font-size: 15px;
    }
}

