/* Admin-specific styles */

/* Admin Login */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    background-size: cover;
    padding: 2rem;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    }
    50% {
        background: linear-gradient(135deg, #f093fb 0%, #667eea 50%, #764ba2 100%);
    }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #4c51bf;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-full:hover::before {
    left: 100%;
}

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    background-attachment: fixed;
}

.admin-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4c51bf;
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

/* Admin Content */
.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2d3748;
}

/* Filters Section */
.filters-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.filters-section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-bar {
    position: relative;
    margin-bottom: 1rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 120px;
}

/* Kits Table */
.kits-table-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.kits-table-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.kits-table {
    width: 100%;
    border-collapse: collapse;
}

.kits-table th {
    background: #f7fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.kits-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.kits-table tr {
    transition: all 0.3s ease;
}

.kits-table tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table-loading {
    padding: 4rem;
    text-align: center;
    color: #718096;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.table-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Kit Tags */
.kit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.kit-tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Enhanced Kit Type Styles */
.kit-type {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.kit-type.quizlet {
    background: linear-gradient(135deg, #4255ff, #3b4cca);
    color: white;
}

.kit-type.blooket {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.kit-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Enhanced Subject Tag Styles */
.kit-tag.subject-math { 
    background: linear-gradient(135deg, #fef5e7, #fed7aa); 
    color: #d69e2e; 
    border: 1px solid #f6ad55;
}
.kit-tag.subject-english { 
    background: linear-gradient(135deg, #e6fffa, #b2f5ea); 
    color: #319795; 
    border: 1px solid #4fd1c7;
}
.kit-tag.subject-science { 
    background: linear-gradient(135deg, #e3f2fd, #bbdefb); 
    color: #1976d2; 
    border: 1px solid #42a5f5;
}
.kit-tag.subject-social { 
    background: linear-gradient(135deg, #f3e5f5, #e1bee7); 
    color: #7b1fa2; 
    border: 1px solid #ab47bc;
}
.kit-tag.subject-history { 
    background: linear-gradient(135deg, #fff5f5, #fed7d7); 
    color: #e53e3e; 
    border: 1px solid #fc8181;
}
.kit-tag.subject-biology { 
    background: linear-gradient(135deg, #f0fff4, #c6f6d5); 
    color: #38a169; 
    border: 1px solid #68d391;
}
.kit-tag.subject-chemistry { 
    background: linear-gradient(135deg, #fef5e7, #fed7aa); 
    color: #d69e2e; 
    border: 1px solid #f6ad55;
}
.kit-tag.subject-physics { 
    background: linear-gradient(135deg, #e3f2fd, #bbdefb); 
    color: #1976d2; 
    border: 1px solid #42a5f5;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s;
}

.btn-sm:hover::before {
    left: 100%;
}

.btn-edit {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c53030, #9c2626);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

/* Enhanced primary button styles */
.btn-primary {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 81, 191, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 81, 191, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 81, 191, 0.3);
}

/* Protected Kit Indicator */
.protected-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #d69e2e;
    font-size: 0.9rem;
}

/* Modal Enhancements */
.modal {
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.modal-large .modal-content {
    max-width: 700px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

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

/* Enhanced Form Styles */
.form-group input,
.form-group select,
.form-group textarea {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
    background: white;
    transform: translateY(-2px);
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    display: block;
}

/* Tags Input */
.tags-input-container {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.tags-input-container:focus-within {
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
    background: white;
}

.tags-input-container input {
    border: none;
    outline: none;
    width: 100%;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.selected-tag {
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(76, 81, 191, 0.3);
    transition: all 0.3s ease;
    animation: tagSlideIn 0.3s ease;
}

.selected-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 81, 191, 0.4);
}

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

.selected-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
}

.suggested-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.tag-suggestion {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    color: #4a5568;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.tag-suggestion:hover::before {
    left: 100%;
}

.tag-suggestion:hover {
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Warning Text */
.warning {
    color: #e53e3e;
    font-size: 0.9rem;
    font-style: italic;
}

/* Enhanced Search Bar */
.search-bar input {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    transform: translateY(-2px);
}

.search-bar i {
    color: #a0aec0;
    font-size: 1.1rem;
    z-index: 10;
}

/* Enhanced Loading Animation */
.loading-dots {
    display: inline-block;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-header h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls select,
    .filter-controls button {
        width: 100%;
    }
    
    .kits-table-container {
        overflow-x: auto;
        border-radius: 12px;
    }
    
    .kits-table {
        min-width: 800px;
    }
    
    .kits-table tr:hover {
        transform: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .login-container {
        margin: 1rem;
        padding: 2rem;
    }
    
    .modal-large .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .filters-section {
        padding: 1.5rem;
    }
    
    .search-bar input {
        border-radius: 12px;
    }
}
