/* Certificate Module Styles */

.certificates-page {
    padding: 1.5rem;
    min-height: 100vh;
    width: 100%;
}

.certificates-page * {
    box-sizing: border-box;
}

/* Page Header */
.certificates-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.certificates-page .header-content {
    flex: 1;
    min-width: 300px;
}

.certificates-page .page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.certificates-page .page-subtitle {
    color: #6B7280;
    font-size: 1rem;
    margin: 0;
}

.certificates-page .header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Stats Cards - Certificates Page */
.certificate-overview {
    margin-bottom: 2rem;
}

.certificates-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.certificates-page .stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

/* Clean left accent bar - no overlapping decorations */
.certificates-page .stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 0;
}

/* Reset any ::after pseudo-elements that may interfere */
.certificates-page .stat-card::after {
    display: none !important;
}

.certificates-page .stat-card.stat-active::before { background: linear-gradient(180deg, #10B981, #059669); }
.certificates-page .stat-card.stat-warning::before { background: linear-gradient(180deg, #F59E0B, #D97706); }
.certificates-page .stat-card.stat-info::before { background: linear-gradient(180deg, #3B82F6, #2563EB); }

.certificates-page .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #D1D5DB;
}

.certificates-page .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.certificates-page .stat-active .stat-icon { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }
.certificates-page .stat-warning .stat-icon { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.certificates-page .stat-info .stat-icon { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); }

.certificates-page .stat-content {
    flex: 1;
    min-width: 0;
}

.certificates-page .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.certificates-page .stat-label {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.certificates-page .stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.certificates-page .stat-trend.positive { background: #D1FAE5; color: #059669; }
.certificates-page .stat-trend.warning { background: #FEF3C7; color: #D97706; }
.certificates-page .stat-trend.neutral { background: #E5E7EB; color: #6B7280; }

/* Expiry Timeline Section */
.certificates-page .expiry-timeline-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #E5E7EB;
}

.certificates-page .section-header {
    margin-bottom: 1.5rem;
}

.certificates-page .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.certificates-page .section-icon {
    font-size: 1.25rem;
}

.certificates-page .section-description {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0;
}

.certificates-page .timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Timeline Items - Certificates Page */
.certificates-page .timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #F9FAFB;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
}

.certificates-page .timeline-item:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.certificates-page .timeline-country {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    flex-shrink: 0;
}

.certificates-page .timeline-flag {
    font-size: 1.25rem;
}

.certificates-page .timeline-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

.certificates-page .timeline-bar-container {
    flex: 1;
    height: 28px;
    background: #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    min-width: 150px;
}

.certificates-page .timeline-bar {
    height: 100%;
    border-radius: 14px;
    transition: width 0.5s ease;
}

.certificates-page .timeline-bar.valid { background: linear-gradient(90deg, #10B981, #34D399); }
.certificates-page .timeline-bar.expiring { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.certificates-page .timeline-bar.expired { background: linear-gradient(90deg, #EF4444, #F87171); }

.certificates-page .timeline-bar-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    text-shadow: 0 0 4px rgba(255,255,255,0.8);
    z-index: 1;
}

.certificates-page .timeline-expiry {
    min-width: 110px;
    text-align: right;
    flex-shrink: 0;
}

.certificates-page .timeline-date {
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

.certificates-page .timeline-days {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Expiry Alerts */
.expiry-alerts-section {
    margin-bottom: 2rem;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.expiry-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

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

.expiry-alert.warning {
    background: linear-gradient(135deg, #FEF3C7, #FFFBEB);
    border: 1px solid #F59E0B;
}

.expiry-alert.danger {
    background: linear-gradient(135deg, #FEE2E2, #FEF2F2);
    border: 1px solid #EF4444;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 0.875rem;
    color: #6B7280;
}

.alert-countdown {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
}

.expiry-alert.warning .alert-countdown {
    background: #F59E0B;
    color: white;
}

.expiry-alert.danger .alert-countdown {
    background: #EF4444;
    color: white;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #6366F1;
}

/* Certificates Container */
.certificates-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.certificates-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.certificates-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.certificates-subtitle {
    color: #6B7280;
    font-size: 0.875rem;
    margin: 0;
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: #F3F4F6;
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.813rem;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.view-btn.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.view-btn:hover:not(.active) {
    color: #111827;
}

/* Table Styles */
.certificates-content {
    padding: 0;
}

.table-wrapper {
    overflow-x: auto;
}

.certificate-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.certificate-table th,
.certificate-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
    vertical-align: middle;
}

.certificate-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.certificate-table tbody tr:hover {
    background: #F9FAFB;
}

.country-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.country-flag {
    font-size: 1.5rem;
}

.country-name {
    font-weight: 600;
    color: #111827;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.status-success,
.status-badge.status-active {
    background: #D1FAE5;
    color: #059669;
}

.status-badge.status-warning,
.status-badge.status-pending,
.status-badge.status-expiring {
    background: #FEF3C7;
    color: #D97706;
}

.status-badge.status-danger,
.status-badge.status-expired {
    background: #FEE2E2;
    color: #DC2626;
}

/* Expiry with countdown */
.expiry-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.expiry-date {
    font-weight: 500;
    color: #111827;
}

.expiry-countdown {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.expiry-countdown.safe { background: #D1FAE5; color: #059669; }
.expiry-countdown.warning { background: #FEF3C7; color: #D97706; }
.expiry-countdown.danger { background: #FEE2E2; color: #DC2626; }

/* Action Buttons */
.certificate-table .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-small.btn-primary {
    background: #6366F1;
    color: white;
}

.btn-small.btn-primary:hover {
    background: #4F46E5;
}

.btn-small.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-small.btn-danger:hover {
    background: #DC2626;
}

.btn-small.btn-view {
    background: #10B981;
    color: white;
}

.btn-small.btn-download {
    background: #3B82F6;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #111827;
    font-size: 1.25rem;
}

.empty-state p {
    color: #6B7280;
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* Cards View */
.certificate-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.certificate-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    transition: all 0.3s ease;
}

.certificate-card:hover {
    border-color: #6366F1;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.card-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #F9FAFB, #F3F4F6);
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-country {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-flag {
    font-size: 2rem;
}

.card-country-name {
    font-weight: 600;
    color: #111827;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.25rem;
}

.card-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.card-detail-label {
    color: #6B7280;
}

.card-detail-value {
    font-weight: 500;
    color: #111827;
}

.card-expiry-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    margin: 1rem 0;
    overflow: hidden;
}

.card-expiry-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.card-expiry-progress.safe { background: #10B981; }
.card-expiry-progress.warning { background: #F59E0B; }
.card-expiry-progress.danger { background: #EF4444; }

.card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.card-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: 0.813rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-lg { max-width: 600px; }
.modal-content.modal-xl { max-width: 900px; }

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

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-icon {
    font-size: 1.25rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #E5E7EB;
    color: #111827;
}

/* Form Styles */
.form-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-help {
    font-size: 0.8rem;
    color: #6B7280;
}

/* Country Info Panel in Form */
.country-info-panel {
    grid-column: span 2;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.info-flag { font-size: 1.75rem; }
.info-country { font-weight: 600; color: #111827; font-size: 1.1rem; }

.info-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.75rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.info-value {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.file-upload-area:hover {
    border-color: #6366F1;
    background: #F9FAFB;
}

.file-upload-area .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon { font-size: 2rem; }
.upload-text { font-weight: 500; color: #374151; }
.upload-hint { font-size: 0.8rem; color: #9CA3AF; }

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #F3F4F6;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: #111827;
}

.btn-remove-file {
    width: 24px;
    height: 24px;
    border: none;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reminder Settings */
.reminder-settings {
    background: #F9FAFB;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366F1;
}

.reminder-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #E5E7EB;
}

/* Modal Actions */
.modal-actions {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #F9FAFB;
}

/* Country Guide Modal */
.country-guide-content {
    padding: 1.5rem;
}

.guide-search {
    margin-bottom: 1.5rem;
}

.country-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.country-guide-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
    cursor: pointer;
}

.country-guide-card:hover {
    background: white;
    border-color: #6366F1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.guide-flag { font-size: 1.75rem; }
.guide-country-name { font-weight: 600; color: #111827; }

.guide-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guide-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.guide-detail-label { color: #6B7280; }
.guide-detail-value { font-weight: 500; color: #111827; }

.guide-link {
    display: block;
    margin-top: 1rem;
    padding: 8px 0;
    text-align: center;
    background: #6366F1;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.guide-link:hover {
    background: #4F46E5;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #6366F1;
    color: white;
}

.btn-primary:hover {
    background: #4F46E5;
}

.btn-secondary {
    background: #6B7280;
    color: white;
}

.btn-secondary:hover {
    background: #4B5563;
}

.btn-outline {
    background: transparent;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.btn-outline:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.btn-resources {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    border: none;
}

.btn-resources:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.btn-resources::before {
    content: '📚';
}

/* Tooltip */
.tooltip-container {
    position: fixed;
    z-index: 9999;
    background: #111827;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.813rem;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Certificate Detail View */
.certificate-details-view {
    padding: 1.5rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E5E7EB;
}

.detail-country {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-flag {
    font-size: 2rem;
}

.detail-country h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: #374151;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

.detail-value {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 500;
}

.detail-link {
    color: #6366F1;
    text-decoration: none;
    word-break: break-all;
}

.detail-link:hover {
    text-decoration: underline;
}

.detail-notes {
    color: #374151;
    line-height: 1.6;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    margin: 0;
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    flex-wrap: wrap;
}

.text-danger {
    color: #DC2626;
}

.text-warning {
    color: #D97706;
}

/* Plan Limit Indicator */
.plan-limit-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    font-size: 0.875rem;
}

.limit-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.limit-text {
    font-weight: 500;
    color: #374151;
}

.limit-warning {
    font-size: 0.813rem;
    color: #D97706;
    font-weight: 600;
}

.limit-indicator.at-limit .limit-warning {
    color: #DC2626;
}

.limit-indicator.at-limit {
    background: #FEE2E2;
    border-color: #FCA5A5;
}

.limit-indicator.near-limit {
    background: #FEF3C7;
    border-color: #FCD34D;
}

.btn-small {
    padding: 4px 12px;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .certificates-page .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .info-details {
        grid-template-columns: 1fr;
    }

    .reminder-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .certificate-cards-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item.full-width {
        grid-column: span 1;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .btn {
        width: 100%;
    }
}
