/* NSDL PAN Plugin Frontend Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #38ef7d;
    --danger-color: #f5576c;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.nsdl-registration-form,
.nsdl-application-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.nsdl-registration-form:hover,
.nsdl-application-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.nsdl-registration-form h3,
.nsdl-application-form h4 {
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    font-size: 26px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 3px solid transparent;
    border-image: var(--primary-gradient);
    border-image-slice: 1;
}

.nsdl-user-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.nsdl-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.nsdl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: -1;
}

.nsdl-btn:hover::before {
    left: 100%;
}

.nsdl-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nsdl-btn-primary:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
}

.nsdl-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.nsdl-message {
    padding: 18px 24px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nsdl-message::before {
    content: '';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nsdl-message.success {
    background: linear-gradient(135deg, rgba(212, 237, 218, 0.8), rgba(195, 230, 203, 0.6));
    color: #155724;
    border: 2px solid #c3e6cb;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.15);
}

.nsdl-message.success::before {
    content: '✓';
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nsdl-message.error {
    background: linear-gradient(135deg, rgba(248, 215, 218, 0.8), rgba(245, 198, 203, 0.6));
    color: #721c24;
    border: 2px solid #f5c6cb;
    box-shadow: 0 4px 15px rgba(114, 28, 36, 0.15);
}

.nsdl-message.error::before {
    content: '✕';
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nsdl-message.warning {
    background: linear-gradient(135deg, rgba(255, 243, 205, 0.8), rgba(255, 234, 167, 0.6));
    color: #856404;
    border: 2px solid #ffeaa7;
    box-shadow: 0 4px 15px rgba(133, 100, 4, 0.15);
}

.nsdl-message.warning::before {
    content: '⚠';
    background: #ffc107;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* User Dashboard Styles */
.nsdl-user-dashboard {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 35px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.user-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
}

.transactions-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.nsdl-transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.nsdl-transactions-table th,
.nsdl-transactions-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.nsdl-transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.nsdl-transactions-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.status-badge.status-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.2);
}

.status-badge.status-success::before {
    background: #28a745;
}

.status-badge.status-pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    box-shadow: 0 2px 8px rgba(133, 100, 4, 0.2);
}

.status-badge.status-pending::before {
    background: #ffc107;
}

.status-badge.status-failed,
.status-badge.status-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.2);
}

.status-badge.status-failed::before,
.status-badge.status-error::before {
    background: #dc3545;
}

/* Modal Styles */
.nsdl-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
}

.modal-content .close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    .nsdl-transactions-table {
        font-size: 14px;
    }
    
    .nsdl-transactions-table th,
    .nsdl-transactions-table td {
        padding: 10px 8px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}