/* 
 * Nipun India Skill Development Portal
 * Main Stylesheet
 * 
 * This file contains custom styles for the application.
 */

/* Global Styles */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff4081;
    --success-color: #4caf50;
    --info-color: #03a9f4;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --body-bg: #f5f5f5;
    --card-bg: #ffffff;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--body-bg);
    color: #333;
    line-height: 1.6;
}

/* Sidebar Styles */
#sidebar {
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding-top: 1rem;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin: 0.2rem 0;
}

#sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

#sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* Button Styles */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #303f9f;
    border-color: #303f9f;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #388e3c;
    border-color: #388e3c;
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

/* Table Styles */
.table {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* Form Styles */
.form-control {
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(63, 81, 181, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Dashboard Stats Cards */
.dashboard-stat-card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s;
}

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

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* Responsive Styles */
@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (min-width: 768px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Certificate Styles */
.certificate-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #ddd;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.certificate-header {
    text-align: center;
    margin-bottom: 2rem;
}

.certificate-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.certificate-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.certificate-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.certificate-body {
    text-align: center;
    margin-bottom: 2rem;
}

.certificate-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.certificate-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

.certificate-signature {
    text-align: center;
    width: 200px;
}

.certificate-signature img {
    max-width: 150px;
    margin-bottom: 0.5rem;
}

.certificate-signature-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.certificate-signature-title {
    font-size: 0.9rem;
    color: #666;
}

.certificate-qr {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 100px;
    height: 100px;
}

/* Wallet Styles */
.wallet-card {
    background: linear-gradient(135deg, var(--primary-color), #5c6bc0);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.wallet-balance {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.wallet-label {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.transaction-item:last-child {
    border-bottom: none;
}

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

.transaction-icon.credit {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
}

.transaction-icon.debit {
    background-color: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.transaction-details {
    flex-grow: 1;
}

.transaction-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.transaction-amount {
    font-weight: 700;
}

.transaction-amount.credit {
    color: var(--success-color);
}

.transaction-amount.debit {
    color: var(--danger-color);
}

/* Exam Styles */
.exam-timer {
    position: sticky;
    top: 1rem;
    z-index: 100;
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timer-label {
    font-size: 0.9rem;
    color: #666;
}

.question-card {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.question-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 500;
}

.question-body {
    padding: 1.5rem;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.option-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background-color: rgba(63, 81, 181, 0.05);
    border-color: var(--primary-color);
}

.option-item.selected {
    background-color: rgba(63, 81, 181, 0.1);
    border-color: var(--primary-color);
}

.exam-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Student Profile Styles */
.profile-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.profile-info {
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

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

.profile-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
