/* SmartCertify Certificate Download Form - Modern Design */

@font-face {
    font-family: 'Samarata';
    src: url('../font/Samarata.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Main Form Wrapper
   ======================================== */

.sc-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 40px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
}

@media (max-width: 768px) {
    .sc-form-wrapper {
        grid-template-columns: 1fr;
        margin: 20px auto;
    }
}

/* ========================================
   Left Section: Instructions
   ======================================== */

.sc-instruction-section {
    background: linear-gradient(135deg, #f3f0ff 0%, #ede9ff 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .sc-instruction-section {
        padding: 40px 30px;
    }
}

.sc-instruction-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sc-instruction-intro {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 32px;
    line-height: 1.6;
}

.sc-instruction-list {
    list-style: decimal;
    margin-left: 20px;
    margin-bottom: 32px;
}

.sc-instruction-list li {
    font-size: 15px;
    color: #2d3748;
    line-height: 1.8;
    margin-bottom: 16px;
}

.sc-instruction-list li strong {
    font-weight: 600;
    color: #1a202c;
}

.sc-instruction-footer {
    font-size: 14px;
    color: #718096;
    font-style: italic;
    line-height: 1.5;
}

/* ========================================
   Right Section: Form
   ======================================== */

.sc-form-section {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .sc-form-section {
        padding: 40px 30px;
    }
}

.sc-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.sc-form-header-icon {
    font-size: 32px;
}

.sc-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
}

/* ========================================
   Form Elements
   ======================================== */

.sc-elegant-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-form-label {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.sc-form-input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #1a202c;
}

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

.sc-form-input::placeholder {
    color: #9ca3af;
}

select.sc-form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a202c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========================================
   Buttons
   ======================================== */

.sc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.sc-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
}

.sc-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.sc-btn-primary:active {
    transform: translateY(0);
}

.sc-btn-secondary {
    background-color: #e5e7eb;
    color: #1a202c;
}

.sc-btn-secondary:hover {
    background-color: #d1d5db;
}

.sc-btn-full {
    width: 100%;
}

/* ========================================
   Error & Success Messages
   ======================================== */

.sc-form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.sc-form-message.error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    display: block;
}

.sc-form-message.error strong {
    color: #991b1b;
    font-weight: 600;
}

/* Enhanced error message styling */
.sc-error-message {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    background-color: #fee2e2;
    border: 2px solid #ef4444;
    border-left: 6px solid #ef4444;
    animation: slideDown 0.3s ease-out;
}

.sc-error-message.sc-error-message {
    display: block !important;
}

.sc-error-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sc-error-icon {
    font-size: 32px;
    flex-shrink: 0;
    color: #ef4444;
}

.sc-error-text {
    flex: 1;
    color: #7f1d1d;
    font-size: 15px;
    line-height: 1.6;
}

.sc-error-text strong {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #991b1b;
    margin-bottom: 8px;
}

.sc-error-reason {
    display: block;
    color: #7f1d1d;
}

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

.sc-success-message {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 24px;
}

.sc-success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.sc-success-message h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.sc-success-message p {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 24px;
    line-height: 1.6;
}

.sc-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.sc-action-buttons .sc-btn {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 768px) {
    .sc-action-buttons {
        flex-direction: column;
    }

    .sc-action-buttons .sc-btn {
        min-width: unset;
    }
}

/* ========================================
   Alerts
   ======================================== */

.sc-alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.sc-alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.sc-alert-warning p {
    margin: 0;
    font-size: 14px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .sc-instruction-title {
        font-size: 28px;
    }

    .sc-form-title {
        font-size: 24px;
    }

    .sc-form-input {
        padding: 10px 14px;
        font-size: 16px;
    }

    .sc-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sc-form-wrapper {
    animation: slideUp 0.6s ease-out;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .sc-form-wrapper {
        box-shadow: none;
        margin: 0;
        border-radius: 0;
    }
}

/* ========================================
   Admin Dashboard Styles
   ======================================== */

:root {
    --sc-primary: #6366f1;
    --sc-success: #10b981;
    --sc-error: #ef4444;
    --sc-warning: #f59e0b;
    --sc-info: #0891b2;
    --sc-info-light: #ecf9ff;
    --sc-border: #e5e7eb;
    --sc-text-primary: #1f2937;
    --sc-text-secondary: #6b7280;
    --sc-bg-light: #f9fafb;
}

.sc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.sc-stat-card {
    background-color: #ffffff;
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.sc-stat-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--sc-primary);
    transform: translateY(-2px);
}

.sc-stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--sc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    text-decoration: none;
}

.sc-stat-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--sc-primary);
    margin: 0 0 12px 0;
    line-height: 1;
}

.sc-stat-subtitle {
    font-size: 13px;
    color: var(--sc-text-secondary);
    margin: 0;
    line-height: 1.4;
}
