/* CCMS Public Styles */
.ccms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ccms-student-dashboard {
    background: #f8f9fa;
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.widget {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
}

.wallet-widget {
    border-left: 4px solid #28a745;
}

.course-widget {
    border-left: 4px solid #007bff;
}

.attendance-widget {
    border-left: 4px solid #ffc107;
}

.widget h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.balance {
    font-size: 2.5em;
    font-weight: bold;
    color: #28a745;
    margin: 15px 0;
}

.dashboard-tabs {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-nav li {
    margin: 0;
}

.tab-nav a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-nav a:hover,
.tab-nav a.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.ccms-course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.course-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.enroll-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
}

.enroll-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.ccms-admission-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ccms-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ccms-btn-primary {
    background: #667eea;
    color: white;
}

.ccms-btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.ccms-login-form {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ccms-login-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .ccms-course-list {
        grid-template-columns: 1fr;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-nav a {
        text-align: center;
        border-bottom: 1px solid #dee2e6;
        border-left: 3px solid transparent;
    }
    
    .tab-nav a.active {
        border-left-color: #667eea;
    }
}

/* Loading states */
.ccms-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ccms-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.ccms-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    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: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    flex: 1;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 25px;
}

/* Transaction Styles */
.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.transaction-item:hover {
    background-color: #f8f9fa;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.transaction-details {
    flex: 1;
}

.transaction-desc {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.transaction-date {
    font-size: 0.85em;
    color: #666;
}

.transaction-amount {
    font-weight: bold;
    font-size: 1.1em;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

/* Pagination */
.ccms-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Certificate Verification Results */
.certificate-verification-result {
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
}

.certificate-verification-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.certificate-verification-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.verification-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.verification-header i {
    font-size: 2em;
    margin-right: 15px;
}

.verification-details {
    display: grid;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.detail-row label {
    font-weight: 600;
}

.status-valid {
    color: #28a745;
    font-weight: bold;
}

/* Form Enhancements */
.form-actions {
    margin-top: 25px;
    text-align: center;
}

.field-error {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
}

input.error,
select.error,
textarea.error {
    border-color: #dc3545 !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ccms-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.ccms-alert {
    position: relative;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideInDown 0.3s ease;
}

.ccms-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.ccms-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.ccms-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.ccms-alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.close-alert {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .transaction-amount {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .detail-row {
        flex-direction: column;
    }
}