/* Admin panel styles */
#admin-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#admin-login-btn,
#admin-logout-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

#admin-login-btn:hover,
#admin-logout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

#admin-panel {
    position: fixed;
    right: 20px;
    top: 80px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 360px;
    max-height: calc(100vh - 100px);
    z-index: 999;
    transition: all 0.3s ease;
}

#admin-panel.minimized {
    width: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
}

.admin-toggle-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.admin-toggle-btn:hover {
    transform: scale(1.1);
}

#admin-panel.minimized .admin-toggle-btn {
    transform: rotate(180deg);
}

.admin-content {
    padding: 0 24px 24px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    transition: all 0.3s ease;
}

#admin-panel.minimized .admin-content {
    display: none;
}

.admin-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.admin-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.admin-section label {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.admin-section input[type="text"],
.admin-section input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.admin-section input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

.admin-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.admin-btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.admin-btn-secondary {
    width: 100%;
    background: linear-gradient(135deg, #8e9eab 0%, #eef2f3 100%);
    color: #2c3e50;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.admin-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#upload-status {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
}

.status-info {
    background: #e8f4f8;
    color: #2980b9;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.admin-user {
    font-size: 12px;
    color: #764ba2;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #f093fb15 0%, #f5576c15 100%);
    border-radius: 10px;
    text-align: center;
    border: 1px solid #f093fb30;
}

/* Admin actions on document cards */
.admin-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 10;
}

.admin-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
}

.admin-edit-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.05);
}

.admin-delete-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.05);
}

.document-card {
    position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #admin-panel {
        right: 10px;
        left: 10px;
        width: auto;
        top: 60px;
    }
    
    #admin-controls {
        right: 10px;
    }
}

