/* Frontend Styles for NDAL UIN Verification */
:root {
    --ndal-primary: #10B981; /* Green */
    --ndal-primary-hover: #059669;
    --ndal-bg: #f3f4f6;
    --ndal-card-bg: rgba(255, 255, 255, 0.9);
    --ndal-text: #1f2937;
    --ndal-text-light: #6b7280;
    --ndal-border: #e5e7eb;
    --ndal-error: #ef4444;
    --ndal-success: #10B981;
    --ndal-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ndal-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --ndal-radius: 16px;
    --ndal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* New Login UI mimicking the image */
.ndal-login-page {
    font-family: var(--ndal-font);
    box-sizing: border-box;
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.ndal-login-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.ndal-login-header {
    font-size: 36px;
    font-weight: 800;
    color: #e5e7eb; /* Light grey title */
    margin: 0 0 30px 0;
    letter-spacing: 1px;
}

.ndal-login-body {
    display: flex;
    gap: 40px;
    align-items: center;
}

.ndal-login-illustration {
    flex: 0 0 45%;
}

.ndal-login-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.ndal-login-form-section {
    flex: 1;
    padding-left: 20px;
}

.ndal-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.ndal-form-row label {
    flex: 0 0 100px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.ndal-form-row input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #d1d5db;
    border-radius: 0;
    padding: 8px 0;
    font-size: 14px;
    font-style: italic;
    color: #9ca3af;
    background: transparent;
    transition: var(--ndal-transition);
}

.ndal-form-row input:focus {
    outline: none;
    border-bottom-color: #0b2f6b;
    box-shadow: none;
    color: #374151;
    font-style: normal;
}

.ndal-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    margin-bottom: 20px;
}

.ndal-submit-btn {
    background-color: #0b2f6b; /* Dark blue from the image */
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.ndal-submit-btn:hover {
    background-color: #08224f;
}

.ndal-form-footer {
    text-align: right;
    font-size: 13px;
    color: #4b5563;
}

.ndal-footer-hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
    width: 60%;
    margin-left: auto;
}

.ndal-register-link {
    color: #ea580c; /* Orange from the image */
    font-weight: 700;
    text-decoration: none;
}

.ndal-forgot-wrap {
    text-align: right;
}

.ndal-forgot-btn {
    background-color: #ffedd5;
    color: #ea580c;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
}

.ndal-captcha-row {
    display: flex;
    justify-content: flex-start;
    margin-left: 100px;
    margin-bottom: 15px;
}

.ndal-captcha-display {
    background: #e5e7eb;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #0b2f6b;
    border: 1px solid #d1d5db;
    display: inline-block;
    user-select: none;
}

/* Responsive updates */
@media (max-width: 768px) {
    .ndal-login-body {
        flex-direction: column;
    }
    .ndal-login-illustration {
        flex: 0 0 auto;
        width: 80%;
        margin: 0 auto 30px auto;
    }
    .ndal-login-form-section {
        padding-left: 0;
        width: 100%;
    }
    .ndal-form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .ndal-form-row label {
        margin-bottom: 5px;
    }
    .ndal-form-row input {
        width: 100%;
    }
}

.ndal-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ndal-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--ndal-transition);
    background-color: #fff;
}

.ndal-input-group input:focus {
    outline: none;
    border-color: var(--ndal-primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.ndal-input-group-horizontal {
    flex-direction: row;
    gap: 10px;
}

.ndal-input-group-horizontal input {
    flex: 1;
}

/* Buttons */
.ndal-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--ndal-transition);
    font-family: inherit;
}

.ndal-btn-primary {
    background-color: var(--ndal-primary);
    color: white;
}

.ndal-btn-primary:hover {
    background-color: var(--ndal-primary-hover);
    transform: translateY(-1px);
}

.ndal-btn-primary:active {
    transform: translateY(1px);
}

.ndal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.ndal-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: ndal-spin 0.8s linear infinite;
    flex-shrink: 0;
    vertical-align: middle;
}

@keyframes ndal-spin {
    to { transform: rotate(360deg); }
}

/* Buttons */
.ndal-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--ndal-transition);
    font-family: inherit;
}

.ndal-btn-primary {
    background-color: var(--ndal-primary);
    color: white;
}

.ndal-btn-primary:hover {
    background-color: var(--ndal-primary-hover);
    transform: translateY(-1px);
}

.ndal-btn-primary:active {
    transform: translateY(1px);
}

.ndal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Notices */
.ndal-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ndal-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ndal-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Resend Link */
.ndal-resend-wrapper {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.ndal-resend-wrapper a {
    color: var(--ndal-primary);
    text-decoration: none;
    font-weight: 600;
}

.ndal-resend-wrapper a:hover {
    text-decoration: underline;
}

/* Dashboard Specific */
.ndal-dashboard-wrapper {
    font-family: var(--ndal-font);
    color: var(--ndal-text);
    box-sizing: border-box;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.ndal-dashboard-wrapper * {
    box-sizing: inherit;
}

.ndal-search-card, .ndal-record-card {
    background: var(--ndal-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--ndal-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--ndal-shadow);
    transition: var(--ndal-transition);
}

.ndal-search-card:hover, .ndal-record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.ndal-input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.ndal-input-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ndal-text);
}

.ndal-input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ndal-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--ndal-transition);
    background-color: #fff;
}

.ndal-input-group input:focus {
    outline: none;
    border-color: var(--ndal-primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.ndal-input-group-horizontal {
    flex-direction: row;
    gap: 10px;
}

.ndal-input-group-horizontal input {
    flex: 1;
}

.ndal-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.ndal-dashboard-header h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #10B981, #047857);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.ndal-search-card {
    padding: 30px;
    margin-bottom: 30px;
}

/* Results Grid */
.ndal-record-card {
    margin-top: 20px;
    animation: ndal-fade-in 0.5s ease-out forwards;
}

@keyframes ndal-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ndal-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ndal-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ndal-record-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--ndal-text);
}

.ndal-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ndal-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.ndal-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.ndal-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ndal-record-item {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--ndal-border);
}

.ndal-label {
    display: block;
    font-size: 12px;
    color: var(--ndal-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.ndal-value {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--ndal-text);
    word-break: break-word;
}

/* Responsive */
@media (max-width: 600px) {
    .ndal-input-group-horizontal {
        flex-direction: column;
    }
    .ndal-auth-card, .ndal-search-card, .ndal-record-card {
        padding: 20px;
    }
}

/* User Panel / Dashboard Styling */
.ndal-user-panel {
    display: flex;
    min-height: 600px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.ndal-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #eee;
    padding-top: 20px;
}

.ndal-side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ndal-side-menu li {
    margin-bottom: 5px;
}

.ndal-side-menu li a {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.ndal-side-menu li.active a {
    background-color: #0b2f6b;
    color: #fff;
    border-radius: 0 30px 30px 0;
    margin-right: 15px;
}

.ndal-side-menu li a:hover:not(.active) {
    background-color: #f8f9fa;
    color: #0b2f6b;
}

.ndal-side-menu li a i {
    margin-right: 10px;
    width: 20px;
}

.ndal-main-content {
    flex: 1;
    padding: 30px;
    background-color: #fff;
}

.ndal-content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.ndal-breadcrumb {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.ndal-user-info {
    text-align: right;
}

.ndal-user-info span {
    font-size: 13px;
    color: #333;
}

.ndal-user-info p {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0;
}

.ndal-user-info a {
    color: #ea580c;
    text-decoration: underline;
}

.ndal-dashboard-card {
    border: 1px solid #0b2f6b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ndal-card-header {
    background-color: #fff;
    color: #0b2f6b;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.ndal-card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #0b2f6b;
}

.ndal-card-body {
    padding: 20px;
}

.ndal-table-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.ndal-table-length select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ndal-table-search input {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 5px;
}

.ndal-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ndal-data-table th {
    background-color: #fff;
    color: #333;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    text-transform: uppercase;
}

.ndal-data-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    color: #666;
}

.ndal-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 13px;
    color: #666;
}

.ndal-pagination span {
    padding: 5px 10px;
    border: 1px solid #eee;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.ndal-pagination span:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
}

/* Selection Table Styling */
.ndal-selection-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ndal-selection-table td {
    padding: 15px;
    border: 1px solid #eee;
    vertical-align: middle;
}

.ndal-selection-table td:first-child {
    width: 300px;
    font-weight: 600;
    color: #333;
    background-color: #fff;
}

.ndal-full-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9fafb;
    font-size: 14px;
    color: #555;
    outline: none;
    transition: border-color 0.3s;
}

.ndal-full-select:focus {
    border-color: #0b2f6b;
}

/* Step Indicator Bar */
.ndal-step-indicator-bar {
    display: flex;
    margin-bottom: 40px;
    background: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
}

.step-item {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    color: #888;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.step-item span {
    width: 24px;
    height: 24px;
    background: #ccc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.step-item.active {
    background: #ea580c;
    color: #fff;
}

.step-item.active span {
    background: #fff;
    color: #ea580c;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 15px solid #f1f1f1;
    z-index: 1;
}

.step-item.active::after {
    border-left-color: #ea580c !important;
}

/* UIN Entry Card */
.ndal-uin-entry-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #0b2f6b;
    border-radius: 4px;
}

.ndal-section-title {
    color: #0b2f6b;
    border-bottom: 2px solid #0b2f6b;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 700;
}

.ndal-form-group-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.ndal-form-group-row label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #333;
}

.ndal-form-group-row input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.app-captcha-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Application Form Summary Header */
.ndal-app-form-header-summary {
    background-color: #0b2f6b;
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
}

.summary-item strong {
    color: #fff;
    margin-left: 5px;
}

/* Main Form Styling */
.ndal-app-main-form {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.form-section-title {
    color: #0b2f6b;
    border-bottom: 1px solid #0b2f6b;
    padding-bottom: 5px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 700;
}

.ndal-label {
    font-size: 12px;
    color: #444;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.ndal-app-main-form .form-control {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

/* OTP Modal Enhanced Styling */
#ndalOtpModal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
}

#ndalOtpModal .modal-header {
    border-bottom: 1px solid #eee;
    padding: 20px 30px;
}

#ndalOtpModal .modal-title {
    color: #0b2f6b;
    font-weight: 700;
    font-size: 18px;
}

#ndalOtpModal .modal-body {
    padding: 40px 60px;
}

#ndalOtpModal .wrap-input100 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#ndalOtpModal .label-input100 {
    flex: 0 0 150px;
    font-size: 14px;
    color: #777;
    text-align: right;
    padding-right: 30px;
    font-weight: 500;
}

#ndalOtpModal .input100 {
    flex: 1;
    border: none;
    border-bottom: 1px solid #d1d5db;
    padding: 5px 0;
    font-size: 15px;
    color: #333;
    outline: none;
}

#ndalOtpModal .input100:focus {
    border-bottom-color: #0b2f6b;
}

#ndalOtpModal .modal-footer {
    border-top: 1px solid #eee;
    padding: 20px 30px;
    justify-content: flex-end;
    gap: 15px;
}

#ndalOtpModal .login100-form-btn {
    height: 45px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ndalOtpModal .login100-form-btn#btn-verify-reg-otp {
    background: #333;
    color: #fff;
}

#ndalOtpModal .login100-form-btn#btn-verify-reg-otp:hover {
    background: #000;
}

#ndalOtpModal .btn-close-mod {
    background: #f0f7ff;
    color: #0b2f6b;
}

/* Captcha styling in modal */
#ndalOtpModal .captcha_class {
    font-family: monospace;
    font-weight: 800;
    letter-spacing: 4px;
    color: #0b2f6b;
    user-select: none;
}

#ndalOtpModal .cap_ref {
    transition: transform 0.3s;
}

#ndalOtpModal .cap_ref:hover {
    transform: rotate(180deg);
}
