/* DE Student Certificate Search Styles */
.de-std-cer-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.de-std-cer-header {
    text-align: center;
    margin-bottom: 40px;
}

.de-std-cer-header h2 {
    color: #1e3a8a;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.de-std-cer-header p {
    color: #64748b;
    font-size: 18px;
}

/* Search Section */
.de-std-cer-search-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.de-std-cer-search-box label {
    display: block;
    color: #1e293b;
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 16px;
}

.de-std-cer-input-group {
    display: flex;
    gap: 10px;
}

#de-std-cer-student-id {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

#de-std-cer-student-id:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.de-std-cer-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.de-std-cer-search-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.de-std-cer-search-btn svg {
    flex-shrink: 0;
}

/* Loading State */
.de-std-cer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #64748b;
}

.de-std-cer-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Card */
.de-std-cer-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.de-std-cer-card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.de-std-cer-card-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.de-std-cer-status {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.de-std-cer-status.status-pass {
    background: #10b981;
    color: white;
}

.de-std-cer-status.status-pending {
    background: #f59e0b;
    color: white;
}

/* Card Body */
.de-std-cer-card-body {
    padding: 30px;
}

.de-std-cer-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #e5e7eb;
}

.de-std-cer-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.de-std-cer-section h4 {
    color: #1e3a8a;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.de-std-cer-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #3b82f6;
    border-radius: 2px;
}

/* Info Grid */
.de-std-cer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.de-std-cer-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.de-std-cer-info-item label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.de-std-cer-info-item span {
    color: #1e293b;
    font-size: 16px;
    font-weight: 400;
}

/* Grade Badge */
.de-std-cer-grade {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.de-std-cer-grade.grade-a {
    background: #dcfce7;
    color: #14532d;
}

.de-std-cer-grade.grade-b {
    background: #dbeafe;
    color: #1e3a8a;
}

.de-std-cer-grade.grade-c {
    background: #fef3c7;
    color: #78350f;
}

.de-std-cer-grade.grade-d {
    background: #fee2e2;
    color: #7f1d1d;
}

/* Scores Grid */
.de-std-cer-scores-grid {
    display: grid;
    gap: 16px;
}

.de-std-cer-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.de-std-cer-score-item.highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
}

.de-std-cer-score-item label {
    color: #475569;
    font-size: 15px;
    flex: 1;
}

.de-std-cer-score-item .score {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.de-std-cer-score-item .score.avg {
    color: #3b82f6;
    font-size: 20px;
}

.de-std-cer-score-item .no-score {
    color: #cbd5e1;
}

/* Card Footer */
.de-std-cer-card-footer {
    background: #f8fafc;
    padding: 25px 30px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.de-std-cer-cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.de-std-cer-cert-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.de-std-cer-cert-btn svg {
    flex-shrink: 0;
}

.de-std-cer-cert-not-available {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    font-size: 16px;
}

.de-std-cer-cert-not-available svg {
    color: #f59e0b;
}

/* Messages */
.de-std-cer-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 16px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.de-std-cer-message-info {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.de-std-cer-message-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.de-std-cer-message-warning {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fde68a;
}

.de-std-cer-message-error {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}

.de-std-cer-message svg {
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .de-std-cer-container {
        margin: 20px;
        padding: 20px;
    }
    
    .de-std-cer-header h2 {
        font-size: 24px;
    }
    
    .de-std-cer-header p {
        font-size: 16px;
    }
    
    .de-std-cer-search-section {
        padding: 20px;
    }
    
    .de-std-cer-input-group {
        flex-direction: column;
    }
    
    .de-std-cer-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .de-std-cer-card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .de-std-cer-card-body {
        padding: 20px;
    }
    
    .de-std-cer-info-grid {
        grid-template-columns: 1fr;
    }
    
    .de-std-cer-score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .de-std-cer-score-item .score {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .de-std-cer-container {
        margin: 10px;
        padding: 15px;
    }
    
    .de-std-cer-section h4 {
        font-size: 18px;
    }
    
    .de-std-cer-score-item label {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .de-std-cer-container {
        box-shadow: none;
        background: white;
    }
    
    .de-std-cer-search-section {
        display: none;
    }
    
    .de-std-cer-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Accessibility */
#de-std-cer-student-id:focus,
.de-std-cer-search-btn:focus,
.de-std-cer-cert-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .de-std-cer-container {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .de-std-cer-search-section,
    .de-std-cer-card {
        background: #1e293b;
    }
    
    .de-std-cer-header h2 {
        color: #60a5fa;
    }
    
    .de-std-cer-header p {
        color: #cbd5e1;
    }
    
    #de-std-cer-student-id {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    #de-std-cer-student-id:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .de-std-cer-card-body {
        background: #1e293b;
    }
    
    .de-std-cer-section {
        border-color: #334155;
    }
    
    .de-std-cer-info-item span,
    .de-std-cer-score-item .score {
        color: #e2e8f0;
    }
    
    .de-std-cer-score-item {
        background: #0f172a;
        border-color: #334155;
    }
    
    .de-std-cer-score-item.highlight {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%);
        border-color: #60a5fa;
    }
    
    .de-std-cer-card-footer {
        background: #0f172a;
        border-color: #334155;
    }
}


/* Certificate Actions */
.de-std-cer-cert-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Share Button */
.de-std-cer-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.de-std-cer-share-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Modal Styles */
.de-std-cer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.de-std-cer-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.de-std-cer-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.de-std-cer-modal-header h3 {
    margin: 0;
    color: #1e3a8a;
    font-size: 20px;
}

.de-std-cer-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.de-std-cer-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.de-std-cer-modal-body {
    padding: 24px;
}

.de-std-cer-modal-body p {
    color: #475569;
    margin-bottom: 20px;
}

/* Share URL Box */
.de-std-cer-share-url-box {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.de-std-cer-share-url-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: #f8fafc;
    color: #334155;
}

.de-std-cer-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.de-std-cer-copy-btn:hover {
    background: #2563eb;
}

.de-std-cer-copy-btn.success {
    background: #10b981;
}

/* Social Share Buttons */
.de-std-cer-share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.de-std-cer-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.de-std-cer-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.de-std-cer-social-btn.fb {
    background: #1877f2;
}

.de-std-cer-social-btn.tw {
    background: #1da1f2;
}

.de-std-cer-social-btn.line {
    background: #00c300;
}

/* Responsive */
@media (max-width: 768px) {
    .de-std-cer-cert-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .de-std-cer-cert-btn,
    .de-std-cer-share-btn {
        width: 100%;
    }
    
    .de-std-cer-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .de-std-cer-share-url-box {
        flex-direction: column;
    }
    
    .de-std-cer-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .de-std-cer-modal-content {
        background: #1e293b;
    }
    
    .de-std-cer-modal-header {
        border-color: #334155;
    }
    
    .de-std-cer-modal-header h3 {
        color: #60a5fa;
    }
    
    .de-std-cer-modal-close {
        color: #9ca3af;
    }
    
    .de-std-cer-modal-close:hover {
        background: #334155;
        color: #e5e7eb;
    }
    
    .de-std-cer-modal-body p {
        color: #cbd5e1;
    }
    
    .de-std-cer-share-url-box input {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
}


/* Charts Section */
.de-std-cer-charts-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* Chart Tabs */
.de-std-cer-chart-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.de-std-cer-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.de-std-cer-tab-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.de-std-cer-tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* Chart Wrapper */
.de-std-cer-chart-wrapper {
    position: relative;
    height: 400px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Chart Containers */
.de-std-cer-chart-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.de-std-cer-chart-container.active {
    opacity: 1;
    visibility: visible;
}

.de-std-cer-chart-container canvas {
    max-height: 100%;
}

/* Responsive Chart Adjustments */
@media (max-width: 768px) {
    .de-std-cer-charts-container {
        padding: 15px;
    }
    
    .de-std-cer-chart-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .de-std-cer-tab-btn {
        font-size: 14px;
        padding: 8px 16px;
        flex: 1;
        min-width: 100px;
    }
    
    .de-std-cer-chart-wrapper {
        height: 350px;
        padding: 15px;
    }
    
    .de-std-cer-chart-container {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    .de-std-cer-chart-wrapper {
        height: 300px;
        padding: 10px;
    }
    
    .de-std-cer-tab-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Dark Mode Support for Charts */
@media (prefers-color-scheme: dark) {
    .de-std-cer-charts-container {
        background: #0f172a;
    }
    
    .de-std-cer-chart-tabs {
        border-bottom-color: #334155;
    }
    
    .de-std-cer-tab-btn {
        color: #94a3b8;
    }
    
    .de-std-cer-tab-btn:hover {
        color: #60a5fa;
        background: rgba(96, 165, 250, 0.1);
    }
    
    .de-std-cer-tab-btn.active {
        color: #60a5fa;
        border-bottom-color: #60a5fa;
    }
    
    .de-std-cer-chart-wrapper {
        background: #1e293b;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Animation for chart transitions */
@keyframes fadeInChart {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.de-std-cer-chart-container.active {
    animation: fadeInChart 0.4s ease-out;
}

/* Chart Legend Styling */
.de-std-cer-chart-container .chartjs-legend {
    margin-top: 20px;
}

/* Print Styles for Charts */
@media print {
    .de-std-cer-charts-container {
        page-break-inside: avoid;
    }
    
    .de-std-cer-chart-tabs {
        display: none;
    }
    
    .de-std-cer-chart-wrapper {
        height: auto;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    /* Show only comparison chart when printing */
    .de-std-cer-chart-container {
        display: none;
    }
    
    #comparison-chart {
        display: block;
        position: static;
        opacity: 1;
        visibility: visible;
    }
}


/* Update Info Modal Styles */
.de-std-cer-update-modal .de-std-cer-modal-content {
    max-width: 600px;
}

.de-std-cer-update-modal .de-std-cer-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
}

.de-std-cer-update-modal .de-std-cer-modal-header h3 {
    color: white;
    font-size: 24px;
    margin: 0;
}

/* Update Notice */
.de-std-cer-update-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 30px;
}

.de-std-cer-update-notice svg {
    flex-shrink: 0;
    color: #f59e0b;
}

.de-std-cer-update-notice p {
    margin: 0;
    color: #92400e;
    font-size: 16px;
    font-weight: 500;
}

/* Update Form */
.de-std-cer-update-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.de-std-cer-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.de-std-cer-form-group label {
    color: #1e293b;
    font-size: 16px;
    font-weight: 500;
}

.de-std-cer-form-group .required {
    color: #ef4444;
}

.de-std-cer-form-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.de-std-cer-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Autocomplete */
.de-std-cer-autocomplete {
    position: relative;
}

.de-std-cer-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
}

.de-std-cer-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 15px;
    color: #1e293b;
}

.de-std-cer-autocomplete-item:hover {
    background: #f3f4f6;
}

/* Warning Box */
.de-std-cer-warning-box {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 16px;
    margin-top: 10px;
}

.de-std-cer-warning-box p {
    margin: 0;
    color: #7f1d1d;
    font-size: 14px;
    line-height: 20px;
}

.de-std-cer-warning-box strong {
    font-weight: 600;
}

/* Submit Button */
.de-std-cer-submit-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.de-std-cer-submit-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.de-std-cer-submit-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* OTP Section */
.de-std-cer-otp-section {
    text-align: center;
    padding: 20px 0;
}

.de-std-cer-otp-info {
    margin-bottom: 30px;
}

.de-std-cer-otp-info p {
    margin: 0 0 10px 0;
    color: #475569;
    font-size: 16px;
}

.de-std-cer-otp-info strong {
    color: #1e3a8a;
    font-weight: 600;
}

/* OTP Input Group */
.de-std-cer-otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.otp-digit {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.otp-digit:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.otp-digit:not(:placeholder-shown) {
    border-color: #3b82f6;
    background: white;
}

/* Verify Button */
.de-std-cer-verify-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    margin-bottom: 16px;
}

.de-std-cer-verify-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Resend Button */
.de-std-cer-resend-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.de-std-cer-resend-btn:hover {
    color: #2563eb;
}

/* Dark Mode Support for Modal */
@media (prefers-color-scheme: dark) {
    .de-std-cer-update-modal .de-std-cer-modal-content {
        background: #1e293b;
    }
    
    .de-std-cer-update-notice {
        background: #78350f;
        border-color: #92400e;
    }
    
    .de-std-cer-update-notice p {
        color: #fef3c7;
    }
    
    .de-std-cer-form-group label {
        color: #e2e8f0;
    }
    
    .de-std-cer-form-group input {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .de-std-cer-form-group input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .de-std-cer-autocomplete-list {
        background: #1e293b;
        border-color: #334155;
    }
    
    .de-std-cer-autocomplete-item {
        color: #e2e8f0;
    }
    
    .de-std-cer-autocomplete-item:hover {
        background: #334155;
    }
    
    .de-std-cer-warning-box {
        background: #7f1d1d;
        border-color: #991b1b;
    }
    
    .de-std-cer-warning-box p {
        color: #fee2e2;
    }
    
    .de-std-cer-otp-info p {
        color: #cbd5e1;
    }
    
    .de-std-cer-otp-info strong {
        color: #60a5fa;
    }
    
    .otp-digit {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .otp-digit:focus {
        border-color: #60a5fa;
    }
    
    .de-std-cer-resend-btn {
        color: #60a5fa;
    }
    
    .de-std-cer-resend-btn:hover {
        color: #93bbfc;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .de-std-cer-update-modal .de-std-cer-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .de-std-cer-update-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .de-std-cer-otp-input-group {
        gap: 8px;
    }
    
    .otp-digit {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .de-std-cer-update-modal .de-std-cer-modal-header h3 {
        font-size: 20px;
    }
    
    .de-std-cer-form-group label {
        font-size: 14px;
    }
    
    .de-std-cer-form-group input {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .otp-digit {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Accessibility */
.de-std-cer-update-modal input:focus,
.de-std-cer-update-modal button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state for buttons */
.de-std-cer-submit-btn.loading,
.de-std-cer-verify-btn.loading {
    position: relative;
    color: transparent;
}

.de-std-cer-submit-btn.loading::after,
.de-std-cer-verify-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}


/* Add these styles to your existing de-std-cer.css file */

/* Department Code Container */
.de-std-cer-dep-code-container {
    position: relative;
}

/* Department Code Input Group */
.de-std-cer-dep-code-inputs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* Individual Department Code Input */
.dep-code-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.dep-code-digit:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.05);
}

.dep-code-digit.valid {
    border-color: #10b981;
    background: #ecfdf5;
}

.dep-code-digit.error {
    border-color: #ef4444;
    background: #fef2f2;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Department Code Loading */
.de-std-cer-dep-code-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 14px;
    color: #3b82f6;
    margin-bottom: 12px;
}

.de-std-cer-small-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #dbeafe;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Department Name Display */
.de-std-cer-dep-name-display {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

.de-std-cer-dep-name-th,
.de-std-cer-dep-name-en {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.de-std-cer-dep-name-th:last-child,
.de-std-cer-dep-name-en:last-child {
    margin-bottom: 0;
}

.de-std-cer-dep-name-th label,
.de-std-cer-dep-name-en label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    min-width: 180px;
}

.de-std-cer-dep-name-th span,
.de-std-cer-dep-name-en span {
    font-size: 16px;
    color: #1e293b;
    font-weight: 500;
    flex: 1;
}

/* Field Error */
.de-std-cer-field-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

.de-std-cer-field-error svg {
    flex-shrink: 0;
}

/* Responsive Design for Department Code */
@media (max-width: 480px) {
    .de-std-cer-dep-code-inputs {
        gap: 4px;
    }
    
    .dep-code-digit {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .de-std-cer-dep-name-th,
    .de-std-cer-dep-name-en {
        flex-direction: column;
        gap: 4px;
    }
    
    .de-std-cer-dep-name-th label,
    .de-std-cer-dep-name-en label {
        min-width: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dep-code-digit {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .dep-code-digit:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .dep-code-digit.valid {
        border-color: #10b981;
        background: #064e3b;
    }
    
    .dep-code-digit.error {
        border-color: #ef4444;
        background: #7f1d1d;
    }
    
    .de-std-cer-dep-code-loading {
        background: #1e3a8a;
        color: #93c5fd;
    }
    
    .de-std-cer-dep-name-display {
        background: #064e3b;
        border-color: #10b981;
    }
    
    .de-std-cer-dep-name-th span,
    .de-std-cer-dep-name-en span {
        color: #e2e8f0;
    }
    
    .de-std-cer-field-error {
        background: #7f1d1d;
        border-color: #dc2626;
        color: #fecaca;
    }
}

/* Accessibility */
.dep-code-digit:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .de-std-cer-dep-code-container,
    .de-std-cer-dep-code-loading,
    .de-std-cer-field-error {
        display: none !important;
    }
    
    .de-std-cer-dep-name-display {
        background: none;
        border: 1px solid #e5e7eb;
        padding: 8px;
    }
}