/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     
    min-height: 100vh;





    justify-content: center;
    align-items: center;
    min-height: 100vh;
   background: url("7896.jpg") no-repeat, #f0f0f0;
   background-size: cover;
    padding: 20px;











}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
   background: url("7896.jpg") no-repeat, #f0f0f0;
   background-size: cover;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #333;
    font-size: 24px;
}

.login-header p {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

.login-error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #fcc;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 12px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1b9288 0%, #072575 50%, #0f3460 100%);
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-header h2 i {
    color: #667eea;
    margin-right: 10px;
}

.sidebar-user {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.sidebar-user div {
    flex: 1;
}

.sidebar-user strong {
    display: block;
    font-size: 15px;
}

.sidebar-user small {
    color: #a8a8b8;
    font-size: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #a8a8b8;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: #667eea;
}

.sidebar-nav .nav-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: #fff;
    border-left-color: #667eea;
}

.sidebar-nav .nav-item i {
    width: 24px;
    margin-right: 15px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Top Navbar */
.top-navbar {
    background: #fff;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    display: none;
    padding: 5px;
}

.nav-btn:hover {
    color: #667eea;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    padding: 5px;
}

.notifications:hover {
    color: #667eea;
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-dropdown:hover {
    background: #f0f2f5;
}

.user-dropdown img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-dropdown span {
    font-weight: 500;
    color: #333;
}

.user-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 8px 0;
    margin-top: 5px;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f0f2f5;
}

.dropdown-menu a i {
    width: 20px;
}

/* Content Wrapper */
.content-wrapper {
    padding: 30px;
}

.page-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    font-size: 24px;
    color: #333;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card h3 {
    font-size: 26px;
    color: #333;
    margin-bottom: 2px;
}

.stat-card p {
    color: #888;
    font-size: 13px;
}

/* Boxes Grid */
.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.box-item {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.box-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.box-item.secret {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.box-item .box-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    background: rgba(0,0,0,0.08);
    padding: 4px 10px;
    border-radius: 20px;
}

.box-item.secret .box-badge {
    background: rgba(255,255,255,0.2);
}

.box-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
    padding-right: 60px;
}

.box-item p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.box-item.secret p {
    color: rgba(255,255,255,0.9);
}

.box-item .box-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.box-item.secret .box-meta {
    color: rgba(255,255,255,0.8);
}

.box-item .box-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.box-item .box-actions button {
    padding: 5px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit {
    background: #667eea;
    color: #fff;
}

.btn-edit:hover {
    background: #5a6fd6;
}

.btn-delete {
    background: #e74c3c;
    color: #fff;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Profile Page */
.profile-container {
    max-width: 700px;
    margin: 0 auto;
}

.profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-header {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f2f5;
}

.profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
}

.profile-avatar .upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.3s;
}

.profile-avatar .upload-btn:hover {
    transform: scale(1.1);
}

.profile-header h2 {
    font-size: 22px;
    color: #333;
}

.profile-header p {
    color: #888;
}

.profile-form {
    margin-top: 20px;
}

.profile-form .form-group {
    margin-bottom: 18px;
}

.profile-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.profile-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.profile-form input:focus {
    outline: none;
    border-color: #667eea;
}

.profile-form input:disabled {
    background: #f5f5f5;
    color: #888;
}

hr {
    margin: 25px 0;
    border: none;
    border-top: 2px solid #f0f2f5;
}

/* Buttons */
.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    padding: 10px 24px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: #c0392b;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Modals */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.modal-content .close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

/* Question Items */
.question-item {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.question-item label {
    display: block;
    margin: 8px 0;
    cursor: pointer;
}

.question-item label:hover {
    background: #e8eaf6;
    padding: 5px;
    border-radius: 3px;
}

.question-item input[type="radio"] {
    margin-right: 10px;
}

.question-item input[type="text"].answer-input {
    width: 100%;
    padding: 8px 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-submit-answer {
    padding: 8px 20px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit-answer:hover {
    background: #27ae60;
}

.feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.feedback.correct {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}

table tr:hover td {
    background: #f8f9fa;
}

.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge.admin {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge.user {
    background: #e3f2fd;
    color: #1565c0;
}

/* Recent Activity */
.recent-activity {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.recent-activity h3 {
    margin-bottom: 15px;
    color: #333;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-item .activity-content {
    flex: 1;
}

.activity-item .activity-content p {
    color: #333;
    font-size: 14px;
    margin: 0;
}

.activity-item .activity-content small {
    color: #888;
    font-size: 12px;
}

/* Filter Section */
.filter-section {
    margin-bottom: 20px;
}

.filter-section select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-btn {
        display: block;
    }
    
    .top-navbar {
        padding: 10px 15px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .boxes-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .user-dropdown span {
        display: none;
    }
    
    .page-title {
        font-size: 18px;
    }
}

/* Add to existing CSS */

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Box Selection */
.box-item.selectable {
    cursor: pointer;
    position: relative;
}

.box-item.selectable .checkbox-container {
    position: absolute;
    top: 12px;
    left: 12px;
}

.box-item.selectable .checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.box-item.selectable.selected {
    border: 3px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.box-item.selectable .box-content {
    padding-left: 30px;
}

/* Progress Bar */
.progress-bar {
    background: #f0f2f5;
    border-radius: 10px;
    height: 30px;
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* Modal Large */
.modal-large {
    max-width: 800px !important;
    width: 95% !important;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f2f5;
}

/* Question Navigation */
.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.question-counter {
    color: #888;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .modal-large {
        width: 100% !important;
        margin: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
        justify-content: center;
    }
}
/* Status Badges */
.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #fff3e0;
    color: #e65100;
}

.status-suspended {
    background: #fce4ec;
    color: #c62828;
}

.status-completed {
    background: #e3f2fd;
    color: #1565c0;
}

/* Toggle Buttons */
.btn-toggle {
    padding: 5px 12px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-toggle:hover {
    background: #5a6268;
}

/* Box Actions */
.box-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.box-actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}