/* Reset/Base Styles */
.aiginex-app-mng-form-container, .aiginex-app-mng-dashboard-container {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Container Styles */
.aiginex-app-mng-form-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.aiginex-app-mng-dashboard-container {
    margin: 20px 0;
}

/* Field Group & Input Styling */
.aiginex-app-mng-field-group {
    margin-bottom: 20px;
}

.aiginex-app-mng-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a4a4a;
}

.aiginex-app-mng-input {
    width: 100%;
    padding: 10px 12px; /* Adjusted padding slightly for better vertical alignment */
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    
    /* FIX: Ensure dropdowns/inputs aren't cut off */
    min-height: 46px;
    height: auto;
    line-height: 1.5;
    background-color: #ffffff;
}

.aiginex-app-mng-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.aiginex-app-mng-button {
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aiginex-app-mng-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* NEW DELETE BUTTON STYLE */
.aiginex-btn-delete {
    background-color: #dc3545;
    padding: 12px 18px; /* Slightly tighter padding for the 'x' icon or small text */
    margin-left: 5px;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
}

.aiginex-btn-delete:hover {
    background-color: #c82333;
}


/* Message & Info Box Styles */
.aiginex-app-mng-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    font-weight: 500;
}
.aiginex-app-mng-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}
.aiginex-app-mng-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.aiginex-app-mng-info-message {
    padding: 15px;
    background-color: #e6f7ff;
    border-left: 5px solid #007bff;
    margin-bottom: 20px;
    font-style: italic;
    color: #333;
}

/* Filter Bar Styles */
.aiginex-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    
    /* FIX: Allow dropdowns to overflow container without being clipped */
    overflow: visible;
    position: relative;
    z-index: 5;
}
.aiginex-filter-item {
    flex: 1;
    min-width: 200px;
}

/* Reviewer Dashboard Table Styles */
.aiginex-app-mng-table-wrap {
    overflow-x: auto;
}
.aiginex-app-mng-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
.aiginex-app-mng-table th, .aiginex-app-mng-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.aiginex-app-mng-table th {
    background-color: #f4f4f4;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
}
.aiginex-app-mng-table tr:hover {
    background-color: #f9f9f9;
}

/* Status Tags */
.aiginex-app-mng-status-tag {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}
.aiginex-app-mng-status-pending { background-color: #ffc107; color: #333; }
.aiginex-app-mng-status-in-review { background-color: #17a2b8; }
.aiginex-app-mng-status-approved { background-color: #28a745; }
.aiginex-app-mng-status-rejected { background-color: #dc3545; }
.aiginex-app-mng-status-resolved { background-color: #6c757d; }

/* Modal Styles */
.aiginex-app-mng-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); 
    display: none; /* Keep default hidden, JS will toggle flex */
    justify-content: center;
    align-items: center;
}
.aiginex-app-mng-modal-content {
    background-color: #fefefe;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.aiginex-app-mng-close-btn {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 100;
}
.aiginex-modal-header {
    background-color: #333;
    color: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}
.aiginex-modal-header h3 { margin: 0; color: #fff; }
.aiginex-modal-body {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 30px;
}
.aiginex-modal-col-left {
    flex: 1;
    min-width: 250px;
    border-right: 1px solid #f0f0f0;
    padding-right: 20px;
}
.aiginex-modal-col-right {
    flex: 2;
    min-width: 300px;
}
.aiginex-modal-footer {
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* Detail Styles */
.aiginex-app-mng-detail-meta p {
    margin-bottom: 8px;
    font-size: 0.95em;
    border-bottom: 1px dashed #eee;
    padding-bottom: 5px;
}
.aiginex-app-mng-description-box {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.7;
    margin-top: 10px;
}
.aiginex-app-mng-action-form {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #ffeeba;
}
.aiginex-app-mng-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.aiginex-app-mng-button-group .aiginex-app-mng-button {
    margin-right: 0;
    flex: 1;
}
.aiginex-app-mng-button-group .action-approve { background-color: #28a745; }
.aiginex-app-mng-button-group .action-reject { background-color: #dc3545; }
.aiginex-app-mng-button-group .action-review { background-color: #17a2b8; }
.aiginex-app-mng-history-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}
.aiginex-app-mng-history-list li {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    background-color: #fff;
    margin-bottom: 5px;
    border-radius: 4px;
}

/* -------------------------------------------
   NEW: REVIEWER TOAST NOTIFICATION 
   ------------------------------------------- */
.aiginex-toast {
    visibility: hidden;
    min-width: 280px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 30px;
    bottom: 30px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-left: 5px solid #28a745;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.aiginex-toast.show {
    visibility: visible;
    transform: translateY(0);
}

.aiginex-toast a {
    color: #76c7c0;
    font-weight: bold;
    text-decoration: none;
    margin-left: 10px;
}

/* -------------------------------------------
   NEW: APPLICANT SUCCESS MODAL
   ------------------------------------------- */
.aiginex-success-modal {
    /* REMOVED display: none from CSS to avoid priority conflicts. 
       Let inline style and JS handle it. */
    display: none; 
    position: fixed;
    z-index: 2000; /* Increased Z-Index to be above everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.aiginex-success-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.aiginex-success-icon {
    font-size: 50px;
    color: #28a745;
    margin-bottom: 15px;
}

.aiginex-success-content h3 {
    margin-top: 0;
    color: #333;
}