* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Login Screen */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.error-message {
    color: #ef4444;
    margin-top: 10px;
    text-align: center;
    font-size: 0.9em;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
}

.admin-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.8em;
    color: #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

#userInfo {
    color: #666;
    font-weight: 500;
}

.admin-nav {
    background: white;
    padding: 0 40px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: #667eea;
    background: #f5f5f5;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.admin-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
}

.settings-group {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-group:last-child {
    border-bottom: none;
}

.settings-group h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.3em;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.orders-list {
    margin-top: 20px;
}

.order-item-admin {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.order-item-admin h4 {
    margin-bottom: 10px;
    color: #333;
}

.order-item-admin p {
    color: #666;
    margin: 5px 0;
}

.password-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.password-input-group input {
    flex: 1;
}

.btn-toggle-password {
    padding: 12px 20px;
    background: #e5e7eb;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-toggle-password:hover {
    background: #d1d5db;
    border-color: #9ca3af;
}

.btn-test {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.btn-test:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.test-result {
    display: inline-block;
    margin-left: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
}

.test-result.testing {
    background: #fef3c7;
    color: #92400e;
}

.test-result.success {
    background: #d1fae5;
    color: #065f46;
}

.test-result.error {
    background: #fee2e2;
    color: #991b1b;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.modal-content h2 {
    margin-bottom: 12px;
}

.modal-content p {
    margin-bottom: 16px;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .admin-content {
        padding: 20px;
    }

    .password-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-toggle-password {
        width: 100%;
    }
}
